• Advertisement
Sign in to follow this  

MAXScript Problem

This topic is 3964 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey there, I've got my exporter saving all the vertex and texture data that I need it to to a text file. Here is the code for exporting the texture paths
format "\nStandard Material\n"
				try
				(
					if (num_maps > 1) then
						map = node.material[m].diffuseMap.filename
					else
						map = node.material.diffuseMap.filename
				)
				catch
				(
					map = "undefined"
				)
				format "\nDiffuse: "
				format map
				try
				(
					if (num_maps > 1) then
						bumpmap = node.material[m].bumpMap.filename
					else
						bumpmap = node.material.bumpMap.filename
				)
				catch
				(
					bumpmap = "undefined"
				)
				format "\nBump: "
				format bumpmap
				try
				(
					if (num > 1) then
						specmap = node.material[m].specularMap.filename
					else
						specmap = node.material.specularMap.filename
				)
				catch
				(
					specmap = "undefined"
				)
				format "\nSpecular: "
				format specmap
				try
				(
					if (num > 1) then
						lummap = node.material[m].selfIllumMap.filename
					else
						lummap = node.material.selfIllumMap.filename
				)
				catch
				(
					lummap = "undefined"
				)				   
				format "\nLuminance: "
				format lummap


It's exporting the Diffuse and Bump map paths perfectly, but not the others. I'm guessing I'm just getting their names wrong but according to the MAXScript Reference this is what they're supposed to be called. Can anyone help me? Cheers

Share this post


Link to post
Share on other sites
Advertisement
Try using the unaliased maps[2] and maps[5], see if that works.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement