View Full Version : set multiplyDivide node operations when created

Random Sime
05 May 2006, 04:59 AM
I have created my multiplyDivide node with this code that sets its operation to 'divide':

shadingNode -asUtility multiplyDivide -n "multDiv1";
setAttr multDiv1.operation 2;

Is there a way to set the operation of the multiplyDivide to 'divide' within the shadingNode command that created it?

05 May 2006, 05:58 AM
i dont think so...

you may want to use this instead though (as your script will fail if "multDiv1" already exists)

string $newMulti = `shadingNode -asUtility multiplyDivide -n "multDiv1"`;
setAttr ($newMulti + ".operation") 2;


Random Sime
05 May 2006, 09:45 AM
Thanks! That solved the problem :applause:

CGTalk Moderation
05 May 2006, 09:45 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.