for the most part if you see an argument in maya.cmds as as someArg=1 then you can try it with someArg=True to see if it works.
try this for your newFile example. f means don't bother to ask the user if they want to save the file. force unload it and start fresh. import pymel.core as pm f = pm.newFile(f=True) pymel didn't want to collide with the existing "file" built-in in python. maya.cmds.file is wrapped On Sun, Jun 8, 2014 at 10:26 PM, <bradleynew...@gmail.com> wrote: > I'm following the "Getting Started with PyMel" docs here: > http://download.autodesk.com/us/maya/2011help/PyMel/tutorial.html#an-intro-to-pymel-objects-in-maya > > 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_maya+unsubscr...@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. > -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CABPXW4h-xiLqXsuH_zYrNfr5vbnht-4WEGFMcBHfNWhRDCTAYA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.