Ayon's Asset Maya API support

Hi there,

I’m trying to automate the process of creating the USD lookdev setup in Maya, since our artists mentioned it’s too convoluted and involves too many manual steps.

Is there a way to load an asset given a specific representation and folder name using Ayon’s Maya API? I’m asking it not only because the usd lookdev request, I’m asking that because it would be important to any kind of asset automation that would need to do.

I noticed there are several loaders under ayon_maya/client/plugins, but from what I understand, they require something to construct the loader class — I couldn’t just import the file and use the class directly.

Could someone share a code snippet showing how to load assets programmatically?

(Also, I’m not entirely sure if this post belongs under Ideas — maybe it could be considered a feature request if Ayon doesn’t support this yet.)

Hello,
Your question can be split in two topics:

  1. How to automate the process of creating the USD lookdev setup in Maya, since our artists mentioned it’s too convoluted and involves too many manual steps.
  2. how to load published products programmatically?

I’ve this is a simple example for loading from code programmatically.
It has a simple input: project_name, folder_path, product_name, version, representation_name and loader_name

This code was stolen inspired by Load placeholder and Houdini’s HDA utils (the code behind generic loader).