What is the correct syntax for a python call in the "pre-render frame mel "?

25 views
Skip to first unread message

francois...@gmail.com

unread,
Nov 2, 2018, 4:28:36 PM11/2/18
to Python Programming for Autodesk Maya
I thought it was something like :

python ("import switchTexture switchTexture.switch()")

assuming that my python file was switchTexture.py and inside this file, it starts with :

def switch():

But I got

Error: line 1: invalid syntax
Warning: line 0: Pre-Render MEL script failed...

Justin Israel

unread,
Nov 2, 2018, 5:04:43 PM11/2/18
to python_in...@googlegroups.com
Missing a semicolon between lines? 

python("import switchTexture; switchTexture.switch()")


--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/ea5bbcb4-9240-4abe-ad54-f25cb0ea1fdb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Francois Bonnard

unread,
Nov 3, 2018, 5:49:29 AM11/3/18
to python_in...@googlegroups.com
that's it !

You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/ZThWNd6owWc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA3uhaEYkiVLO-veU5exgKwzUk%3DwJog9i4SG2g-EKn-QVA%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages