My question is how to translate arguments and flags in the documentation into PyMel synatx. I'm confused what "f=1" means in the following code:
f=newFile(f=1) #start clean
The docs for newFile are as follows. Does f=1 correspond to the force flag=true? How do you specify the type of file?
def newFile(*args, **kwargs):
"""
Initialize the scene. Returns untitled scene with default location.
Flags:
- force:
Force an action to take place. (new, open, save, remove reference) Used with removeReference to force remove reference
namespace even if it has contents. Cannot be used with removeReference if the reference resides in the root namespace.
- type:
Set the type of this file. By default this can be any one of: "mayaAscii", "mayaBinary", "mel", "OBJ", "directory",
"plug-in", "audio", "move", "EPS", "Adobe(R) Illustrator(R)", "image" plug-ins may define their own types as well.Return
a string array of file types that match this file.
Derived from mel command `maya.cmds.file`
"""
pass
--
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/b7a28bcd-08e6-4d9e-bbc7-6856f65592d5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Brad
--
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/CABPXW4i_OjAmqB%3DF8RS-2tctPdpOmCCF4%3DQbLJiNEVMPJKCGbA%40mail.gmail.com.
Are you guys using this?
http://download.autodesk.com/global/docs/maya2013/en_us/CommandsPython/index.html
This would be the f flag.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/53958D9A.4080603%40haggi.de.
PyMel doc for exportAll()
def exportAll(exportPath, **kwargs):
"""
Export everything into a single file. Returns the name of the exported file.
Flags:
- force:
Force an action to take place. (new, open, save, remove reference) Used with removeReference to force remove reference
namespace even if it has contents. Cannot be used with removeReference if the reference resides in the root namespace.
- preserveReferences:
When used with the import/export flags this tells the importer/exporter to import/export references as references
instead of copies of those references.
- type:
Set the type of this file. By default this can be any one of: "mayaAscii", "mayaBinary", "mel", "OBJ", "directory",
"plug-in", "audio", "move", "EPS", "Adobe(R) Illustrator(R)", "image" plug-ins may define their own types as well.Return
a string array of file types that match this file.
Derived from mel command `maya.cmds.file`
"""
pass
Lookup maya.cmds.file in Pythons Command Reference to find the flag types
[force=boolean]
[preserveReferences=boolean]
[type=string]
PyMel code translation
exportAll( "exportFileName", preserveReferences=1, force=1, type="mayaAscii")
exportPath argument doesn't have a type specified anywhere, string type simply implied by argument name.