mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
use 'skip_discovery' instead
This commit is contained in:
parent
70328e53c6
commit
d0034b6007
2 changed files with 8 additions and 6 deletions
|
|
@ -147,6 +147,8 @@ class BaseCreator(ABC):
|
|||
create_context (CreateContext): Context which initialized creator.
|
||||
headless (bool): Running in headless mode.
|
||||
"""
|
||||
skip_discovery = True
|
||||
|
||||
# Label shown in UI
|
||||
label = None
|
||||
group_label = None
|
||||
|
|
@ -642,7 +644,7 @@ class Creator(BaseCreator):
|
|||
|
||||
Creation requires prepared product name and instance data.
|
||||
"""
|
||||
is_base_class = True
|
||||
skip_discovery = True
|
||||
# GUI Purposes
|
||||
# - default_variants may not be used if `get_default_variants`
|
||||
# is overridden
|
||||
|
|
@ -931,7 +933,7 @@ class Creator(BaseCreator):
|
|||
|
||||
|
||||
class HiddenCreator(BaseCreator):
|
||||
is_base_class = True
|
||||
skip_discovery = True
|
||||
|
||||
@abstractmethod
|
||||
def create(self, instance_data, source_data):
|
||||
|
|
@ -943,7 +945,7 @@ class AutoCreator(BaseCreator):
|
|||
|
||||
Can be used e.g. for `workfile`.
|
||||
"""
|
||||
is_base_class = True
|
||||
skip_discovery = True
|
||||
|
||||
def remove_instances(self, instances):
|
||||
"""Skip removal."""
|
||||
|
|
|
|||
|
|
@ -141,9 +141,9 @@ def discover_plugins(
|
|||
for cls in classes_from_module(base_class, module):
|
||||
if cls is base_class:
|
||||
continue
|
||||
# Class has defined 'is_base_class = True'
|
||||
is_base_class = cls.__dict__.get("is_base_class")
|
||||
if is_base_class is True:
|
||||
# Class has defined 'skip_discovery = True'
|
||||
skip_discovery = cls.__dict__.get("skip_discovery")
|
||||
if skip_discovery is True:
|
||||
continue
|
||||
all_plugins.append(cls)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue