Python error to "reset" an interactive scene

Python error to "reset" an interactive scene

brian.traughber
Contributor Contributor
459 Views
2 Replies
Message 1 of 3

Python error to "reset" an interactive scene

brian.traughber
Contributor
Contributor

I'm trying to follow a tutorial on how to create an interactive tutorial using an interactive template from the Maya learning channel. They tell me to reset the scene and test the changes I've made in the expression editor to type the following code:

cmds.stage("stage0", edit=True, activate=True)

But, when I type it to try and restart the scene, it gives me the error -> // Error: Line 1.46: Invalid use of Maya object "True"

Did they type it wrong, or did I do something wrong?

 

Edit: Added the link to the spot in the video they add the code in. Link : https://youtu.be/2ye-NowsDE4?t=569

0 Likes
Accepted solutions (1)
460 Views
2 Replies
Replies (2)
Message 2 of 3

Kahylan
Advisor
Advisor
Accepted solution

Hi!

 

The Syntax of your Error message means that you typed a Python command into the MEL command Line. Simply click on the "MEL" next to your command line to switch it to Python and vise versa.

 

For future reference, Error messages in Maya are always comments. So if your Error starts with "//" it was thrown by a MEL Script, if it starts with "#" it was thrown by Python.

 

I hope this helps!

0 Likes
Message 3 of 3

brian.traughber
Contributor
Contributor

Thank you so much. I was beating my head against the wall trying to figure out what I was doing wrong. Thank you!

0 Likes