Add OP settings and convert in plugin

This commit is contained in:
Toke Stuart Jepsen 2024-02-22 13:16:30 +00:00
parent 4c810af42a
commit 669e0a7955
3 changed files with 36 additions and 3 deletions

View file

@ -72,9 +72,13 @@ class CollectClipEffects(pyblish.api.InstancePlugin):
subset_split.insert(0, "effect")
effect_categories = {
x["name"]: x["effect_classes"] for x in self.effect_categories
}
# Need to convert to dict for AYON settings. This isinstance check can
# be removed in the future when OpenPype is no longer.
effect_categories = self.effect_categories
if isinstance(self.effect_categories, list):
effect_categories = {
x["name"]: x["effect_classes"] for x in self.effect_categories
}
category_by_effect = {"": ""}
for key, values in effect_categories.items():

View file

@ -69,6 +69,10 @@
"tags_addition": [
"review"
]
},
"CollectClipEffects": {
"enabled": true,
"effect_categories": {}
}
},
"filters": {},

View file

@ -312,6 +312,31 @@
"label": "Tags addition"
}
]
},
{
"type": "dict",
"collapsible": true,
"checkbox_key": "enabled",
"key": "CollectClipEffects",
"label": "Collect Clip Effects",
"is_group": true,
"children": [
{
"type": "boolean",
"key": "enabled",
"label": "Enabled"
},
{
"type": "dict-modifiable",
"key": "effect_categories",
"label": "Effect Categories",
"object_type": {
"type": "list",
"key": "effects_classes",
"object_type": "text"
}
}
]
}
]
},