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

Replace render path in write nodes from stagingDir #58

Draft
wants to merge 10 commits into
base: develop
Choose a base branch
from

Conversation

kalisp
Copy link
Member

@kalisp kalisp commented Jan 21, 2025

Changelog Description

Custom stagingDir (ayon+settings://core/tools/publish/custom_staging_dir_profiles) could use dynamic portion, using {version} or some unique descriptor. Render path of write nodes sets this stagingDir path only during creation time (eg. it stays static), this updates each publish run.

New publish plugin was created in Other section which updates version in render path to matching work workfile version (which got just bumped up step before). That way renders subfolders would be unique.

This plugin is optional and by default its disabled.
image

Additional review information

Use case for this would be to sending multiple jobs do Deadline with suspended Publish job. Artist then will visually check all rendered images and enable only appropriate Publish job.

Issue is how to build unique portion of path, {version} doesn't work as it points to published version of product. Time component (like {ddmmyyyy}) doesn't seem to work.

Another issue is if path in write nodes should be refreshed all the time, or it should be configurable in Settings (and by default disabled). (Problem there is that one needs to remember prepare custom staging dir template AND enable it in CollectNukeWrites)

Testing notes:

  1. use custom staging dir template with dynamic part, eg {@Version}
  2. enable plugin in ayon+settings://nuke/publish/IncrementWriteNodePath
  3. try couple of publishes, local and farm and check if path in write nodes changes

resolves #55

stagingDir could use dynamic path, using {version} or some unique descriptor. Render path of write nodes used this path only during creation, this updates each publish run.
@kalisp kalisp requested a review from jakubjezek001 January 21, 2025 17:54
@kalisp kalisp self-assigned this Jan 21, 2025
@BigRoy
Copy link
Contributor

BigRoy commented Jan 21, 2025

Issue is how to build unique portion of path, {version} doesn't work as it points to published version of product.

{workfile_version} could work though - although it'd require the workfile to ALWAYS have an actual version which should be 99% f the time though? Also, I really like just using the workfile name as "unique" token so a {workfile} (which would be without extension) or similar could also solve this

This is only replacing/updating values in path as `...vXXXX...` to `...vXXXX+1...`
@kalisp kalisp marked this pull request as ready for review January 24, 2025 14:23
@kalisp
Copy link
Member Author

kalisp commented Jan 24, 2025

Question: Does limiting path rewrites for frames* workflows make sense? (Eg. if artist select "Use existing frame" it shouldnt replace render path in a write node, as workfile, eg. version, would get bumped automatically.)
If thats the case, writes_version_sync must contain additional argument to apply on specific write node.

I dont fully understand frames workflow, so not sure about all implications.

@kalisp kalisp requested a review from BigRoy January 24, 2025 14:29
@kalisp
Copy link
Member Author

kalisp commented Jan 30, 2025

writes_version_sync needs to be translated into AYON format, it is obsolete.

Move logic to extractor phase after workfile version is bumped up.

@kalisp kalisp marked this pull request as draft January 30, 2025 16:05
Now write_node is directly provided, no need to do weird checks.
Added get_version_from_path as version from ayon-core doesn't apply for version as subdirectory.
…fix/AY-7342_Nuke-write-nodes-path-doesnt-recalculate
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.

This way it works perfectly!

@kalisp kalisp added type: bug Something isn't working sponsored This is directly sponsored by a client or community member labels Jan 31, 2025
Co-authored-by: Roy Nieterau <[email protected]>
@kalisp kalisp marked this pull request as ready for review January 31, 2025 10:05
…path-doesnt-recalculate' into bugfix/AY-7342_Nuke-write-nodes-path-doesnt-recalculate
@kalisp
Copy link
Member Author

kalisp commented Jan 31, 2025

Baking script needs to be checked.

@kalisp kalisp marked this pull request as draft January 31, 2025 17:06
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: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AY-7342_Nuke: write nodes path doesn't recalculate
3 participants