Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
Explicitly collect correct frame name even in case of single frame re…
Browse files Browse the repository at this point in the history
…nder when `frameStart` is provided
  • Loading branch information
BigRoy committed Feb 8, 2022
1 parent 1cea786 commit 0f82a75
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions openpype/hosts/houdini/plugins/publish/collect_frames.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,17 @@ def process(self, instance):

ropnode = instance[0]

start_frame = instance.data.get("frameStart", None)
end_frame = instance.data.get("frameEnd", None)

output_parm = lib.get_output_parameter(ropnode)
output = output_parm.eval()
if start_frame is not None:
# When rendering only a single frame still explicitly
# get the name for that particular frame instead of current frame
output = output_parm.evalAtFrame(start_frame)
else:
self.log.warning("Using current frame: {}".format(hou.frame()))
output = output_parm.eval()

_, ext = splitext(output,
allowed_multidot_extensions=[".ass.gz"])
Expand All @@ -40,9 +49,6 @@ def process(self, instance):
pattern = r"\w+\.(\d+)" + re.escape(ext)
match = re.match(pattern, file_name)

start_frame = instance.data.get("frameStart", None)
end_frame = instance.data.get("frameEnd", None)

if match and start_frame is not None:

# Check if frames are bigger than 1 (file collection)
Expand Down

0 comments on commit 0f82a75

Please sign in to comment.