mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Merge branch 'develop' into feature/909-define-basic-trait-type-using-dataclasses
This commit is contained in:
commit
b6603ad479
1 changed files with 10 additions and 1 deletions
|
|
@ -292,6 +292,9 @@ class OptionalPyblishPluginMixin(AYONPyblishPluginMixin):
|
|||
```
|
||||
"""
|
||||
|
||||
# Allow exposing tooltip from class with `optional_tooltip` attribute
|
||||
optional_tooltip: Optional[str] = None
|
||||
|
||||
@classmethod
|
||||
def get_attribute_defs(cls):
|
||||
"""Attribute definitions based on plugin's optional attribute."""
|
||||
|
|
@ -304,8 +307,14 @@ class OptionalPyblishPluginMixin(AYONPyblishPluginMixin):
|
|||
active = getattr(cls, "active", True)
|
||||
# Return boolean stored under 'active' key with label of the class name
|
||||
label = cls.label or cls.__name__
|
||||
|
||||
return [
|
||||
BoolDef("active", default=active, label=label)
|
||||
BoolDef(
|
||||
"active",
|
||||
default=active,
|
||||
label=label,
|
||||
tooltip=cls.optional_tooltip,
|
||||
)
|
||||
]
|
||||
|
||||
def is_active(self, data):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue