|
Hi,
Before anything else I would like to say that this is my 4th day of having a crack at MEL-script and probably need a lot more help than I’m asking for right now. But here we go…
I want to define the selected object in my scene as a variable. As far as I understand it’s done like this:
string $object = `ls -sl`;
This works so far.
My next step is to create a UI with a slider to control the translation of the object. This is what I’ve found so far.
window -title “sliderTest”;
columnLayout;
attrFieldSliderGrp -label “Translate X”
-min -10.0
-max 10.0
-fieldMinValue -100.0
-fieldMaxValue 100.0
-at “pSphere1.tx”;
showWindow;
This works great when the object name is specified but not when I use the variable $object instead. This is the error I get.
// Error: Invalid redeclaration of variable “$object” as a different type. //
I’m sure I’m doing it completely wrong and would appreciate absolutely any help I can get.
Thanks.
|