/********************************************************************************************************
/*			Project :  BlizzImporter
/*			Version :  beta 2.00
/*			Created by : profet (alias Zeffyr)
/*			Project starting date : 21 january 2007
/*			Version release date  : 31 march 2007
/*
/********************************************************************************************************/

	"BlizzImporter beta 2.00" is the second public released version of this script.
	Like the 1.00 version, only .mdl file format importation is supported (.m2 .wmo and .mdx support can be added in future
	versions)
	Created for 3dsMAX 5.0 and seems to work perfectly for higher versions.


________________
VERSIONS HISTORY

	- BlizzImporter beta 1.00	:	24 march 2007
	- BlizzImporter beta 2.00	:	31 march 2007


______________
HOW TO INSTALL

	1- Just unzip the "BlizzImporter" folder into the 3dsMAX "Scripts\" folder.
	     Note: pathing MUST be "Scripts\"
	
	
	2- Change the textures path in the "BlizzImporter\formats\mdl.ini" file.
	
	
__________
HOW TO USE

	- To launch the script in 3dsMAX, go in the Utilities panel, press the "MAXScript" button, and
	  press the "Run Script" button. Then open the "BlizzImporter" folder and select "launcher.mse".
	  
	- To select a model to open, just press the "Select model" button and choose a model. Then press
	  the "Open model" button. (3dsMAX will freeze some seconds until the model file's reading ends)
	
	- When the UI panel appears, you will be able to modify some options.
	
	- When you are ready, just press the "Import" button to start the importation. (3dsMAX will freeze
	  until the importation ends)
	
	
______________
UI DESCRIPTION

	Infos panel :
	
		There is some informations about the model.
	
	
	Geometry panel options :
	
		- The list on the left contains all meshes of the model, if you select one element of this list,
		  Mesh's properties are displayed on the right.
		  You can use the Filter listbox to order meshes by id or in alphabetical order.
		- Imported : if the box is not checked, the mesh won't be created in the scene during the importation.
		              Note : if a mesh is used as parent but not imported, the child will be linked to the parent
		                     of this mesh, then the hierarchy won't be broken.
		- Animated : if the box is not checked, the mesh won't be animated.
		- Connected : if the box is checked, the mesh will be set as connected in the "User Property Editor".
		- Unwrapped : if the box is not checked, UVfaces won't be created for the mesh and no materials will be
					  assigned to it.
		- Create Bone : if this box is checked, a bone will be created in the scene (parent of the mesh) and will
						be animated instead of the mesh.
						Note : When a mdl-bone have multiple meshes, this option is automaticaly checked and disabled.
							   All meshes will be linked to this bone.
		- Collapse all meshes together : (NOT YET IMPLEMENTED) this option merge all meshes by material. Similar to a geoset based importation.
										 /!\ NO ANIMS WILL BE IMPORTED
		
	Animations panel options :
	
		Note : this panel is a powerfull anims generator that enables the user to queue mdl-animations into one
			   model anim, moreover the user can modify animations' options easily.
			  Note that generated animations can be saved and loaded.
			  
		- "Model's animations" list contains names of animations read in the mdl.
		- "Imported animations" list contains names of generated animations (imported in the scene).
		- "Queued anims" list contains names of queued animation in a generated animations.
		         Note : You can modify the order of this list, by using "Up" "Down" and "Delete" buttons.
		- "Add in queue to anim" button, adds the selected mdl-anim to the "Queued anims" list.
		- "New anim" button clears the anim info area and add the mdl-selected anim to the "Queued anims" list.
			/!\ Animation must be saved, by pressing the "OK" button !
		- "Import all" button, converts all mdl-anims into generated anims, using same options.
		- "Delete all" clears the "Imported animations" list.
		- "Load anims" enables the user to select a .ani file to load previously saved animations.
		- "Save anims" enables the user to save generated anims into a .ani file.
		
		

________________________________
NOTE ABOUT TEXTURES & CONVERSION

	A texture folder must be specified in the formats\mdl.ini file. During materials importation, the script will
	search (in this directory) for a .tga version of the texture file ; if no .tga is found, if a .blp version is found,
	the texture will be converted into a .tga file, placed in this directory.
	
	.IFL files are ASCII files, containing a list of textures. Used for textures animations. When needed, they are created
	automaticaly in the texture folder.



__________________
FEATURES SUPPORTED

	beta 1.00:
		- Geometry
		- Mapping (TVerts and UVfaces)
		- Skeleton (bones)
		- Animations
		
	beta 2.00:
		- Texture conversion (.blp to .tga)
		
		- Material importation:
			* Single / multimaterial
			* Texture ID animation (not Tverts animation)
			* shader type
			* UV tiles
			* Unshaded
			* Unfogged
			* TwoSided
			* NoDepthTest
			* NoDepthSet
			* Alpha animation (maybe bugged with time values, but i didn't found a good model to test it)
			
		- Objects importation:
			* Attachments
			* Events
			* Cameras (not animated)
			* Collision shapes (not cylinder type)
			* Particles emitter 2 (there are many bugs in the Particles plugin, then particles importation is quite not good)
			* 
		
		

______________________
FUTURE IMPLEMENTATIONS

	- Bezier and Hermite animations improvement (add tangents).
	- Visibility for meshes and bones.
	- Material color animations.
	- Ribbon emitters.
	- miscellaneous options everywhere =)


_______
CONTACT

	If you have questions or bug reports, please contact me on msn or send me a mail to profetiser@hotmail.com
	Thanks. ;)
	
	PS: I'm searching for a mdl file wich use a "static alpha" value in a GeosetAnim.
	
	
	
	Friendly,
		~profet
	