Skip to content

Commit

Permalink
Refactor clip product name handling logic
Browse files Browse the repository at this point in the history
- Refactored how clip product names are generated and validated to avoid duplicates.
  • Loading branch information
jakubjezek001 committed Nov 7, 2024
1 parent 984f079 commit f56e5ef
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
10 changes: 9 additions & 1 deletion client/ayon_flame/api/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -659,9 +659,17 @@ def _convert_to_marker_data(self):
# in case track clip product name had been already used
# then add product name with clip index
if clip_product_name in used_names_list:
clip_product_name = (
_clip_product_name = (
f"{clip_product_name}{self.cs_index}"
)
# just in case lets validate if new name is not used
# in case the track_index is the same as clip_index
if _clip_product_name in used_names_list:
_clip_product_name = (
f"{clip_product_name}"
f"{self.track_index}{self.cs_index}"
)
clip_product_name = _clip_product_name

self.log.debug(
f">> clip_product_name: {clip_product_name}")
Expand Down
1 change: 0 additions & 1 deletion client/ayon_flame/plugins/publish/collect_timeline_otio.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ def process(self, context):
with ayfapi.maintained_segment_selection(sequence) as selected_seg:
otio_timeline = flame_export.create_otio_timeline(sequence)


# update context with main project attributes
timeline_data = {
"flameProject": project,
Expand Down

0 comments on commit f56e5ef

Please sign in to comment.