RuiQi
10-05-2010, 09:12 AM
Hi forum , i have gone through Digital Tutor's Introduction to MEL and since I've had C++ and C training before, its quite easy for me to grasp the knowledge regarding MEL.
Before i proceed onto Python for MEL , there are certain doubts that i have and i hope the forum can enlighten me :)
Qn 1:
----------------------------------------------------------------
window -rtf true -title "Name " myWindow;
............
showWindow myWindow;
As taught in DT , this is the command that creates a window. I am confused at the purpose of "myWindow" .
Is there any other purpose to it other then to "showWindow myWindow" ?
-----------------------------------------------------------------
Qn 2: Lesson 10
-----------------------------------------------------------------
window -title "Name" -rtf true myControl;
rowLayout -nc 3;
button -label "Translate" -c "attrRemover t" myTransT;
button -label "Rotate" -c "attrRemover r" myTransR;
button -label "Scale" -c "attrRemover s" myTransS;
showWindow myControl;
proc attrRemover(string $myInput)
{
for($myNode in $mySelection)
setAttr -k false ($myNode + "." + $myInput + x);
setAttr -k false ($myNode + "." + $myInput + y);
setAttr -k false ($myNode + "." + $myInput + z);
}
What is the purpose of myTranstT ? From what i have tried , removing that from the code doesn't have any impact.
-----------------------------------------------------------------
Qn 3:
-----------------------------------------------------------------
Lastly , how i try to understand the program is by going through what are the INPUTS when the code is executed. However ..
string $mySelection[] = `ls -sl`
string $shads[] = `ls -mat`;
Exactly what are the inputs that go into $mySelection when this code is executed ? Just the "object" ITSELF if it is selected by the user ?
I have the same exact doubt for $shads[] ..
-----------------------------------------------------------------
I hope that wasn't too much questions from a MEL beginner :)
Please help me DT forumers :)
Before i proceed onto Python for MEL , there are certain doubts that i have and i hope the forum can enlighten me :)
Qn 1:
----------------------------------------------------------------
window -rtf true -title "Name " myWindow;
............
showWindow myWindow;
As taught in DT , this is the command that creates a window. I am confused at the purpose of "myWindow" .
Is there any other purpose to it other then to "showWindow myWindow" ?
-----------------------------------------------------------------
Qn 2: Lesson 10
-----------------------------------------------------------------
window -title "Name" -rtf true myControl;
rowLayout -nc 3;
button -label "Translate" -c "attrRemover t" myTransT;
button -label "Rotate" -c "attrRemover r" myTransR;
button -label "Scale" -c "attrRemover s" myTransS;
showWindow myControl;
proc attrRemover(string $myInput)
{
for($myNode in $mySelection)
setAttr -k false ($myNode + "." + $myInput + x);
setAttr -k false ($myNode + "." + $myInput + y);
setAttr -k false ($myNode + "." + $myInput + z);
}
What is the purpose of myTranstT ? From what i have tried , removing that from the code doesn't have any impact.
-----------------------------------------------------------------
Qn 3:
-----------------------------------------------------------------
Lastly , how i try to understand the program is by going through what are the INPUTS when the code is executed. However ..
string $mySelection[] = `ls -sl`
string $shads[] = `ls -mat`;
Exactly what are the inputs that go into $mySelection when this code is executed ? Just the "object" ITSELF if it is selected by the user ?
I have the same exact doubt for $shads[] ..
-----------------------------------------------------------------
I hope that wasn't too much questions from a MEL beginner :)
Please help me DT forumers :)