Ah, interesting, thanks for the heads up. Another thing to watch out for is that the Qt event-loop isn't running within `mayapy` which may also cause quirks, especially if you run code that depends on it.
On 26 March 2015 at 17:33, Colas Fiszman <[email protected]> wrote: > Hi, > Take care that is some case you will not get the same results with mayapy > that in the maya gui (mostly in dynamics simulation). > If you want to be sure that you will get the same result in your batch > process that in the gui use mayabatch. > Greets, > Colas > > 2015-03-26 10:50 GMT+00:00 Marcus Ottosson <[email protected]>: > >> Glad you got it working. :) >> >> By the looks of it, batch is for running scene files without a GUI. >> >> http://knowledge.autodesk.com/support/maya/learn-explore/caas/CloudHelp/cloudhelp/2015/ENU/Maya/files/Interface-overview-Start-Maya-from-the-command-line--htm.html >> >> Assuming it’s mainly related to launching renders via the command-line. >> >> >> On 26 March 2015 at 10:40, Fabrice Altman <[email protected]> wrote: >> >>> Thanks guys! Looks like we are back in business with Mayapy! >>> As a studio who has never used Maya before, we are strugling to get up >>> to speed with the "Maya obvious" stuff ;) >>> I thought Mayabatch was the way to do this as for some reason, I thought >>> Mayapy was a 3rd party implementation, actually not the factory standalone. >>> >>> Regards from www.studioaka.co.uk >>> >>> >>> On Wed, Mar 25, 2015 at 9:28 PM, Marcus Ottosson <[email protected] >>> > wrote: >>> >>>> As someone who has never used mayabatch, what is its advantage over >>>> mayapy? >>>> >>>> This works for me. >>>> >>>> *script.py* >>>> >>>> print "OPENED!"import osimport maya.cmds as cmds >>>> import maya.standalone >>>> maya.standalone.initialize() >>>> >>>> output_path = os.path.join(os.getcwd(), "test.ma") >>>> >>>> cmds.circle(r=10, d=1, n="test_Curve", s=20,) >>>> cmds.file( rename=output_path) >>>> cmds.file( save=True, type='mayaAscii')print "SAVED!" >>>> >>>> Runs like this. >>>> >>>> $ mayapy script.py >>>> OPENED! >>>> SAVED! >>>> >>>> >>>> >>>> On 25 March 2015 at 21:19, Justin Israel <[email protected]> >>>> wrote: >>>> >>>>> >>>>> >>>>> On Thu, Mar 26, 2015 at 9:21 AM Fabrice Altman <[email protected]> >>>>> wrote: >>>>> >>>>>> >>>>>> On 25 Mar 2015 20:11, "Justin Israel" <[email protected]> wrote: >>>>>> > >>>>>> > >>>>>> > >>>>>> > On Thu, Mar 26, 2015 at 8:23 AM Fabrice Altman <[email protected]> >>>>>> wrote: >>>>>> >> >>>>>> >> Hi, >>>>>> >> >>>>>> >> we have a simple python script that runs totally fine in Maya GUI >>>>>> but breaks and crashes Maya GUI. >>>>>> > >>>>>> > >>>>>> > Do you mean that it breaks in Maya batch? >>>>>> > >>>>>> >>>>>> Yes. The script runs but is not able to move locators it generates so >>>>>> we end up erroring down the line. >>>>>> But even running this simple create and save snipet proves >>>>>> problematic. >>>>>> >>>>>> >> >>>>>> >> The script simply moves a bunch of locators to points on a curve. >>>>>> >> >>>>>> >> Being Maya newbies (ex Softies) we must be missing something major >>>>>> so apologies in advance. >>>>>> >> >>>>>> >> To simplify, the snippet bellow drwas a circle an saves the scene. >>>>>> Why is this not even working in Mayabatch 2015 Ext1 SP5?? >>>>>> >> >>>>>> >> print "OPENED!" >>>>>> >> import maya.cmds as cmds >>>>>> >> cmds.circle(r=10, d=1, n="test_Curve", s=20,) >>>>>> >> cmds.file( rename='\\\\AKAAPPS\\Maya_Workgroups\\Tools\\test.ma') >>>>>> >> cmds.file( save=True, type='mayaAscii') >>>>>> >> print "SAVED!" >>>>>> >> >>>>>> > >>>>>> > Did you first import maya.standalone and initialize it? >>>>>> > >>>>>> >>>>>> No... The script is just started via Mel command : Python >>>>>> executefile file.py. >>>>>> Please send snipet on how to import Maya.standalone and initialise :) >>>>>> >>>>> >>>>> Sorry, I was thinking of mayapy, not Mayabatch. What kind of errors do >>>>> you get? >>>>> >>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >> >>>>>> >> Any ideas much appreciated! >>>>>> >> >>>>>> >> 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/bb722f49-fab0-45c0-9dd1-f7bac2891d4f%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/aa2cuj2M1Yk/unsubscribe >>>>>> . >>>>>> > To unsubscribe from this group and all its topics, send an email to >>>>>> [email protected]. >>>>>> > To view this discussion on the web visit >>>>>> https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0Us%3DgGFNso1Gr70W2XZYCkfyk6apEOZdjsfG1esrJGng%40mail.gmail.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/CAFFG8Y5hQw36EY5S04UFrxbKDbq5gHi8ZwAsxabdt9o6uF0VsA%40mail.gmail.com >>>>>> <https://groups.google.com/d/msgid/python_inside_maya/CAFFG8Y5hQw36EY5S04UFrxbKDbq5gHi8ZwAsxabdt9o6uF0VsA%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 [email protected]. >>>>> To view this discussion on the web visit >>>>> https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0-%3DFB8NF2J8xUtMPLgLJM9TSmj6%2Bw17T83Bg-OTZeZNQ%40mail.gmail.com >>>>> <https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0-%3DFB8NF2J8xUtMPLgLJM9TSmj6%2Bw17T83Bg-OTZeZNQ%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>>> . >>>>> >>>>> For more options, visit https://groups.google.com/d/optout. >>>>> >>>> >>>> >>>> >>>> -- >>>> *Marcus Ottosson* >>>> [email protected] >>>> >>>> -- >>>> 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/aa2cuj2M1Yk/unsubscribe >>>> . >>>> To unsubscribe from this group and all its topics, send an email to >>>> [email protected]. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOBk-W6jSC5kw12VOCTm3aAVS6Zyo0rjgg9RrWTG8WUCmw%40mail.gmail.com >>>> <https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOBk-W6jSC5kw12VOCTm3aAVS6Zyo0rjgg9RrWTG8WUCmw%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 [email protected]. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/python_inside_maya/CAFFG8Y6FAPmCBdVmrMPDLjmsHLJwyuk1%3DXRSR%2BACgHoRa%3DjmhA%40mail.gmail.com >>> <https://groups.google.com/d/msgid/python_inside_maya/CAFFG8Y6FAPmCBdVmrMPDLjmsHLJwyuk1%3DXRSR%2BACgHoRa%3DjmhA%40mail.gmail.com?utm_medium=email&utm_source=footer> >>> . >>> >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> >> >> -- >> *Marcus Ottosson* >> [email protected] >> >> -- >> 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/CAFRtmOAjuAw98q2TiQkybfS1ycS-H8-2q-EjU5zBR10y9eS8RQ%40mail.gmail.com >> <https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOAjuAw98q2TiQkybfS1ycS-H8-2q-EjU5zBR10y9eS8RQ%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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/python_inside_maya/CABwp0vO8hANSd8TqqTUN3fRCmAfQORNv_3THbD8QJu_a2x%3DcCA%40mail.gmail.com > <https://groups.google.com/d/msgid/python_inside_maya/CABwp0vO8hANSd8TqqTUN3fRCmAfQORNv_3THbD8QJu_a2x%3DcCA%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- *Marcus Ottosson* [email protected] -- 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/CAFRtmOD7w5T2tzmvtxh7XLmYtkW8SR24ocw4TgwZ_OAJCkwGtA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
