PDA

View Full Version : Can you make some procedure arguments optional?


Leionaaad
05-06-2009, 03:43 PM
Can you make procedure arguments optional? Like you are using mel commands.
Until now, i used an if/else statement to manage something filled with "none", but this gets confusing from time to time.

claydough
05-06-2009, 09:17 PM
make your arguments an array?


global proc string[] cly_argumentTemplate ( string $arguments[] )
{
for ( $a in $arguments )
if
if
else if
else

return $arguments;
}

you still need conditions but the initial command isn't longer than needs be to the end user

ewerybody
05-07-2009, 09:21 AM
or use python! ;]

CGTalk Moderation
05-07-2009, 09:21 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.