From 1719e33b00807c336fdf6367460b9fb386a91930 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Fri, 2 Dec 2022 17:20:32 +0100 Subject: [PATCH 1/3] flame: create vertically aligned subsets fix --- openpype/hosts/flame/api/plugin.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/openpype/hosts/flame/api/plugin.py b/openpype/hosts/flame/api/plugin.py index 26129ebaa6..7e012330cf 100644 --- a/openpype/hosts/flame/api/plugin.py +++ b/openpype/hosts/flame/api/plugin.py @@ -596,18 +596,19 @@ class PublishableClip: if not hero_track and self.vertical_sync: # driving layer is set as negative match for (_in, _out), hero_data in self.vertical_clip_match.items(): - hero_data.update({"heroTrack": False}) - if _in == self.clip_in and _out == self.clip_out: + _hero_data = deepcopy(hero_data) + _hero_data.update({"heroTrack": False}) + if _in <= self.clip_in and _out >= self.clip_out: data_subset = hero_data["subset"] # add track index in case duplicity of names in hero data if self.subset in data_subset: - hero_data["subset"] = self.subset + str( + _hero_data["subset"] = self.subset + str( self.track_index) # in case track name and subset name is the same then add if self.subset_name == self.track_name: - hero_data["subset"] = self.subset + _hero_data["subset"] = self.subset # assing data to return hierarchy data to tag - tag_hierarchy_data = hero_data + tag_hierarchy_data = _hero_data # add data to return data dict self.marker_data.update(tag_hierarchy_data) From c0b05e5846eecf7788d7ec3866023c83e4dded70 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Mon, 5 Dec 2022 10:50:58 +0100 Subject: [PATCH 2/3] add break and better explanation of procedure --- openpype/hosts/flame/api/plugin.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/openpype/hosts/flame/api/plugin.py b/openpype/hosts/flame/api/plugin.py index 7e012330cf..0d45792a38 100644 --- a/openpype/hosts/flame/api/plugin.py +++ b/openpype/hosts/flame/api/plugin.py @@ -596,6 +596,14 @@ class PublishableClip: if not hero_track and self.vertical_sync: # driving layer is set as negative match for (_in, _out), hero_data in self.vertical_clip_match.items(): + """ + Since only one instance of hero clip is expected in + `self.vertical_clip_match`, this will loop only once + until none hero clip will be matched with hero clip. + + `tag_hierarchy_data` will be used only once for every + clip which is not hero clip. + """ _hero_data = deepcopy(hero_data) _hero_data.update({"heroTrack": False}) if _in <= self.clip_in and _out >= self.clip_out: @@ -609,6 +617,7 @@ class PublishableClip: _hero_data["subset"] = self.subset # assing data to return hierarchy data to tag tag_hierarchy_data = _hero_data + break # add data to return data dict self.marker_data.update(tag_hierarchy_data) From ca1d518dd0dd026124b8879fdb446b34a170cc05 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Mon, 5 Dec 2022 10:53:03 +0100 Subject: [PATCH 3/3] comment improvement --- openpype/hosts/flame/api/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpype/hosts/flame/api/plugin.py b/openpype/hosts/flame/api/plugin.py index 0d45792a38..ca113fd98a 100644 --- a/openpype/hosts/flame/api/plugin.py +++ b/openpype/hosts/flame/api/plugin.py @@ -601,7 +601,7 @@ class PublishableClip: `self.vertical_clip_match`, this will loop only once until none hero clip will be matched with hero clip. - `tag_hierarchy_data` will be used only once for every + `tag_hierarchy_data` will be set only once for every clip which is not hero clip. """ _hero_data = deepcopy(hero_data)