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

AY-971 Custom staging dir functionality migration #887

Merged
merged 40 commits into from
Dec 9, 2024

Conversation

jakubjezek001
Copy link
Member

@jakubjezek001 jakubjezek001 commented Sep 12, 2024

Changelog Description

The functionality of the staging directory has exceeded its original purpose of publishing. Considering its increased usage in the creation process, we need to migrate it to a dedicated module within the pipeline parent.

resolve ynput/ayon-nuke#21

Additional info

Migrated development from ynput/OpenPype#5207

  • adding functionality to Creator base class
  • consistency of naming across all features
  • making sure backward compatibility to older names and locations remain in settings and api
  • anatomy templates with Staging Dir category
  • Support {version} in template regex when Follow workfile version is enabled

Testing notes:

  1. all should be working as it was before

- Added functions to handle custom staging directories
- Updated imports and removed deprecated code
- Created a new module for staging directory handling
…ging directories in the pipeline.

- Added import statement for 'os' in creator_plugins.py
- Implemented method 'apply_staging_dir' to apply staging directory with persistence to instance's transient data in creator_plugins.py
- Updated comments and added TODOs related to staging directories in various files
- Created a new plugin 'CollectManagedStagingDir' to manage staging directories in publish/lib.py
@ynbot
Copy link
Contributor

ynbot commented Sep 12, 2024

@ynbot ynbot added type: feature Adding something new and exciting to the product size/M labels Sep 12, 2024
@jakubjezek001 jakubjezek001 added the sponsored This is directly sponsored by a client or community member label Sep 12, 2024
- Renamed variables for better understanding and uniformity
- Improved readability by using more descriptive names
…g-dir-functions' into feature/AY-971_Use-custom-staging-dir-functions
@moonyuet
Copy link
Member

moonyuet commented Dec 3, 2024

Been testing in nuke with this branch.
I am struck at setting up custom staging directory, I adjust the settings for the custom staging like below
image
image

But I got the error below.
image

Otherwise, if I set no custom staging directory, the local pre-render or workfile published successfully. The screenshot below is for publishing pre-render.
image

@robin-ynput
Copy link
Contributor

robin-ynput commented Dec 3, 2024

@moonyuet I'm sorry I cannot reproduce your error locally.
It looks like the "Custom Staging Dir" entry is properly recognized out of the project settings but the additional anatomy entry is not. Your screenshots looks all-right to me, and I have tried different things but cannot find the issue.

Out of curiosity, could you please run the following code from within Nuke and check out the result ?

from ayon_core.pipeline import Anatomy, get_current_project_name

anatomy = Anatomy(get_current_project_name())
anatomy.get_template_item("staging", "nuke_staging")

@moonyuet
Copy link
Member

moonyuet commented Dec 4, 2024

@moonyuet I'm sorry I cannot reproduce your error locally. It looks like the "Custom Staging Dir" entry is properly recognized out of the project settings but the additional anatomy entry is not. Your screenshots looks all-right to me, and I have tried different things but cannot find the issue.

Out of curiosity, could you please run the following code from within Nuke and check out the result ?

from ayon_core.pipeline import Anatomy, get_current_project_name

anatomy = Anatomy(get_current_project_name())
anatomy.get_template_item("staging", "nuke_staging")

My bad, looks like this error happened mainly because my ayon server isn't at the latest.
I will approve right away.
image

image

@iLLiCiTiT
Copy link
Member

iLLiCiTiT commented Dec 4, 2024

All my comments were marked as resolved without any changes...

I hate GitHub showing wrong diff.

Copy link
Member

@iLLiCiTiT iLLiCiTiT left a comment

Choose a reason for hiding this comment

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

One last comment opened, but after that looks good.

@robin-ynput
Copy link
Contributor

Thanks @moonyuet and @iLLiCiTiT for the approvals, all remaining comments have been addressed.
I'm waiting for further testing and approval on this one ynput/ayon-nuke#19 to merge it.

@iLLiCiTiT
Copy link
Member

I'm waiting for further testing and approval on this one ynput/ayon-nuke#19 to merge it.

I guess that is dependent on this PR, so we may merge this now, or?

@robin-ynput robin-ynput changed the title Custom staging dir functionality migration AY-971 Custom staging dir functionality migration Dec 9, 2024
@robin-ynput robin-ynput merged commit ccd1854 into develop Dec 9, 2024
1 check passed
@robin-ynput robin-ynput deleted the feature/AY-971_Use-custom-staging-dir-functions branch December 9, 2024 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/M sponsored This is directly sponsored by a client or community member type: feature Adding something new and exciting to the product
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

AY-971_Use custom staging dir function for Nuke creators
5 participants