How to update variant set name from backend

Hi Team

while creating USD Contribution I want to update the variant set name value from backend instead of using {layer} I want to give a value from backend as per my condition how can I manage this I have created a custom creator in which I have added the usd contribution attaching a reference for better understanding

thanks

I think you’ll need to modify this plugin ayon-core/client/ayon_core/plugins/publish/extract_usd_layer_contributions.py at e02c268871c6c6a1f5bafe42d762850fc8777786 · ynput/ayon-core · GitHub

Also, it’d be great if you could mention a use case and maybe it can be in the official addon instead of having it in a custom addon.

Hi @mustafa_jafar

Thanks for the info but I don’t want to change or update any core functions of ayon addons. that’s why I’m creating a custom creator or addons as per my requirement.

Currently my requirement is that I want to give a list of variant set names that artist can select from those only instead of typing by artist.

For the time I’ll be storing the values in instances_data at the time of creating instance, doing this by creating a custom creator and over there I created a attribute which takes values and store it in instance_data and updating the values of USD contribution in publish attributes at the time of collection step running.

let me know if we have a better way to do it.

Thanks
Vivek Dixit

Thank you for expanding.


The code actually supports filling in tokens from instance data so having a collector to collect your values should work.


I’ve an idea but it misses one thing in core functionality, which is exposing the default variant set name. feel free to submit a PR. :wink:


The way I can imagine it:

  1. Set default variant set name in settings to something like {dont_change_this} (not available in settings atm)
  2. add an early collector that adds enum with variant set name based on your custom logic. and, it sets the {dont_change_this} instance data.
1 Like