heres the code i have so far:
global proc resortSel()
{
string $userSel[] = `ls -sl`;
for ($each in $userSel)
{
reorder -b $each;
}
sort $userSel;
}
window -title "Outliner Tools" -width 250 -height 200;
columnLayout -adjustableColumn true;
button
-label "Move to First"
-command "reorder -front;";
button
-label "Move to Last"
-command "reorder -back;";
button
-label "Move Up"
-command "reorder -relative 1;";
button
-label "Move Down"
-command "reorder -relative -1;";
button
-label "Reorder base on Selection";
-command "resortSel;";
showWindow;
When I run this code, I get this
// Error: -command "resortSel;";
//
// Error: Syntax error //
Can anyone please point out what I did wrong and how to fix. Thank you
Replies
Also, you don't need to specify the semicolon inside the command quote (" ") if you are only calling one function. This would help you read a bit better your script and avoid any confusion.
or run the radioButtonGrp command in edit mode and use the -select flag if you want to do it after the control is defined.
would select the first radioButton on creation.
new question: is it possible to find where a node is located in Outliner, like the number order? I have search through all the maya command reference and have found nothing in regards to that.