Hiero: hound fixes

This commit is contained in:
Jakub Jezek 2021-04-13 17:51:29 +02:00
parent 55854790a0
commit e376900d68
No known key found for this signature in database
GPG key ID: C4B96E101D2A47F3
4 changed files with 11 additions and 12 deletions

View file

@ -175,7 +175,7 @@ def create_otio_markers(otio_item, item):
_key = key.replace("tag.", "")
try:
# capture exceptions which are related to strings only
# capture exceptions which are related to strings only
_value = ast.literal_eval(value)
except (ValueError, SyntaxError):
_value = value

View file

@ -117,7 +117,7 @@ def apply_transition(otio_track, otio_item, track):
transition = None
warning = (
"Unable to apply transition \"{t.name}\": {e} "
"Ignoring the transition.").format(t=otio_item, e=e.message)
"Ignoring the transition.").format(t=otio_item, e=str(e))
elif transition_type == 'fade_in':
transition_func = getattr(

View file

@ -6,8 +6,8 @@ from openpype.hosts.hiero.otio import hiero_export
# # developer reload modules
from pprint import pformat
reload(lib)
reload(phiero)
# reload(lib)
# reload(phiero)
class PrecollectInstances(pyblish.api.ContextPlugin):
@ -20,7 +20,7 @@ class PrecollectInstances(pyblish.api.ContextPlugin):
def process(self, context):
otio_timeline = context.data["otioTimeline"]
selected_timeline_items = phiero.get_track_items(
selected=True, check_enabled=True, check_tagged=True)
selected=True, check_enabled=True, check_tagged=True)
self.log.info(
"Processing enabled track items: {}".format(
selected_timeline_items))
@ -39,8 +39,6 @@ class PrecollectInstances(pyblish.api.ContextPlugin):
if tag_data.get("id") != "pyblish.avalon.instance":
continue
clip = track_item.source()
# add tag data to instance data
data.update({
k: v for k, v in tag_data.items()
@ -95,16 +93,18 @@ class PrecollectInstances(pyblish.api.ContextPlugin):
"resolutionWidth": otio_clip_metadata[
"openpype.source.width"],
"resolutionHeight": otio_clip_metadata[
"openpype.source.height"],
"openpype.source.height"],
"pixelAspect": otio_clip_metadata[
"openpype.source.pixelAspect"]
"openpype.source.pixelAspect"]
})
else:
otio_tl_metadata = context.data["otioTimeline"].metadata
data.update({
"resolutionWidth": otio_tl_metadata["openpype.timeline.width"],
"resolutionHeight": otio_tl_metadata["openpype.timeline.height"],
"pixelAspect": otio_tl_metadata["openpype.timeline.pixelAspect"]
"resolutionHeight": otio_tl_metadata[
"openpype.timeline.height"],
"pixelAspect": otio_tl_metadata[
"openpype.timeline.pixelAspect"]
})
def create_shot_instance(self, context, **data):

View file

@ -14,7 +14,6 @@ class PreCollectInstances(api.ContextPlugin):
label = "Pre-collect Instances"
hosts = ["hiero"]
def process(self, context):
track_items = phiero.get_track_items(
selected=True, check_tagged=True, check_enabled=True)