Skip to content

Commit da7ba7f

Browse files
committed
CommentMarkerColor is optional, default to red if not present
Signed-off-by: Mark Reid <[email protected]>
1 parent 29901ed commit da7ba7f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/otio_aaf_adapter/adapters/advanced_authoring_format.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,8 @@ def _convert_rgb_to_marker_color(rgb_dict):
223223
(0.0, 0.0, 0.0): otio.schema.MarkerColor.BLACK,
224224
(1.0, 1.0, 1.0): otio.schema.MarkerColor.WHITE,
225225
}
226+
if not rgb_dict:
227+
return otio.schema.MarkerColor.RED
226228

227229
# convert from UInt to float
228230
red = float(rgb_dict["red"]) / 65535.0
@@ -695,7 +697,7 @@ def _transcribe(item, parents, edit_rate, indent=0):
695697
)
696698
if color is None:
697699
color = _convert_rgb_to_marker_color(
698-
metadata["CommentMarkerColor"]
700+
metadata.get("CommentMarkerColor")
699701
)
700702
result.color = color
701703

0 commit comments

Comments
 (0)