Skip to content

Commit

Permalink
Proposal to be able to disable effect discovery and publishing for clip.
Browse files Browse the repository at this point in the history
  • Loading branch information
robin-ynput committed Feb 4, 2025
1 parent 045c10b commit 5899eba
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
6 changes: 6 additions & 0 deletions client/ayon_hiero/plugins/create/create_shot_clip.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,12 @@ def get_attr_defs_for_instance(self, instance):
),
disabled=not current_review,
),
BoolDef(
"publish_effects",
label="Publish clip effects",
tooltip="Discover and publish clip effects",
default=True,
),
]
)
return instance_attributes
Expand Down
9 changes: 8 additions & 1 deletion client/ayon_hiero/plugins/publish/collect_clip_effects.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ def process(self, instance):
review = instance.data.get("review")
review_track_index = instance.context.data.get("reviewTrackIndex")
item = instance.data["item"]
product_name = instance.data.get("productName")

if not instance.data["creator_attributes"]["publish_effects"]:
self.log.debug(
"Effects collection/publish is disabled for %s",
product_name,
)
return

if "audio" in instance.data["productType"]:
return
Expand Down Expand Up @@ -64,7 +72,6 @@ def process(self, instance):
if not effects:
return

product_name = instance.data.get("productName")
effects.update({"assignTo": product_name})

product_name_split = re.findall(r'[A-Z][^A-Z]*', product_name)
Expand Down

0 comments on commit 5899eba

Please sign in to comment.