2

I am submitting Maya jobs to Deadline via a script where I pass the two job files (maya_deadline_job.job and maya_deadline_info.job) as arguments to deadlinecommand.exe.

I need to make sure I am Submitting the Maya Scene File. Is there any way to include this in any of the job files or using a python script?

  • You need to copy it to the directory for jobs, I don't remember now where was it exactly, so just copy or create a soft link in that directory to the maya file. I recommend using a custom python plugin for rendering. – Netwave Nov 07 '18 at 09:57

2 Answers2

1

If you would like to link to your scene file, then as DrWeeny showed, use the SceneFile option to provide a path.

If you would actually like to send the file to Deadline, then pass it as another argument, and set SceneFile to the scene name itself, eg. MyScene.ma.

deadlinecommand.exe maya_deadline_job.job maya_deadline_info.job "path/to/MyScene.ma"
Peter
  • 2,153
  • 2
  • 20
  • 34
0

maya_deadline_job.job is a file containing something like this :

Animation=1
Renderer=vray
UsingRenderLayers=1
RenderLayer=Background
RenderHalfFrames=0
LocalRendering=0
StrictErrorChecking=1
MaxProcessors=0
VRayAutoMemoryEnabled=0
VRayAutoMemoryBuffer=500
Version=2013 x64
Build=64bit
ProjectPath=path/projectName/seqXX/sceneXXX
ImageWidth=1920
ImageHeight=1080
OutputFilePath=path/projectname/render_out_sceneXXX/
OutputFilePrefix=<Scene>/<Layer>/<Scene>.<Layer>.
Camera=render_cam
SceneFile=path/projectName/seqXX/sceneXXX/sceneName.ma
IgnoreError211=0

so you can parse your file and change the path with python, i.e.:

filename = '/path/maya_deadline_job.job'
file_out=''
with open(filename,'r') as fh:
    all_lines = fh.readlines()
    for line in all_lines:
        if 'SceneFile=' in line:
            file_out.append('SceneFile=mynewpath')
        elif...
        else:
            file_out.append(line)
    fh.write(file_out)
DrWeeny
  • 2,302
  • 1
  • 11
  • 16
  • Thanks DrWeeny for your answer. However, how do I submit the Maya Scene File. I was hoping this could be added to the maya_info_job.job Something like this: ExtraInfoKeyValue0=auxOutput=path/projectName/seqXX/sceneXXX/sceneName.ma ExtraInfoKeyValue1=originalID=XXXXXXXXXXXXXX – Marlon Viera Nov 07 '18 at 14:01
  • in my answer, you modify the maya_info_job.job to submit it to deadline. on my pipeline I was duplicating these files and manipulate them with some python and finally sumbit it to deadline with subprocess – DrWeeny Nov 07 '18 at 14:07