- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Now I have a difficulty because I have 2 codes that work separately, how is it possible to unite them and make only 1?
One code works to select the parts that deform the legs and arms and another code works only selecting the platforms of the feet and hands.
And the additional difficulty is that it only works with 1 object selected and not with multiple selections.
Selecting the platforms of the feet and hands.
In this form are the names of the elements to be selected.
ctrl_arm_ik_L
ctrl_arm_ik_R
ctrl_leg_ik_L
ctrl_leg_ik_R
global proc rsMirrorSelect()
{
string $rsSl[];
$rsSl = `ls -sl`;
int $numTokens;
string $rsTemp[];
$numTokens = `tokenize $rsSl[0]"_" $rsTemp`;
if($rsTemp[$numTokens-1]=="L")
{
select -r ($rsTemp[-0]+"_"+$rsTemp[1]+"_"+$rsTemp[2]+"_R");
}
else
{
select -r ($rsTemp[-0]+"_"+$rsTemp[1]+"_"+$rsTemp[2]+"_L");
}
}
rsMirrorSelect;
Select the parts that deform the legs and arms
In this form are the names of the elements to be selected.
ctrl_leg_bd_L_1
ctrl_leg_bd_L_2
ctrl_leg_bd_L_3
ctrl_arm_bd_L_1
ctrl_arm_bd_L_2
ctrl_arm_bd_L_3
global proc rsMirrorSelect()
{
string $rsSl[];
$rsSl = `ls -sl`;
int $numTokens;
string $rsTemp[];
$numTokens = `tokenize $rsSl[0]"_" $rsTemp`;
if($rsTemp[$numTokens-2]=="L")
{
select -r ($rsTemp[-0]+"_"+$rsTemp[1]+"_"+$rsTemp[2]+"_R"+"_"+$rsTemp[4]);
}
else
{
select -r ($rsTemp[-0]+"_"+$rsTemp[1]+"_"+$rsTemp[2]+"_L"+"_"+$rsTemp[4]);
}
}
rsMirrorSelect;
Original question.
https://forums.autodesk.com/t5/maya-programming/quick-script-to-switch-control-selection-to-the-oppo...
Solved! Go to Solution.