/*====================================
* Binds Joints to Mesh 
* Generated By: Lime - COD In Game exporter
* Copyright: Tom Crowley 2011-2013(c)
* Site: tom-crowley.co.uk
* Version: FastBind(1.1)
* How To Use: Drag & drop on to maya when model has been loaded
====================================*/

global proc cout(string $s){
	print($s + "\n");
}

global proc string MeshName(string $Mesh){
	return findRelatedSkinCluster($Mesh);
}


global proc TomMesh_0_SimpleBinder()
{
	cout("Running Simple Bind For 'TomMeshlb71Tl_0'");
	select -r TomMeshlb71Tl_0;
	select -add j_gun;
	newSkinCluster "-toSelectedBones -mi 30 -omi true -dr 5.0 -rui false";

}

global proc TomMesh_1_SimpleBinder()
{
	cout("Running Simple Bind For 'TomMeshlb71Tl_1'");
	select -r TomMeshlb71Tl_1;
	select -add magazine0_jnt;
	newSkinCluster "-toSelectedBones -mi 30 -omi true -dr 5.0 -rui false";

}

global proc TomMesh_2_SimpleBinder()
{
	cout("Running Simple Bind For 'TomMeshlb71Tl_2'");
	select -r TomMeshlb71Tl_2;
	select -add tag_foregrip;
	newSkinCluster "-toSelectedBones -mi 30 -omi true -dr 5.0 -rui false";

}

global proc TomMesh_3_SimpleBinder()
{
	cout("Running Simple Bind For 'TomMeshlb71Tl_3'");
	select -r TomMeshlb71Tl_3;
	select -add tag_sight_on;
	newSkinCluster "-toSelectedBones -mi 30 -omi true -dr 5.0 -rui false";

}

global proc TomMesh_4_SimpleBinder()
{
	cout("Running Simple Bind For 'TomMeshlb71Tl_4'");
	select -r TomMeshlb71Tl_4;
	select -add reload0_jnt;
	newSkinCluster "-toSelectedBones -mi 30 -omi true -dr 5.0 -rui false";

}

global proc TomMesh_5_SimpleBinder()
{
	cout("Running Simple Bind For 'TomMeshlb71Tl_5'");
	select -r TomMeshlb71Tl_5;
	select -add tag_sight_off;
	newSkinCluster "-toSelectedBones -mi 30 -omi true -dr 5.0 -rui false";

}

global proc TomMesh_6_SimpleBinder()
{
	cout("Running Simple Bind For 'TomMeshlb71Tl_6'");
	select -r TomMeshlb71Tl_6;
	select -add props1_jnt;
	newSkinCluster "-toSelectedBones -mi 30 -omi true -dr 5.0 -rui false";

}

global proc TomMesh_7_SimpleBinder()
{
	cout("Running Simple Bind For 'TomMeshlb71Tl_7'");
	select -r TomMeshlb71Tl_7;
	select -add props0_jnt;
	newSkinCluster "-toSelectedBones -mi 30 -omi true -dr 5.0 -rui false";

}

global proc RunSimpleBinds()
{
	// Max of single tag per a vert for whole mesh.

	catch(TomMesh_0_SimpleBinder());
	catch(TomMesh_1_SimpleBinder());
	catch(TomMesh_2_SimpleBinder());
	catch(TomMesh_3_SimpleBinder());
	catch(TomMesh_4_SimpleBinder());
	catch(TomMesh_5_SimpleBinder());
	catch(TomMesh_6_SimpleBinder());
	catch(TomMesh_7_SimpleBinder());
}

RunSimpleBinds();
cout("Finished Binding Joints..");