mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
added settings for the attribute collector
This commit is contained in:
parent
f7f5019401
commit
fd5ac3be1b
3 changed files with 41 additions and 2 deletions
|
|
@ -35,12 +35,26 @@ class CollectInstanceCommentDef(
|
|||
label = "Comment per instance"
|
||||
targets = ["local"]
|
||||
# Disable plugin by default
|
||||
families = ["*"]
|
||||
enabled = True
|
||||
families = []
|
||||
enabled = False
|
||||
|
||||
def process(self, instance):
|
||||
pass
|
||||
|
||||
@classmethod
|
||||
def apply_settings(cls, project_setting, _):
|
||||
plugin_settings = project_setting["global"]["publish"].get(
|
||||
"collect_comment_per_instance"
|
||||
)
|
||||
if not plugin_settings:
|
||||
return
|
||||
|
||||
if plugin_settings.get("enabled") is not None:
|
||||
cls.enabled = plugin_settings["enabled"]
|
||||
|
||||
if plugin_settings.get("families") is not None:
|
||||
cls.families = plugin_settings["families"]
|
||||
|
||||
@classmethod
|
||||
def get_attribute_defs(cls):
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -24,6 +24,10 @@
|
|||
],
|
||||
"skip_hosts_headless_publish": []
|
||||
},
|
||||
"collect_comment_per_instance": {
|
||||
"enabled": false,
|
||||
"families": []
|
||||
},
|
||||
"ValidateEditorialAssetName": {
|
||||
"enabled": true,
|
||||
"optional": false
|
||||
|
|
|
|||
|
|
@ -60,6 +60,27 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "dict",
|
||||
"collapsible": true,
|
||||
"key": "collect_comment_per_instance",
|
||||
"label": "Collect comment per instance",
|
||||
"checkbox_key": "enabled",
|
||||
"is_group": true,
|
||||
"children": [
|
||||
{
|
||||
"type": "boolean",
|
||||
"key": "enabled",
|
||||
"label": "Enabled"
|
||||
},
|
||||
{
|
||||
"key": "families",
|
||||
"label": "Families",
|
||||
"type": "list",
|
||||
"object_type": "text"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "dict",
|
||||
"collapsible": true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue