mel command ('rendersequence;') is not working whille trying to open maya from command line

mel command ('rendersequence;') is not working whille trying to open maya from command line

kartikey_s
Community Visitor Community Visitor
894 Views
1 Reply
Message 1 of 2

mel command ('rendersequence;') is not working whille trying to open maya from command line

kartikey_s
Community Visitor
Community Visitor
So basically I am trying to open maya from command line using subprocess in python and executing a python script (.py) file like below:

 

command = [
        "C:/Program Files/Autodesk/Maya2020/bin/maya.exe",
        '-command',
        'python("exec('python script path")'
    ]

 

 

from my script everything is working fine like maya is opening and as well the file except one command for example:



mel.eval('renderSequenceOptionsWindow;')
mel.eval('optionMenuGrp -e -v "{}" renderSequenceCameraList;'.format(facial_cam_node))
mel.eval('renderSequenceCurrentCameraChanged();')
mel.eval('renderSequence;')

 

 
I have these commands first three are working fine except the last one , the issue is I am not getting an error as well, its like Maya is not even considering this command from the script.

 

- Here <facial_cam_node> is the camera I'll be using to render images.
 
And the weird part is on the same opened Maya session ( which I opened from command line), when I am running this command back again in script editor then its rendering as well, its just not happening in the automated workflow.
 
Any help would be great thanks
0 Likes
895 Views
1 Reply
Reply (1)
Message 2 of 2

16497643852
Contributor
Contributor

Hello @kartikey_s ,

Hope you are doing fine.

 

Topic 1

How to launch maya from command line?

to open maya from command line kindly follow the below page, good practice is mentioned in the maya docs

https://help.autodesk.com/view/MAYAUL/2024/ENU/?guid=GUID-2E5D1D43-DC3D-4CB2-9A35-757598220F22

 

Topic 2

you mentioned the last command is not working,

It works if you mention it in the scene file, but not in the automated way

Sorry but can you mention you automated way? - is it userSetup.py? or scriptJob? or any other technique that you are using

 

Topic 1 should help you get log while launching maya from command line, kindly give it a try and let us know.

 

Thank You.

0 Likes