RubenGarza.com - MaxScript Samples  
  E-Mail
Back to Maxscript Home
     
 

Script 03 - XML Skeleton Exporter

 
 
 
This script will export all objects in the max scene. It will export pos, rotation, and their heiarchy in an XML format.
LIsted below is an example file I exported using this script.
 
<!-- Comments: Arm Test -->
<SKELETON>
	<BONE>
	NAME= "Clavicle"
		<TRANSFORM> 
			TRANSLATION= 1.07049 0.881331 17.6265
			ROTATION= 1 3.13916e-007 5.20549e-007 6.71544e-007
			SCALE= 1.0 1.0 1.0
		</TRANSFORM> 
	</BONE> 
	<BONE> 
		NAME= "UpperArm"
		PARENT= "Clavicle"
		<TRANSFORM> 
			TRANSLATION= 1.31314 -1.36487e-007 0.0
			ROTATION= 0.740637 0.0370627 0.670044 0.03353
			SCALE= 1.0 1.0 1.0
		</TRANSFORM> 
	</BONE> 
	<BONE> 
		NAME= "L Forearm"
		PARENT= "UpperArm"
		<TRANSFORM> 
			TRANSLATION= 3.03033 2.07129e-007 9.7108e-007
			ROTATION= 0.995004 0 0 -0.0998333 
			SCALE= 1.0 1.0 1.0 
		</TRANSFORM> 
	</BONE>
	<BONE> 
		NAME= "L Hand"
		PARENT= "L Forearm"
		<TRANSFORM>
			TRANSLATION= 3.03033 -6.47112e-007 -9.27898e-007
			ROTATION= 0.707388 -0.706825 0 0
			SCALE= 1.0 1.0 1.0 
		</TRANSFORM> 
	</BONE>
</SKELETON> 
 
     
     
 

Notes:

 
 
This script converts max Z up to a Y up format.
Due to biped code issues, it is not current possible to export biped skeleton data. Just make a snapshot, and export that..
Open the script in max and run it. It is not a macroscript currently.
     
     
  Files:  
  scr_03_XMLskeletonExport.ms
This maxscript file was last updated March 2006.