It *should* be dumping out some kind of useful error, if you can post that might help? There's possibly a few things exploding but it's hard to tell without more context (along with how you're invoking mayabatch)
Just taking a stab in the dark though, you maaaay want to be using mayapy.exe (vs mayabatch), and make sure you do the init sequence. (see: http://knowledge.autodesk.com/support/maya/learn-explore/caas/CloudHelp/cloudhelp/2015/ENU/Maya/files/Python-Python-from-an-external-interpreter-htm.html ) so in my case, i'd invoke things as follows: .\mayapy E:\fish.py # with contents of e:\fish.py being: import maya.standalone maya.standalone.initialize( name='python' ) import maya.cmds as cmds cmds.sphere() cmds.file( rename=r'e:\fish.ma') cmds.file( save=True, type='mayaAscii') print "SAVED!" On Thu, Mar 26, 2015, at 05:46 AM, [email protected] wrote: > Hi, > > we have a Python script that works fine in Maya.exe GUI but breaks at > multiple points in Mayabatch. > The script itself is not very complicated, it moves a bunch of locators > to points on a curve. > > New to Maya (ex Softies), we must be missing something major. > > To simplify, bellow is a snippet that tries to save a scene after > creating a circle in it. This actually crashes Mayabatch 2015 Ext 1 Sp5. > Why oh why?? > > print "OPENED!" > import maya.cmds as cmds > cmds.circle(r=10, d=1, n="test_Curve", s=20,) > cmds.file( rename='\\\\MyServer\\Maya_Tests\\Tools\\test.ma') > cmds.file( save=True, type='mayaAscii') > print "SAVED!" > > Any ideas? > > Cheers, > F. > > -- > 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/fdaf7e2c-200a-4a92-8737-63f4247c9758%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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/1427420933.2105811.245837657.6465ACE3%40webmail.messagingengine.com. For more options, visit https://groups.google.com/d/optout.
