Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sequence and shot folder grouping #129

Merged

Conversation

kalisp
Copy link
Member

@kalisp kalisp commented Sep 10, 2024

Changelog Description

Synchronized sequences and shots were stored directly in root of the AYON project previously. This PR adds configurable option to set main assets, sequences and shots subdirectories.

image

Additional info

Previously seq0 would be directly next to environment, without wrapping sequences folder

There might be discussion needed for current implementation of shots without sequences in SG (if it makes actually sense in production). I implemented it according to requirements, but it might be just misunderstanding.

! For running projects ayon+settings://shotgrid/compatibility_settings/folder_locations should be purged to keep original implementation. (Or maybe changed defaults OR changed initialization of this addon???)

Implemented 2 workflows:
image

This will reparent all SG Assets under assets category, all Sequences and their Shot children under sequences.
Resulting in:
image

##############################
Second use case
image

Will separate SG Assets into AYON assets, SG Sequences into sequences, Shots into /shots/new_shots
Resulting in:
image

Testing notes:

  1. check ayon+settings://shotgrid/compatibility_settings/folder_parenting if it matches your requirements
  2. synchronize from Shotgrid to AYON
  3. shots folder is for shots without sequences (which is possible in SG)

Creates additional `sequence` subfolder for seq assets to be created.
Only for shots not in sequence, these are added under `sequence/` subfolder.
Special folders 'shot', 'sequence'
Contain 'shot','sequence' values, not real SG entities, they are only attributes there
Contain 'shot','sequence' values, not real SG entities, they are only attributes there
shot and sequence AYON folder doesn't need to store anything as SG_ID >> there is no need to check that value is convertible into int.
Last place left might be actually necessary.
Supports multilevel folder structure
@ynbot
Copy link
Contributor

ynbot commented Sep 10, 2024

@kalisp kalisp removed their assignment Sep 11, 2024
server/settings/main.py Outdated Show resolved Hide resolved
@fabiaserra
Copy link
Contributor

fabiaserra commented Sep 11, 2024

I personally don't think this feature makes much sense. I imagine this comes after this request #126 ? As I commented there, I think it makes sense to group all asset entities under a folder called assets and all shot based entities (this includes episodes, sequences and shots) under one called shots (or whatever) but splitting each entity into its own category beats the purpose in my opinion. Are shots parented to sequences going under the root sequences folder?

Changes not relevant to this PR.
@kalisp
Copy link
Member Author

kalisp commented Sep 13, 2024

Are shots parented to sequences going under the root sequences folder they would now (but they shouldn't according to requirements, sequences should contain only sequences)

I am open to ideas how to configure it to be more universal as this is sponsored issue, but I agree it might not apply to all use cases, same as yours doesn't.

@fabiaserra
Copy link
Contributor

Are shots parented to sequences going under the root sequences folder they would now (but they shouldn't according to requirements, sequences should contain only sequences)

So where are shots parented to sequences go? Or a sequence child of an episode and that episode having sequences and then shots? Could you put some examples of the different cases?

@kalisp kalisp marked this pull request as draft September 13, 2024 12:01
@BigRoy
Copy link
Contributor

BigRoy commented Sep 13, 2024

I'm so clueless about these conversations - doesn't shotgrid just have hierarchies itself? And shouldn't we just adhere to that hierarchy 1:1? Or what makes this so complex?

@fabiaserra
Copy link
Contributor

I'm so clueless about these conversations - doesn't shotgrid just have hierarchies itself? And shouldn't we just adhere to that hierarchy 1:1? Or what makes this so complex?

Yeah I'm a bit confused too tbh, I thought the request was to have it just on disk (which wouldn't require to create the entities in the server and it's just a template thing) and just as a means to encapsulate ALL of the shots (with its respective hierarchy) within. On the other hand, if they want those categories to show up on the UIs that's something we can do in the frontend agnostic of shotgrid as the folder types exist, it's basically just an extension to the existing icons?

@antirotor antirotor added the type: enhancement Improvement of existing functionality or minor addition label Oct 7, 2024
@kalisp kalisp marked this pull request as ready for review November 21, 2024 16:43
New ayon_python_api has modified arguments
… enhancement/AY-6666_Shotgrid-sequence-and-shot-folder-grouping
Removed from underlying call, not necessary here anymore
Removed from underlying call, not necessary here anymore
Copy link

@MilaKudr MilaKudr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both methods work fine for me. For some reason there is a one minute delay (waiting) between pressing the Sync button (SG -> AYON) since the Processor service begin to do something, lets see if this can be improved.

Copy link
Member

@jakubjezek001 jakubjezek001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2024-11-29 12:03:58.215 INFO: Event has been processed... setting to finished!
2024-11-29 12:03:58.971 ERROR: Unable to create Task <9f491990ae4111efb21b85431f85a5f6> in Shotgrid!
Traceback (most recent call last):
  File "C:\CODE\__YNPUT\ayon-shotgrid\services\shotgrid_common\ayon_shotgrid_hub\update_from_ayon.py", line 83, in create_sg_entity_from_ayon_event
    sg_entity = _create_sg_entity(
                ^^^^^^^^^^^^^^^^^^
  File "C:\CODE\__YNPUT\ayon-shotgrid\services\shotgrid_common\ayon_shotgrid_hub\update_from_ayon.py", line 340, in _create_sg_entity
    raise ValueError(
ValueError: Parent does not exist in Shotgrid!None <None>

This is happening only with Transmitter once a AY project is set to shotgrid_push activated for auto syncing based on AY changes.


Edit:
So the another examination of the issue discovered following issue at this testing:

  • Shots in Relocate Root workflow is synchronized but parent (in AY under a Sequence) is not correctly set.
  • The above issue was caused by wrong setting Folder type on shot (Shotgrid is not supporting Folder type)

@jakubjezek001
Copy link
Member

We will be sorting the parenting issue in consequent PR @kalisp please. But let's not do new release until the parenting is solved @m-u-r-p-h-y @tatiana-ynput .

Previously it didn't put shot under correct sequence.
@kalisp
Copy link
Member Author

kalisp commented Nov 29, 2024

I fixed parenting, it wasn't caused by changes in this PR though.

@kalisp kalisp merged commit f828cb5 into develop Nov 29, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sponsored This is directly sponsored by a client or community member type: enhancement Improvement of existing functionality or minor addition
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AY-6666_Shotgrid: sequence and shot folder grouping
9 participants