ynput / ayon-shotgrid

A Shotgrid Addon for the Ayon server.
Apache License 2.0
5 stars 8 forks source link

AY-6666_Shotgrid: sequence and shot folder grouping #126

Open ynbot opened 2 months ago

ynbot commented 2 months ago

Please describe the enhancement you have in mind and explain what the current shortcomings are?

For the Assets, the Flow->Ayon sync creates them into folders based on the Asset type ("sg_asset_type"). Which is a good thing and leads to a hierarchy in ayon like that:

// But for the sequences (and I guess it will be the same for the shots at some point), Ayon creates them directly into the root, which leads to: / And we want: /sequence/ And for the shots we'll want: /shot/ Is there a way to do that by setting things into Ayon ? IMOO, the default behaviour in the code should be: Take the entity's Type in Flow (Asset, Sequence, Shot...) and use it as main folder For the Assets, use the sg_asset_type value with/instead (leading to /asset//, or // like it does now). ### How would you imagine the implementation of the enhancemenet? _No response_ ### Describe alternatives you've considered: _No response_ ### Additional context: link to discussion on [Discord]( ) _(might be a private channel)_ _This issue was automatically created from Clickup ticket [AY-6666](https://app.clickup.com/t/86c063myk)_
BigRoy commented 1 month ago

Also came up on Community Discord here - where it was mentioned that this may already be possible with a slight configuration tweak on Shotgrid side itself.

fabiaserra commented 1 month ago

Sorry I misread this issue yesterday on my phone thinking that this referred to a common config issue where your Shotgrid projects Tracking settings don't have the right parent/child relationships set up and thus the entities appear flat on the hierarchy:

Screenshot 2024-09-04 at 10 17 19 AM

Reading this now in the morning instead (with a coffee in my hands) I'm realizing this issue is indeed related to what @BigRoy linked in Discord at https://discord.com/channels/517362899170230292/1280666097976213545

However, this is requesting an even more granular control on the hierarchy and I'm not sure I understand the use case you are suggesting.

On the example given you are saying that you would want each entity type on a separate parent folder on disk, regardless if those entities are children of others? I believe the parent/child hierarchy wouldn't be that easy to break, although if you don't care about the parent/child hierarchy in ShotGrid either... you could probably change the Tracking settings so shots aren't childs of sequences, although that kind of beats the purpose of using a hierarchy?

In our AYON setup, what I have done is create an anatomy field called {assets_or_shots} that basically holds the value of "shots" or "assets" string depending on whether it's an asset entity or shot based (episode, sequence, shot...). Our Publish template then looks like this so all of our shots and all of our assets live on individual parent folders:

Directory template:

Having said this... you could use a template like this one and I think it would do what you are after:

{root[work]}/{project[name]}/{folder[type]}/publish

This way each folder should be independent of their hierarchy