PDA

View Full Version : New to Mel and need your help!


mttjss
03-14-2005, 02:11 AM
I am trying to write a simple script that is for class.

basically I want to create and object(sphere) and then be able to check it to have it either selected or not selected.
then once it is selected I want to be able to adjust the translation in one direction.

right now I can create the sphere and deselect it, but I cant select it and I cant adjust its translatation.

Where did I go wrong?

// Matthew E. Johnson

// Mel Scripting

// 3D Studio II

window -menuBar true -t "Eyeball Creator" -wh 800 400;

columnLayout;

string $button = `button -l "Create Eyeball" -c "sphere"`;

text -l "";

separator -w 400;

text -l "";

text -l "Eye Translations";

checkBox -l""

-onCommand "-r nurbsSphere1.tx;"

-offCommand "select -cl;";

attrFieldSliderGrp -l "Eye Translate X"

-min -10 -max 10;

showWindow;

john_homer
03-14-2005, 05:46 AM
it wont select because your onCommand is "-r nurbsSphere1.tx;".

thats not a command.. it should be select -r nurbsSphere1.

the sphere does not move because you didn't tell it an attribute.. at all.

the one below works...

.j


window -menuBar true -t "Eyeball Creator" -wh 800 400;

columnLayout;

string $button = `button -l "Create Eyeball" -c "sphere"`;

text -l "";

separator -w 400;

text -l "";

text -l "Eye Translations";

checkBox -l""

-onCommand "select -r nurbsSphere1;"

-offCommand "select -cl;";

attrFieldSliderGrp -l "Eye Translate X"

-min -10 -max 10 -at "nurbsSphere1.tx";

showWindow;

CGTalk Moderation
03-14-2005, 05:46 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.