Shotgrid Integration addon

Alright. Thank you for your reply. So I guess the best way to get around that would be with some hardcoded parts inside the project anatomy, right?

I am assuming you mean SG to AYON direction of the sync, in that case, no matter what you define in AYON, the SG hierarchy would be respected and it would most likely ignore your paths, feel free to add images or maybe “tree” of the hierarchies (in both AYON and SG) that you want and I might be able to help further.

I think this post is related to the post’s topic.

Hello everyone,

Targeting a specific folder in Ayon according to the sg_type/sg_asset_type field is indeed a much needed feature :heart_eyes:
I did that in the past few days, its working quite nicely and gets along the Asset Category feature seamlessly.

There’s a new folder type you need to add TargetFolder
and a new attribute targetFolder
(Not the best names, do you guys have suggestions ?)

Here is a screen, new Episode / Sequence / AssetCategory from Shotgrid will be parented to the desired TargetFolder:

note: Sequences are not under Episodes because I let the hierarchy flat in Shotgrid.

If your project’s tracking settings say otherwise, they will appear under the right entity (if properly provided)
(ex: Episode > Sequence > Shot) :


I tested with the Sync Project and the ShotgridLeecher service via Ash.


Rules :

The new TargetFolder type will be added automatically if it does not already exist.

Shotgrid parent or AssetCategory will always have the priority over TargetFolder.

Works when doing a full synchro and with the ShotgridLeecher service.


Don’t hesitate to try it out and give feedback :wink:
Here is the branch (you will need to zip the addon and build docker images for the services):

1 Like

@Minkiu I finally got around to trying the new addon and it fixed the issue we were hitting on the sync which is great :slight_smile:
However, when trying to publish a model from maya, I am hitting an error on the collect_shotgrd_session plugin indicating that the AYON_SG_USERNAME variable isn’t set and that I need to log in from the ayon tray. WIth the new addon it seems like it’s no longer possible to log in from the tray and my understanding was that authentication was supposed to happen with the api key. Do you know what might be up here?

Thanks!

They removed the user login in favor of using the script for publishing as well, though something broke mid-way through.
Ref. Discord

Thanks for the link Alfonso, this is exactly our error :slight_smile:
I’m a bit unclear from the thread whether this is a bug or if we’re expected to be handling the setting of AYON_SG_USERNAME on our end…guess I will wait for updates there

The idea behind that is that you would have control on specifying that environment variable per user as pleased so artists don’t have to log in multiple different places and also workaround the limitation of enabling 2FA authentication in Shotgrid users. In our case the SG user names is currently exactly the same as $USER on our workstation environments so on the General Environment in the Ayon core addon I’m setting the following:

Screenshot 2024-02-12 at 5.20.09 PM

Ideally that username would match the same as the Ayon username and so that could also be an option where you make that AYON_SG_USERNAME come from the user that’s logged in the Ayon server, although that would probably not work remotely in the farm as that connection is happening with the service user and not the user, that’s why using an env var is easier as you can just pass that env var to the Deadline job.

On any case, I agree that we should provide the documentation in the addon on how to control this

That makes sense, thanks for the clarification!

One more question – we’re hitting an error on the integration of Published Files due to apparent lack of configured local storage, although we do actually have one defined on the site. From looking at the plugin, it seems like it comes down to the publish instance’s localStorageKey returning as None (instance.context.data[“shotgridLocalStorageKey”]). Does somebody know where this key is supposed to be defined? I had assumed it was the Shotgrid Local Storage entry name in the shotgrid addon settings, but that doesn’t seem to have worked.
image

it should be that entry on the settings called Shotgrid local storage entry name yeah, perhaps there’s a bug on the collect_shotgrid_session plugin. You can check the log of that plugin and you should see an info log saying something like this:
Using local storage entry ayon_primary

However, I actually disabled the shotgrid local storage option in my case as I realized that Shotgrid automatically already replaces the given publish path to the local storage if it finds the root on the path so you might not need it either