Maya: Templates Improvements

Goal
To improve working with templates.

Motivation
Current implementation uses locator placeholders for loading containers into a scene when building the workfile. This however does not allow to work very much with the data in the containers.

Implementation
Here are some suggestions to improve on the templating workflow:

  • Tag loaded containers as placeholders.
    • Allows to work with the container data to setup anything.
    • Existing data from the loaded containers can prefill the placeholder metadata.
    • When building the workfile, the loaded containers “just” switch to a different subset/version. This is a similar workflow as reusing a shot setup.
  • Publish workfile to project_settings/maya/templated_workfile_build/profiles.
    • This would encourage versioning of the template.
    • When creating the template instance, we can expose the variables from the settings like task types/names etc.

Sounds good to me.

So if I get it correctly…this means there would be new product called Template workfile and user be able to publish as asset basically. Right?

So when using Loader user could just locate proper Template file and trigger user action via right clicking Build workfile from template. How about that?

If so, maybe there should be predefined locations for those templates by defaults so user doesnt need to create those asset manually for each project?

I didnt actually think of that, but this might be a good approach. Initially I was just thinking of pushing an update to the settings.

Could you elaborate on this?

That doesn’t take into account that single placeholder could load multiple subsets or representations by default. A single locator could load five pointcaches for example.

Another downside is to build the template it’d require to at least already have “temp” published placeholders to load to begin with (e.g. a cube for pointcache).

I’m not sure this is the best way forward - I can see how it makes some things more trivial but I have a feeling it’s less flexible to building dynamic workfile templates.

Actually, I just created an issue about that yesterday! So I’m all for it, :+1:

That could be something for later - first step I think would be to allow using workfile templates from publishes instead.

Good point. Thinking that when using loaded content as placeholders, only that loaded content will be switched. The idea being that you’d need to load in how many pointcache you need and work with that data. At the moment we cant do any setup with the pointcaches within the template workfile cause we dont have the data.
Its a different approach to placeholders and I think they can live in harmony.

Actually you could maybe allow for multiple representations with loaded content. Any edits to the loaded content would be transferred onto the other representations.

Could you elaborate on what kind of “setup” you’d like to do?

For example you might want to load in a pointcache into an FX setup and further connect the pointcache to other things in a Maya scene. Or assign a look to the pointcache.
Actually maybe its a matter of looking towards the new iteration of the “look” assigner, where we’ll need “Connector” plugins.

Would love to hear @ClementHector input on this :slight_smile:

I think this is similar to this discusion

If it’s just for this use case, I can tell you how we handle it now. We have a custom loader that extends the basic openpype loader, like the loader for the look, we have a custom look loader that automatically applies the look to the model.
But it’s not the best solution, that’s why I wrote this issue and we will work on it soon. Can you tell me your feedback on this, please :wink: and if it’s solves all your issues.

I created a topic for the action in template builder :slight_smile:

Had another idea for creating placeholders. We could have a Loader action that’ll create a placeholder from the selected context, users could then modify the placeholder data further from that to make it less explicit.

1 Like