Sign in to follow this  
AndyEsser

MAXScript Problem

Recommended Posts

AndyEsser    394
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this