Advertisement

MAXScript Problem

Started by March 02, 2007 07:41 AM
0 comments, last by Tom 17 years, 9 months ago
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
Try using the unaliased maps[2] and maps[5], see if that works.

GDNet+. It's only $5 a month. You know you want it.

This topic is closed to new replies.

Advertisement