Rez with Maya Plugin

Hi all,

I’ve been setting up Rez in a small studio and have run into an issue with MayaBatch Jobs. We have Rez installed on all machines, in the Path, and configured. We have been able to send Nuke, Python, and Houdini jobs from Rez environments with both the Deadline Bin tools and through the webservice. They pick up, run the rez.exe resolve command with the plugin executable after and render fine. However, every MayaBatch job we send completely ignores the “DEADLINE_REZ_TOOLS” and “DEADLINE_REZ_REQUEST_PACKAGES” in the Job Extra Info and tries to render without rez. Are there extra steps that need to be taken to have Maya render in deadline using Rez packages? Is the only thing needed to run Rez for a Deadline job really just those two Deadline_rez extra info key values? I gather it might be inside the DeadlinePlugin dll files but is there anywhere outside of that which sheds more light on how rez is being implemented in job startup that I can investigate?

Thanks!

When you were going through the steps for setting up Rez did you do step #3 for Maya and Mayabatch in the Monitor under Tools → Configure Plugins?

Those two extra info entries are all that’s needed for any application plugin to kick off using rez. This is also assuming you don’t have a customized MayaBatch plugin that predates the addition of the rez event plugin.

Thanks for the reply. Currently we are not using the tools part of rez(no packages define tools and we have no tool suites). Thus our ExtraJobInfoKeyValue for deadline_rez_tools only includes “rez”. As I mentioned this works for many other plugin types from ffmpeg to nuke but not maya. I was under the impression tools were an optional part of setup as the deadline docs say “if no Rez tool is found then it searches the executable list in order, as usual.”. Assuming it simply prepends rez env to the full job command and uses one of the executable listed in the plugin. Are tools a Required part of setup and our other plugins have been running as a kind of fluke?

So you didn’t set anything up under configure plugins? All the setup details are in that documentation page. The DCC you’re using should be appearing in the deadline_rez_tools job extra info entry. I don’t know Rez well enough to comment on how or why your setup is working as-is.

It could be that you’ve only tested with simple plugins and now using an advanced plugin you’re hitting a wall?

Double check the setup steps and let me know!

So I wanted to test on something I knew was working and so I’ll be testing on our Nuke plugin which is working without any tools or plugin changes. I took a look at the linked doc and did 3 things:

  1. Added “nuke12.2” to the executable list in the plugin as per the documentation step 3.
  2. I created a “nuke12.2” tool in the rez package we are using for Nuke.
  3. I added the nuke12.2 tool to a suite of tools and added them to path of the worker machine as per rez docs.

I then tested it was working by running the command “nuke12.2” and it recognized the nuke tool, created the rez environment, and launched nuke.

Now when I send to the farm my deadline_rez_tools shows “rez nuke12.2” as expected. The job starts, selects “nuke12.2” as the executable use but then says it “is not rooted, and does not exist in the current directory or in the PATH”. Odd since it most certainly is in PATH which I confirmed 3 ways:

  1. Ran a python job that prints the environment on the same worker and the path to the rez tools suite bin folder containing “nuke12.2” is there in path.
  2. I used the “remote control”->“Execute Command…” function in deadline monitor to execute a command on the worker: “cmd /c where nuke12.2” it finds the full path to the nuke command file in the rez tool suite.
  3. Launching a command prompt on the worker machine using the same user account and typing “nuke” executes the rez tool and nuke starts in a resolved rez environment as expected.

I tried changing the tool name to just “nuke” in all places and got the same results. So I guess what I am wondering about now is

  1. Why can’t deadline see the “nuke12.2” tool in path even though every other method including having the worker run the command directly sees the file?
  2. Why do the deadline docs you linked say:

The Worker then invokes the rez-env binary executable as a inline prefix command to the render command: rez-env DEADLINE_REZ_REQUEST_PACKAGES -- $RENDERER $RENDER_ARGUMENTS

if we are supposed to use rez tools? A Rez tool file is an executable cmd file which already creates the requested environment making the rez-env prefix redundant. In our nuke, python, ffmpeg jobs without tools setup deadline has been doing exactly what the docs say. prefixing the executable with the rez-env call and packages thus creating the environment and running the excitable in it. So I am confused where tools come in to the picture if deadline is already doing everything required to launch a DCC in a rez environment. Are these two different rez implementations depending on plugin type “simple” or “advanced” as you’ve said?

Sorry for the wall of text. Hopefully it all made sense. We are on 10.2.0.10 if that helps. Thanks for reading.

No worries, complicated problems lead to long responses. I’m not as familiar with Rez as I’d like to be so I’ve got to talk to the more knowledgeable folks on team to get a better answer.

In the meantime as I understand it now, we should be pulling in the rez tool file you’ve made (named nuke12.2) that would be pointing to the Nuke executable.

What do you see at the start of the error that ends with “is not rooted, and does not exist in the current directory or in the PATH”? The string ahead of that should be the path it’s attempting to use. That should mean that when attempting get the executable nothing was found but once the Rez event plugin has been enabled it gets a little more complicated. What’s in your DEADLINE_REZ_REQUEST_PACKAGES on the job? If we can be certain the job isn’t incorrect or amiss I’ll be able to ask better questions to our local experts. :slight_smile:

Thanks!

Okay so after some experimentation I’ve made a bit of progress. It can’t find the tools in path because it is looking for full filename including extension. So when I have a rez tool called “nuke12.2” deadline is searching for exactly that and doesn’t see “nuke12.2.cmd” even though it is in path. I changed both the tool name in the extra job info AND in the nuke plugin list to include “.cmd” and it now finds it in PATH and tries to run it. This leads to many other problems with how rez tools actually work but the “not rooted” issue is solved at least.

I’m still confused on the whole tool setup though. If I put “blender” into the plugin executable list like in the documentation step 3 is that supposed to find blender’s executable OR the Rez tool(the command file) that launches blender in a rez environment? If it is the DCC executable then where does rez come in since it would just launch blender without rez? If it is the second one how would I have both “blender” the rez tool, and “blender” the DCC executable in path and have deadline not just always pick the first one and never get to the other?

I think we are going to ignore step 3 and just hack in the rez packages for the one plugin that isn’t working out of the box, mayabatch. I’ll ask around the Rez community if anyone has had success with rez tools and deadline on windows and if so see how they’ve structured it. Thanks for you help. I appreciate it.