Nuke: adding solution for originalBasename frame temlate formating

https://github.com/ynput/OpenPype/pull/4452#issuecomment-1426020567
This commit is contained in:
Jakub Jezek 2023-02-10 17:12:19 +01:00 committed by Jakub Ježek
parent 44672f3f82
commit c26f86f08c

View file

@ -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):