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

General: Fix original basename frame issues #4452

Merged
merged 4 commits into from
Feb 10, 2023

Conversation

iLLiCiTiT
Copy link
Member

Brief description

Treat {originalBasename} in different way then standard files processing. In case template should use {originalBasename} the transfers will use them as they are without any changes or handling of frames.

Description

Frames handling is problematic with original basename because their padding can't be defined to match padding in source filenames. Also it limits the usage of functionality to "must have frame at end of fiename". This is proposal how that could be solved by simply ignoring frame handling and using filenames as are on representation. First frame is still stored to representation context but is not used in formatting part. This way we don't have to care about padding of frames at all.

Additional information

This is a proposal, I could miss some other issues related to the feature.

Testing notes:

  1. Add templates to use {originalBasename}
  2. Set to use the template for your usecase (could be e.g. for render family in traypublisher)
  3. Publish something which should use the template
    • single file
    • sequence - different paddings
  4. Validate if the filenames are correct and did not change
  5. Validate if something else did not break

@iLLiCiTiT iLLiCiTiT added the type: enhancement Enhancements to existing functionality label Feb 10, 2023
@iLLiCiTiT
Copy link
Member Author

iLLiCiTiT commented Feb 10, 2023

So the first issue is that loaders are using {frame} in template to fill frame padding on load of sequence. We'll probably have to add the frame back to template, but in that case it could be without padding in template and we would fill the padding in code.

There would be same limitations as with previous implementation so anything after frame in filename would be scratched. The template wout look like {originalBasename}<{frame}>.{ext}.

To change the loaders logic we lack metadata on representation (like frame start/end). That can be guessed from files but there is no information about what files are what. There can be resources as sequence.

@iLLiCiTiT iLLiCiTiT merged commit 25b458c into develop Feb 10, 2023
@iLLiCiTiT iLLiCiTiT deleted the feature/original_basename_frame_issues branch February 10, 2023 16:26
@ynbot ynbot added this to the next-patch milestone Feb 10, 2023
jakubjezek001 added a commit that referenced this pull request Feb 27, 2023
* Nuke: adding solution for originalBasename frame temlate formating

#4452 (comment)

* publishing files with fixed versionData to fit originalBasename tempate

* polishing fixes

* wrong template key name

* Update openpype/hosts/nuke/plugins/load/load_clip.py

Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com>

* anatomy data from instance rather then context

* global: template should not have frame or other optional elements

in tempate, since they are already part of the `originalBasename`

---------

Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Enhancements to existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants