Discussion:
[Maya-Python] What is the correct syntax for a python call in the "pre-render frame mel "?
f***@gmail.com
2018-11-02 20:28:33 UTC
Permalink
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...
--
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_maya+***@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.
Justin Israel
2018-11-02 21:04:26 UTC
Permalink
Post by f***@gmail.com
python ("import switchTexture switchTexture.switch()")
But I got
Error: line 1: invalid syntax
Warning: line 0: Pre-Render MEL script failed...
Missing a semicolon between lines?

python("import switchTexture; switchTexture.switch()")
Post by f***@gmail.com
--
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
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.
--
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_maya+***@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.
For more options, visit https://groups.google.com/d/optout.
Francois Bonnard
2018-11-03 09:49:08 UTC
Permalink
that's it !
Post by Justin Israel
Post by f***@gmail.com
python ("import switchTexture switchTexture.switch()")
But I got
Error: line 1: invalid syntax
Warning: line 0: Pre-Render MEL script failed...
Missing a semicolon between lines?
python("import switchTexture; switchTexture.switch()")
Post by f***@gmail.com
--
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
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.
--
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
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
<https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA3uhaEYkiVLO-veU5exgKwzUk%3DwJog9i4SG2g-EKn-QVA%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
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_maya+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CACHuB%3DUY_DB%2BddSFsZ%3DCuJ-5R1%3D%2BjJP07%2BZG_TAva8K_iy4NFA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Loading...