-
Notifications
You must be signed in to change notification settings - Fork 33
Add slate frame to collected frame sequence. #272
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -51,7 +51,7 @@ def process(self, instance): | |
| self._set_existing_files_data(instance, colorspace) | ||
|
|
||
| elif render_target == "frames_farm": | ||
| collected_frames = self._get_collected_frames(instance) | ||
| collected_frames = self._get_collected_frames_with_slate(instance) | ||
|
|
||
| self._set_expected_files(instance, collected_frames) | ||
|
|
||
|
|
@@ -73,7 +73,7 @@ def _set_existing_files_data(self, instance, colorspace): | |
| Returns: | ||
| list: collected frames | ||
| """ | ||
| collected_frames = self._get_collected_frames(instance) | ||
| collected_frames = self._get_collected_frames_with_slate(instance) | ||
|
|
||
| representation = self._get_existing_frames_representation( | ||
| instance, collected_frames | ||
|
|
@@ -363,7 +363,7 @@ def _add_slate_frame_to_collected_frames( | |
| expected_slate_frame = first_frame - 1 | ||
| expected_slate_path = write_node["file"].evaluate(expected_slate_frame) | ||
|
|
||
| if not os.path.exists(expected_slate_path): | ||
| if os.path.exists(expected_slate_path): | ||
| slate_frame = os.path.basename(expected_slate_path) | ||
| collected_frames.insert(0, slate_frame) | ||
|
|
||
|
|
@@ -428,6 +428,24 @@ def _get_collected_frames(self, instance): | |
|
|
||
| return collected_frames | ||
|
|
||
| def _get_collected_frames_with_slate(self, instance): | ||
| """Get collected frames and include slate frame if available. | ||
|
|
||
| Args: | ||
| instance (pyblish.api.Instance): pyblish instance | ||
|
|
||
| Returns: | ||
| list: collected frames with slate if available | ||
| """ | ||
|
|
||
| first_frame, _ = self._get_frame_range_data(instance) | ||
| collected_frames = self._get_collected_frames(instance) | ||
|
|
||
| return self._add_slate_frame_to_collected_frames( | ||
| instance, | ||
| collected_frames, | ||
| first_frame | ||
| ) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doesn't have to be an extra method I'd say. This logic can just live at the end of
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, have pushed the change :D |
||
|
|
||
| def _find_downstream_time_warp_node(start_node): | ||
| # HACK: no idea why calling `dependentNodes` the first time | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, this does make more sense 🤔 - @jakubjezek001 @moonyuet any thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed.