PYTHONSHAPE DOCUMENTATION
A Python Plugin for Milkshape
by Ion Fusion, 2007
---------------------------------------------

Documentation! This module makes a Python interpreter available for Milkshape3D, for
extreme scriptability. The documentation is written like this: First the class name,
then its various functions that manipulate itself. Have at it!

ms3D module
	msModel GetModel()
		Returns the main model of the program, needed to do anything useful.
	MS_MAX_NAME
	MS_MAX_PATH
	MS_MAX_VERTICES
	MS_MAX_TRIANGLES
	MS_MAX_GROUPS
	MS_MAX_MATERIALS
	MS_MAX_JOINTS
	eSelected
	eSelected2
	eHidden
	eDirty
	eAveraged
	eKeepVertex
	eSphereMap
	eHasAlpha
	eCombineAlpha

msModel
	Destroy()
		Destroys and probably cleans up the model
	int GetMeshCount()
	int AddMeshs()
	msMesh GetMeshAt(index)
	int FindMeshByName(string name)
	int GetMaterialCount()
	int AddMaterial()
	msMaterial GetMaterialAt(index)
	int FindMaterialByName(string name)
	int GetBoneCount()
	int AddBone()
	msBone GetBoneAt(index)
	int FindBoneByName()
	SetFrame(int frame)
	int GetFrame()
	SetTotalFrames(int totalframes)
	int GetTotalFrames()
	SetPosition((x, y, z))
	(x, y, z) GetPosition()
	SetRotation((x, y, z))
	(x, y, z) GetRotation()
	SetCamera((position x, position y, position z), (rotation x, rotation y))
	((position x, position y, position z), (rotation x, rotation y)) GetCamera()
	SetComment(string)
	string GetComment()
	
msVertex
	SetFlags(int flags)
		Sets the flags of the vertex
	int GetFlags()
		Returns the flags of the vertex
	SetVertex((x,y,z))
		Sets the position of the vertex
	(x,y,z) GetVertex
		Returns the position of the vertex
	SetTexCoords((u,v))
		Sets the texture UV coordinates (floats) for the vertex
	(u,v) GetTexCoords()
		Returns the UV coordinates for the vertex
	SetBoneIndex(index)
		Sets the bone index of the vertex
	index GetBoneIndex()
		Returns the bone index of the vertex
msVertexEx
	SetBoneIndices(index,boneindex)
		Sets the bone index for a specified vertex index
	(boneindex) GetBoneIndices(index)
		Returns the bone
	SetBoneWeights(index, weight)
		Sets the weight of a bone at an index
	(weight) GetBoneWeights(index)
		Get a weight at an index
	SetExtra(index,extra)
		Sets the extra data (an int) of the index.
	(extra) GetExtra(index)
		Gets the extra data of an index
msTriangle
	SetFlags(int flags)
		Sets the flags of the triangle
	int GetFlags()
		Returns the flags of the triangle
	SetVertexIndices([index 1, index 2, index 3])
		Sets the indices for this triangle
	(iii) GetVertexIndices()
		Returns the indices for the triangle
	SetNormalIndices([index 1, index 2, index 3])
	(iii) GetNormalIndices()
	SetSmoothingGroup(int group)
	int GetSmoothingGroup()
msTriangleEx
	SetNormal(index, (normal x, normal y, normal z))
	(normal x, normal y, normal z) GetNormal(index)
	SetTexCoord(index, (u, v))
	(u, v) GetTexCoord(index)
msMesh
	SetFlags(flags)
	flags GetFlags()
	SetName(string name)
	string GetName()
	SetMaterialIndex(index)
	index GetMaterialIndex()
	int GetVertexCount()
	int AddVertex()
	msVertex GetVertexAt(index)
	msVertexEx GetVertexExAt(index)
	int GetTriangleCount()
	int AddTriangle()
	mSTriangle GetTriangleAt(index)
	mSTriangleEx GetTriangleExAt(index)
	int GetVertexNormalCount()
	int AddVertexNormal()
	SetVertexNormalAt(index, (normal x, normal y, normal z))
	(normal x, normal y, normal z)  GetVertexNormalAt(index)
	SetComment(string comment)
	string GetComment()
msMaterial
	SetFlags(flags)
	int GetFlags()
	SetName(string)
	string GetName()
	SetAmbient((r, g, b, a))
	(r,g,b,a) GetAmbient
	SetDiffuse((r, g, b, a))
	(r,g,b,a) GetDiffuse
	SetSpecular((r, g, b, a))
	(r,g,b,a) GetSpecular
	SetEmissive((r, g, b, a))
	(r,g,b,a) GetEmissive
	SetShininess(float shininess)
	float GetShininess()
	SetTransparency(float Transparency)
	float GetTransparency()
	SetDiffuseTexture(string)
	string GetDiffuseTexture()
	SetAlphaTexture(string)
	string GetAlphaTexture()
	SetComment(string)
	string GetComment()
msBone
	SetFlags(flags)
	int GetFlags()
	SetName(string name)
	string GetName()
	SetParentName(string name)
	string GetParentName()
	SetPosition((x, y, z))
	(x, y, z) GetPosition()
	SetRotation((x, y, z))
	(x, y, z) GetRotation()
	int GetPositionKeyCount()
	int AddPositionKey(float time, (x, y, z))
	(float time, (x, y, z)) GetPositionKeyAt(index)
	int GetRotationKeyCount()
	int AddRotationKey(float time, (x, y, z))
	(float time, (x, y, z)) GetRotationKeyAt(index)
	SetComment(string)
	string GetComment()