Fusedgore
02-05-2010, 09:15 AM
Ok here goes .I got tired of adding attributes manually because I am a super lazy dude and it takes so much time to do .So I coded a script after watching the Artitst guide to MEl so I could make it easier on myself .I dont mind having to press a button to add the attributes to the control curves of the rig .This only adds the basics for Left Foot,Right Foot,Left Hand ,Right Hand .They are mean to be 4 different Mel buttons with icons I have made also .
If someone would want the scripts just Pm me and I can email them
Here is one of the MEL scripts ,it is the one for Right Foot Attributes.
/* Script Addon Coded By ™Shaun Keenan
This is meant to be an addon to the script
coded by Sin that creates rig controllers
This is meant to add attributes to the controls for
the hand and feet main curves so that you
dont have to manually add them later on down the road .
*/
//For any object selected this will add attributes
string $sel[] = `ls-sl`;
for ($eachObj in $sel)
{
rename $sel RFoot_Controls;
//Adding Attributes
addAttr
-longName RFootControls
-defaultValue 0
-minValue 0
-maxValue 0
-keyable true;
// This Locks and Highlights the Control
setAttr RFoot_Controls.RFootControls -lock true;
//-----------------------------------------------------------
addAttr
-longName RF_ToePivot
-defaultValue 0
-minValue -10
-maxValue 10
-keyable true;
//-------------------------------------------------------
addAttr
-longName RF_HeelPivot
-defaultValue 0
-minValue -10
-maxValue 10
-keyable true;
//-------------------------------------------------------
addAttr
-longName RF_FootBreak
-defaultValue 0
-minValue -10
-maxValue 10
-keyable true;
//-------------------------------------------------------
addAttr
-longName RF_FootRoll
-defaultValue 0
-minValue -10
-maxValue 10
-keyable true;
//-------------------------------------------------------
addAttr
-longName RF_HeelRoll
-defaultValue 0
-minValue -10
-maxValue 10
-keyable true;
//-------------------------------------------------------
addAttr
-longName RF_ToeFlop
-defaultValue 0
-minValue -10
-maxValue 10
-keyable true;
//----------------------------------------------------------
//Script to hide rotate ,translate and scale
string $cur_object[] = `ls-sl`;
setAttr -keyable false ($cur_object[0] + ".sx");
setAttr -keyable false ($cur_object[0] + ".sy");
setAttr -keyable false ($cur_object[0] + ".sz");
setAttr -keyable false ($cur_object[0] + ".tx");
setAttr -keyable false ($cur_object[0] + ".ty");
setAttr -keyable false ($cur_object[0] + ".tz");
setAttr -keyable false ($cur_object[0] + ".rx");
setAttr -keyable false ($cur_object[0] + ".ry");
setAttr -keyable false ($cur_object[0] + ".rz");
print ("All Attributes Added/locked Translate,Rotate/Scale");
}
If someone would want the scripts just Pm me and I can email them
Here is one of the MEL scripts ,it is the one for Right Foot Attributes.
/* Script Addon Coded By ™Shaun Keenan
This is meant to be an addon to the script
coded by Sin that creates rig controllers
This is meant to add attributes to the controls for
the hand and feet main curves so that you
dont have to manually add them later on down the road .
*/
//For any object selected this will add attributes
string $sel[] = `ls-sl`;
for ($eachObj in $sel)
{
rename $sel RFoot_Controls;
//Adding Attributes
addAttr
-longName RFootControls
-defaultValue 0
-minValue 0
-maxValue 0
-keyable true;
// This Locks and Highlights the Control
setAttr RFoot_Controls.RFootControls -lock true;
//-----------------------------------------------------------
addAttr
-longName RF_ToePivot
-defaultValue 0
-minValue -10
-maxValue 10
-keyable true;
//-------------------------------------------------------
addAttr
-longName RF_HeelPivot
-defaultValue 0
-minValue -10
-maxValue 10
-keyable true;
//-------------------------------------------------------
addAttr
-longName RF_FootBreak
-defaultValue 0
-minValue -10
-maxValue 10
-keyable true;
//-------------------------------------------------------
addAttr
-longName RF_FootRoll
-defaultValue 0
-minValue -10
-maxValue 10
-keyable true;
//-------------------------------------------------------
addAttr
-longName RF_HeelRoll
-defaultValue 0
-minValue -10
-maxValue 10
-keyable true;
//-------------------------------------------------------
addAttr
-longName RF_ToeFlop
-defaultValue 0
-minValue -10
-maxValue 10
-keyable true;
//----------------------------------------------------------
//Script to hide rotate ,translate and scale
string $cur_object[] = `ls-sl`;
setAttr -keyable false ($cur_object[0] + ".sx");
setAttr -keyable false ($cur_object[0] + ".sy");
setAttr -keyable false ($cur_object[0] + ".sz");
setAttr -keyable false ($cur_object[0] + ".tx");
setAttr -keyable false ($cur_object[0] + ".ty");
setAttr -keyable false ($cur_object[0] + ".tz");
setAttr -keyable false ($cur_object[0] + ".rx");
setAttr -keyable false ($cur_object[0] + ".ry");
setAttr -keyable false ($cur_object[0] + ".rz");
print ("All Attributes Added/locked Translate,Rotate/Scale");
}