View Full Version : what does "%node" mean?
caspermel 05-17-2007, 07:41 AM Hi,
In some of the commands in the script editor produced by the user manipulated things I found out that %node statement?
Does any of you mean what that %node mean, something like current node may be?
Thanks
Melis :)
|
|
grantimus
05-18-2007, 09:37 PM
In MEL, and most other scripting/programming languages, "%" is the modulus operator. It returns the remainder of a division. For example 7 % 3 would return 1, this is because 7/3 is two with a remainder of 1. 8 % 4 = 0, 7 % 4 = 3, and so on.
It should also be noted that it works with float values, not just integers. For example, 78.4 % 2.3 = 0.2.
It is something you might not need to use that often, but it sure does come in handy when you do.
kjaft
05-21-2007, 09:35 AM
In this case this is no modulo operator. %node acts as a placeholder. I came in touch with this once writing a script that deals with shading nodes. Take a look into the createRenderNode.mel (located in mayaX.X/scripts/others) to get an idea how this is used.
felix
CGTalk Moderation
05-21-2007, 09:35 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.
vBulletin v3.0.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.