PDA

View Full Version : [HELP] New MAYA5.0 button -command syntax?!


X-Tender
06-03-2004, 08:10 PM
hello,
after some time i've upgradet to maya 5 (yes i know that maya 6 is out ..) and now i have a problem .. in maya 4.5 the following code was possible

button -label "Button" -command("
print(var1);
print(var2);
print(var3);
");

butin maya 5 it want it this way

button -label "Button" -command("print(var1);print(var2);print(var3);");

.. why? .. it was better in 4.5 .. did i have to change my code to the new "syntax" ?! .. or is there a possibility to keep the old one?

Doogie
06-04-2004, 01:48 PM
button -label "Button" -command(" \
print(var1); \
print(var2); \
print(var3); \
");

Maya doesn't like to have it's strings broken up.

You can add a \ at the end of each line and it should work. This might be one of the changes between 4.5 and 5, but I know people have had probs breaking up strings in proir versions.

that \ trick is somewhere in the docs, but was tough to find the first time i looked for it (and i knew what i was looking for)

X-Tender
06-04-2004, 05:23 PM
:bounce: big thanx .. it works ..

CGTalk Moderation
01-18-2006, 08:00 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.