flame: improving testing plugin

adding maintained seqment selection functionality
This commit is contained in:
Jakub Jezek 2022-01-06 15:08:06 +01:00
parent 5c11089aff
commit c67e672aca
No known key found for this signature in database
GPG key ID: D8548FBF690B100A
2 changed files with 11 additions and 18 deletions

View file

@ -14,7 +14,7 @@ class ctx:
# OpenPype marker workflow variables
marker_name = "OpenPypeData"
marker_duration = 0
marker_color = "red"
marker_color = "cyan"
publish_default = False
color_map = {
"red": (1.0, 0.0, 0.0),

View file

@ -43,23 +43,16 @@ class CollectTestSelection(pyblish.api.ContextPlugin):
self.log.info("Otio exported to: {}".format(export_path))
def test_imprint_data(self, sequence):
# test segment markers
for ver in sequence.versions:
for track in ver.tracks:
if len(track.segments) == 0 and track.hidden:
with lib.maintained_segment_selection(sequence) as selected_segments:
for segment in selected_segments:
if str(segment.name)[1:-1] == "":
continue
for segment in track.segments:
if str(segment.name)[1:-1] == "":
continue
if not segment.selected:
continue
self.log.debug("Segment with OpenPypeData: {}".format(
segment.name))
self.log.debug("Segment with OpenPypeData: {}".format(
segment.name))
pipeline.imprint(segment, {
'asset': segment.name.get_value(),
'family': 'render',
'subset': 'subsetMain'
})
pipeline.imprint(segment, {
'asset': segment.name.get_value(),
'family': 'render',
'subset': 'subsetMain'
})