|02 February 2011||#1|
script command will not execute properly=/
I have this script I'm writing which is used to align objects/components.
global proc dag_alignMain(string $posNeg, string $axis)
So when running the command it should say:
dag_alignMain "-" "x"
However when adding this to a button in the UI i need to use the command flag as so:
-c "align - x"
But now it won't execute properly and I think I can see why. Is it because of the minus sign I use as a string variable and Maya doesn't understand this? What is the correct way of writing this?
I guess I could switch the plus and minus sign to just "pos" and "neg" but I rather would like to understand the problem and how to solve it.
|02 February 2011||#2|
Sony SCEE Liverpool
Manchester, United Kingdom
Join Date: May 2008
when you pass alpha-numeric strings in MEL you don't need to explicitly denote them as strings using "", compare:
Both of these are essentially identical and this is why we are all allowed to do stuff like this:
However, once your string is not an obvious alpha-numeric, or has any ambiguity whether it is a string or not (i.e.: 10 or -) you MUST put it in "double-quotes".
When you must do this INSIDE another literal string you have to escape them, which gets quite messy...
|02 February 2011||#4|
Join Date: Sep 2003
Thread automatically closed
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
|Thread Closed share thread|