Skip to content

Commit

Permalink
Merge pull request #23 from ynput/bugfix/AY-7105_colorspacedata-not-c…
Browse files Browse the repository at this point in the history
…orrectly-distributed-from-clips

Update metadata keys and add colorspace data
  • Loading branch information
jakubjezek001 authored Nov 12, 2024
2 parents aeeb801 + eba5dfb commit 613f69f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 18 deletions.
19 changes: 4 additions & 15 deletions client/ayon_hiero/api/otio/hiero_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,10 @@ def create_otio_reference(clip):

# add resolution metadata
metadata.update({
"openpype.source.colourtransform": clip.sourceMediaColourTransform(),
"openpype.source.width": int(media_source.width()),
"openpype.source.height": int(media_source.height()),
"openpype.source.pixelAspect": float(media_source.pixelAspect())
"ayon.source.colorspace": clip.sourceMediaColourTransform(),
"ayon.source.width": int(media_source.width()),
"ayon.source.height": int(media_source.height()),
"ayon.source.pixelAspect": float(media_source.pixelAspect())
})

otio_ex_ref_item = None
Expand Down Expand Up @@ -370,17 +370,6 @@ def add_otio_metadata(otio_item, media_source, **kwargs):

def create_otio_timeline():

def set_prev_item(itemindex, track_item):
# Add Gap if needed
if itemindex == 0:
# if it is first track item at track then add
# it to previous item
return track_item

else:
# get previous item
return track_item.parent().items()[itemindex - 1]

# get current timeline
CTX.timeline = hiero.ui.activeSequence()
CTX.project_fps = CTX.timeline.framerate().toFloat()
Expand Down
8 changes: 7 additions & 1 deletion client/ayon_hiero/plugins/publish/collect_plates.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,11 @@ def process(self, instance):
)

track_item = instance.data["item"]
clip_colorspace = track_item.sourceMediaColourTransform()

# add colorspace data to versionData
version_data = instance.data.setdefault("versionData", {})
version_data["colorSpace"] = track_item.sourceMediaColourTransform()
version_data["colorSpace"] = clip_colorspace

# add colorspace data to instance
instance.data["colorspace"] = clip_colorspace
2 changes: 1 addition & 1 deletion client/ayon_hiero/plugins/publish/extract_clip_effects.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def process(self, instance):

# add to data of representation
version_data.update({
"colorspace": item.sourceMediaColourTransform(),
"colorSpace": item.sourceMediaColourTransform(),
"colorspaceScript": instance.context.data["colorspace"],
"families": [product_type, "plate"],
# TODO find out if 'subset' is needed (and 'productName')
Expand Down
2 changes: 1 addition & 1 deletion package.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@

ayon_server_version = ">=1.1.2"
ayon_required_addons = {
"core": ">0.3.2",
"core": ">1.0.7",
}
ayon_compatible_addons = {}

0 comments on commit 613f69f

Please sign in to comment.