Search code examples
pythonmaya

Python script running in one system will perform the result in another system


I am trying to write a python script which when executes will open a Maya file in another computer and creates its playblast there. Is this possible? Also I would like to add one more thing that the systems I use are all Windows. Thanks


Solution

  • Yes it is possible, i do this all the time on several computers. First you need to access the computer. This has been answered. Then call maya from within your shell as follows:

    maya -command myblast -file filetoblast.ma
    

    you will need myblast.mel somewhere in your script path

    myblast.mel:

    global proc myblast(){
        playblast -widthHeight 1920 1080 -percent 100 
                  -fmt "movie" -v 0 -f (`file -q -sn`+".avi"); 
        evalDeferred("quit -f");
    }
    

    Configure what you need in this file such as shading options etc. Please note calling Maya GUI uses up one license and playblast need that GUI (you could shave some seconds by not doing the default GUI)