--------------- SMD exporter script v.9b help --------------------------------------------------

How to use this exporter:

for the time being we're interfacing this with the command line function. to invoke the exporter type

SMD <option> in the maxscript listener, where <option> is one of the following:

	#export:    Ask for a file name and then write out an SMD
	
	#go:		synonym for # export
	
	#window: 	will print the smd to a new script window rather than to a new file. If you're
				satisfied with the results you can save the file from the window's file menu 
				use it as an SMD.
	
	#debug: 	will print out debug messages (quite a few of them!) to the listener window before saving the SMD.
				If you're having problems with an export this may help you find the place where the
				script's analysis of the model breaks down
	
	#help: 		shows this help file


			
----------------- SMD file format:------------------------------------------------------------------

if you want to test the accuracy of the exported data, here's the structure of the SMD file:

version 1 								-- a tagline. required by all smds

nodes 									-- begins the skeleton parent array

0 "bone01" -1 							-- this bone has the ID #0, it's called "bone01"
										  	and its parent is ID -1 (ie the world)
											
1 "Bone02" 0 							-- this bone is ID #1, it's called "Bone02" and 
											its parent is bone 0 (ie, "Bone01")
.
.
.
end 									-- ends the skeleton parent list

skeleton 								-- starts the list of bone positions and rotations

time 0 									-- this is a reference SMD, so this is 0. In an animation SMD this
											would be the frame number.

0 -0.31545   0.00000   0.94637   0.00000   0.00000   0.00000 		-- Bone ID 0 is at -3.1545, 0,.94637 and rotated
																   		0,0,0 (Euler angles IN RADIANS - not degrees!)
																
1  8.83281   0.00000   29.0221   0.00000   0.31562   0.00000 		-- Bones with a parent other than -1 report their position
																		and and rotation in their parent's local space. So bone ID 1
.																		is 8.8 units from bone ID 0 in Bone ID 0's local X direction,
.																		and 29.0221 units in Bone ID 0's local Z direction. (note that in 
.																		this case, since bone ID 0 is rotated to 0,0,0 it the local and
.																		world locations will be the same) Rotations are likewise relative. 
,																		This bone is rotated .31562 from the parent's Y axis 
,																		(about 18 degrees).
.
end																	-- the end of the skeleton position/rotation section

triangles								-- starts the triangle list

"sample.bmp" 							-- the texture name for this face (texture location is specified in the QC file)
																
3   -21.95 8.83 0.07    0.0 .707 0.0707   0.5122    0.9109
											-- the first vertex of this triangle is attached to bone ID 3. It's position IN WORLD SPACE
											is (-21.95, 8.83, 0.07). The vertex normal vector is (0.0, .707, .707) - this value 
											is calculated taking account of smoothing groups. The texture coordinates of this
											vertex are .5122 in the U texture direction and .9109 in the V texture direction.
											
3   -21.1  8.5  1.00    0.0 0.50 0.50  0.61 0.932
											-- the second vert of the triangle is also attached to bone ID 3: It's at (-21.1, 8.5, 1.0)
											and it's normal is (0,.5,.5) . Tex Coords U:.61 V:.932
											
2	-22   9   1.1    0.0 1.0 0.0	0.66 0.944
											-- the third vert of the triangle is attached to bone ID 2. The position is (-22,9,1.1),
											the normal is (0,1,0) -- ie., straight forward -- and the texture coords are U:.66 V:.944

"sample.bmp"								-- a new face record starts with a new texture listing, even if it has the same as the
											texture in the previous face.

.										
.
.
end <CR> 										-- end of the triangle list and of the file

SMD files are carriage return sensitive -- each line must end with a carriage return. the file should also include at least one
carriage return after the final end statement. Whitespace is the only delimiter; any combination of tabs and spaces can be used to
separate entries (for this reason multiword names should be enclosed in quotation marks (").

Please report bugs and other problems to steve theodore (stevet@valvesoftware.com)											