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

Hiero: publish with retiming #1545

Merged
merged 34 commits into from
Jun 2, 2021
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
fb45010
Create draft PR for #1377
May 20, 2021
4d93fd7
Merge branch 'feature/1376-hiero-publish-color-and-transformation-sof…
jakubjezek001 May 20, 2021
4f0e02e
hiero: remove old code
jakubjezek001 May 20, 2021
ab6a3dd
hiero: old workflow plugins reorganisation
jakubjezek001 May 20, 2021
1bb8834
Hiero: add exception for TimeWarp effect
jakubjezek001 May 20, 2021
a4f69b4
Hiero: refactory precollect retime
jakubjezek001 May 20, 2021
ac8ca2e
Nuke: refactory loaders for retime
jakubjezek001 May 20, 2021
3b0f914
Global: updating version data
jakubjezek001 May 20, 2021
6002a19
Hiero: version data update
jakubjezek001 May 20, 2021
731676a
hound: suggestions
jakubjezek001 May 20, 2021
7c58036
Hiero: otio speed added to duration
jakubjezek001 May 26, 2021
6b420df
Hiero: accepting of retime speed
jakubjezek001 May 26, 2021
9041df9
Hiero: identifying otio clip with speed on duration
jakubjezek001 May 26, 2021
0eeeb19
Merge branch 'develop' into feature/1377-hiero-publish-with-retiming
jakubjezek001 May 27, 2021
a13d37c
Hiero: moving review to shot instance
jakubjezek001 Jun 1, 2021
9efdf2c
Nuke: fixing loaders retime offset
jakubjezek001 Jun 1, 2021
82cd169
Hiero: fixing retime so resources are fully coppied
jakubjezek001 Jun 1, 2021
5521115
Hiero: otio time effects implementation
jakubjezek001 Jun 1, 2021
5ec54c9
hound: suggestions
jakubjezek001 Jun 2, 2021
09b8cd5
Hiero: select only clip related time effect
jakubjezek001 Jun 2, 2021
bc0df1c
Hiero: new retime and old retime to archived effects
jakubjezek001 Jun 2, 2021
fe77ba1
Lib: adding editorial function for retime recalculate media range
jakubjezek001 Jun 2, 2021
57f742d
Global: refactory subset resources from otio with retimes
jakubjezek001 Jun 2, 2021
d2eeb31
Global: brushing code
jakubjezek001 Jun 2, 2021
6d41804
Global, Hiero: reverse previous commit `plate` to `shot` family swap
jakubjezek001 Jun 2, 2021
1beb6c8
Hiero: ignoring TimeWarp effect on collection
jakubjezek001 Jun 2, 2021
3354668
Hiero: clear retime family from collection
jakubjezek001 Jun 2, 2021
ceeee8c
global: make it nicer and readable
jakubjezek001 Jun 2, 2021
11db9f6
Global: version data with re-time data to published version
jakubjezek001 Jun 2, 2021
411db5b
Lib: editorial retime data to version data
jakubjezek001 Jun 2, 2021
68ee9ec
Hound: suggestions
jakubjezek001 Jun 2, 2021
d1aea56
Nuke: loaders with new retime settings
jakubjezek001 Jun 2, 2021
b53e345
Hiero: removing dev plugin
jakubjezek001 Jun 2, 2021
2bb4733
Hiero: fix only video track item with subtrack items
jakubjezek001 Jun 2, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion openpype/hosts/hiero/api/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,9 @@ def get_track_items(
# add all if no track_type is defined
return_list.append(track_item)

return return_list
# return output list but make sure all items are TrackItems
return [_i for _i in return_list
if type(_i) == hiero.core.TrackItem]


def get_track_item_pype_tag(track_item):
Expand Down
3 changes: 2 additions & 1 deletion openpype/hosts/hiero/otio/hiero_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ def create_otio_markers(otio_item, item):
def create_otio_clip(track_item):
clip = track_item.source()
source_in = track_item.sourceIn()
duration = track_item.sourceDuration()
speed = track_item.playbackSpeed()
duration = int(track_item.sourceDuration() / speed)
fps = utils.get_rate(track_item) or self.project_fps
name = track_item.name()

Expand Down
23 changes: 0 additions & 23 deletions openpype/hosts/hiero/plugins/_publish/collect_framerate.py

This file was deleted.

30 changes: 0 additions & 30 deletions openpype/hosts/hiero/plugins/_publish/collect_metadata.py

This file was deleted.

90 changes: 0 additions & 90 deletions openpype/hosts/hiero/plugins/_publish/collect_timecodes.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,11 @@ def process(self, instance):
instance.data["representations"] = list()

transfer_data = [
"handleStart", "handleEnd", "sourceIn", "sourceOut",
"frameStart", "frameEnd", "sourceInH", "sourceOutH",
"clipIn", "clipOut", "clipInH", "clipOutH", "asset", "track",
"version"
"handleStart", "handleEnd",
"sourceStart", "sourceStartH", "sourceEnd", "sourceEndH",
"frameStart", "frameEnd",
"clipIn", "clipOut", "clipInH", "clipOutH",
"asset", "version"
]

# pass data to version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
class PreCollectClipEffects(pyblish.api.InstancePlugin):
"""Collect soft effects instances."""

order = pyblish.api.CollectorOrder - 0.508
label = "Pre-collect Clip Effects Instances"
order = pyblish.api.CollectorOrder - 0.579
label = "Precollect Clip Effects Instances"
families = ["clip"]

def process(self, instance):
Expand All @@ -24,29 +24,51 @@ def process(self, instance):
self.clip_in_h = self.clip_in - self.handle_start
self.clip_out_h = self.clip_out + self.handle_end

track = instance.data["trackItem"]
track_item = instance.data["item"]
track = track_item.parent()
track_index = track.trackIndex()
tracks_effect_items = instance.context.data.get("tracksEffectItems")
clip_effect_items = instance.data.get("clipEffectItems")
speed = track_item.playbackSpeed()

# add clips effects to track's:
if clip_effect_items:
tracks_effect_items[track_index] = clip_effect_items

retime_effect = None

if speed != 1:
retime_effect = True

# process all effects and devide them to instance
for _track_index, sub_track_items in tracks_effect_items.items():
# skip if track index is the same as review track index
if review and review_track_index == _track_index:
continue
for sitem in sub_track_items:
effect = None
# make sure this subtrack item is relative of track item
if ((track_item not in sitem.linkedItems())
and (len(sitem.linkedItems()) > 0)):
continue

if not (track_index <= _track_index):
continue

effect = self.add_effect(_track_index, sitem)
if "TimeWarp" in sitem.name():
retime_effect = True
else:
effect = self.add_effect(_track_index, sitem)

if effect:
effects.update(effect)

# switch retime feature
if retime_effect:
instance.data["families"] += ["retime"]
instance.data["label"] = instance.data[
"label"].replace("]", ", retime]")

# skip any without effects
if not effects:
return
Expand Down Expand Up @@ -112,7 +134,12 @@ def add_effect(self, track_index, sitem):
node = sitem.node()
node_serialized = self.node_serialisation(node)
node_name = sitem.name()
node_class = re.sub(r"\d+", "", node_name)

if "_" in node_name:
node_class = re.sub(r"(?:_)[_0-9]+", "", node_name) # more numbers
else:
node_class = re.sub(r"\d+", "", node_name) # one number

# collect timelineIn/Out
effect_t_in = int(sitem.timelineIn())
effect_t_out = int(sitem.timelineOut())
Expand All @@ -121,6 +148,7 @@ def add_effect(self, track_index, sitem):
return

self.log.debug("node_name: `{}`".format(node_name))
self.log.debug("node_class: `{}`".format(node_class))

return {node_name: {
"class": node_class,
Expand Down Expand Up @@ -155,7 +183,7 @@ def node_serialisation(self, node):
# grab animation including handles
knob_anim = [node[knob].getValueAt(i)
for i in range(
self.clip_in_h, self.clip_in_h + 1)]
self.clip_in_h, self.clip_out_h + 1)]

node_serialized[knob] = knob_anim
else:
Expand Down
Loading