mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
Nuke: adding solution for originalBasename frame temlate formating
https://github.com/ynput/OpenPype/pull/4452#issuecomment-1426020567
This commit is contained in:
parent
44672f3f82
commit
c26f86f08c
1 changed files with 15 additions and 2 deletions
|
|
@ -220,8 +220,21 @@ class LoadClip(plugin.NukeLoader):
|
|||
dict: altered representation data
|
||||
"""
|
||||
representation = deepcopy(representation)
|
||||
frame = representation["context"]["frame"]
|
||||
representation["context"]["frame"] = "#" * len(str(frame))
|
||||
context = representation["context"]
|
||||
template = representation["data"]["template"]
|
||||
frame = context["frame"]
|
||||
hashed_frame = "#" * len(str(frame))
|
||||
|
||||
if (
|
||||
"{originalBasename}" in template
|
||||
and "frame" in context
|
||||
):
|
||||
origin_basename = context["originalBasename"]
|
||||
context["originalBasename"] = origin_basename.replace(
|
||||
frame, hashed_frame
|
||||
)
|
||||
|
||||
representation["context"]["frame"] = hashed_frame
|
||||
return representation
|
||||
|
||||
def update(self, container, representation):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue