In Python, you don't put you if statements in Parentheses. So, it would
be something like this:
import maya.cmds as cmds
if cmds.file(query=True, location=True) == "unknown":
print "New File"
On 12/23/2014 2:16 AM, yann19 wrote:
I am trying to convert a mel function into python. While I am able to
do so for the rest, I am meeting with some issues in this mel code line
/*if(`file -q -loc` == "unknown")*/
I have tried something like :/
if (cmds.file(query = True, location = True)) == "unknown"
/while//it does not seems to generate any sort of errors/warning in
the editor, my function isn't popping out its dialog
Any ideas?
--
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 [email protected]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/340d2041-d475-4439-8566-c311f65c7cdb%40googlegroups.com
<https://groups.google.com/d/msgid/python_inside_maya/340d2041-d475-4439-8566-c311f65c7cdb%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
---
This email is free from viruses and malware because avast! Antivirus protection
is active.
http://www.avast.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 email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/54999776.7010506%40gmail.com.
For more options, visit https://groups.google.com/d/optout.