View Full Version : input access

03 March 2009, 06:50 PM
so i make a cube name it ect.

when u name it u name the object but not its inputs

polyCube -w 1 -h 1 -d 1 -n "$queryTextField";

how doo i name the inout as it stays as polyCube.
i want to gain access to the width ect after creation

03 March 2009, 08:34 PM

You could use something like this. Using backticks will return the results of the command. Stuff those results in an array, and you can access the create node regardless of a name change of the transform node.

string $queryTextField = "myCube";

string $cube[] = `polyCube -w 1 -h 1 -d 1 -n $queryTextField`;

setAttr ($cube[1] + ".width") 2;
setAttr ($cube[1] + ".height") 2;
setAttr ($cube[1] + ".depth") 2;

Good luck!


CGTalk Moderation
03 March 2009, 08:34 PM
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.