Refactor template_placeholder_plugin -> workfile_build_plugin

This commit is contained in:
Roy Nieterau 2024-04-30 06:48:50 +02:00
parent 07bd2e21de
commit 90ece1cdf9
6 changed files with 33 additions and 33 deletions

View file

@ -8,7 +8,7 @@ from ayon_core.lib import Logger, register_event_callback
from ayon_core.pipeline import (
register_loader_plugin_path,
register_creator_plugin_path,
register_template_placeholder_plugin_path,
register_workfile_build_plugin_path,
AVALON_CONTAINER_ID,
AVALON_INSTANCE_ID,
AYON_INSTANCE_ID,
@ -74,7 +74,7 @@ class AfterEffectsHost(HostBase, IWorkfileHost, ILoadHost, IPublishHost):
register_loader_plugin_path(LOAD_PATH)
register_creator_plugin_path(CREATE_PATH)
register_template_placeholder_plugin_path(WORKFILE_BUILD_PATH)
register_workfile_build_plugin_path(WORKFILE_BUILD_PATH)
register_event_callback("application.launched", application_launch)

View file

@ -30,11 +30,11 @@ from ayon_core.pipeline import (
register_loader_plugin_path,
register_inventory_action_path,
register_creator_plugin_path,
register_template_placeholder_plugin_path,
register_workfile_build_plugin_path,
deregister_loader_plugin_path,
deregister_inventory_action_path,
deregister_creator_plugin_path,
deregister_template_placeholder_plugin_path,
deregister_workfile_build_plugin_path,
AYON_CONTAINER_ID,
AVALON_CONTAINER_ID,
)
@ -95,7 +95,7 @@ class MayaHost(HostBase, IWorkfileHost, ILoadHost, IPublishHost):
register_loader_plugin_path(LOAD_PATH)
register_creator_plugin_path(CREATE_PATH)
register_inventory_action_path(INVENTORY_PATH)
register_template_placeholder_plugin_path(WORKFILE_BUILD_PATH)
register_workfile_build_plugin_path(WORKFILE_BUILD_PATH)
self.log.info("Installing callbacks ... ")
register_event_callback("init", on_init)
@ -335,7 +335,7 @@ def uninstall():
deregister_loader_plugin_path(LOAD_PATH)
deregister_creator_plugin_path(CREATE_PATH)
deregister_inventory_action_path(INVENTORY_PATH)
deregister_template_placeholder_plugin_path(WORKFILE_BUILD_PATH)
deregister_workfile_build_plugin_path(WORKFILE_BUILD_PATH)
menu.uninstall()

View file

@ -18,7 +18,7 @@ from ayon_core.pipeline import (
register_loader_plugin_path,
register_creator_plugin_path,
register_inventory_action_path,
register_template_placeholder_plugin_path,
register_workfile_build_plugin_path,
AYON_INSTANCE_ID,
AVALON_INSTANCE_ID,
AVALON_CONTAINER_ID,
@ -118,7 +118,7 @@ class NukeHost(
register_loader_plugin_path(LOAD_PATH)
register_creator_plugin_path(CREATE_PATH)
register_inventory_action_path(INVENTORY_PATH)
register_template_placeholder_plugin_path(WORKFILE_BUILD_PATH)
register_workfile_build_plugin_path(WORKFILE_BUILD_PATH)
# Register AYON event for workfiles loading.
register_event_callback("workio.open_file", check_inventory_versions)

View file

@ -99,11 +99,11 @@ from .context_tools import (
)
from .workfile import (
discover_template_placeholder_plugins,
register_template_placeholder_plugin,
deregister_template_placeholder_plugin,
register_template_placeholder_plugin_path,
deregister_template_placeholder_plugin_path,
discover_workfile_build_plugins,
register_workfile_build_plugin,
deregister_workfile_build_plugin,
register_workfile_build_plugin_path,
deregister_workfile_build_plugin_path,
)
install = install_host
@ -208,11 +208,11 @@ __all__ = (
"get_current_task_name",
# Workfile templates
"discover_template_placeholder_plugins",
"register_template_placeholder_plugin",
"deregister_template_placeholder_plugin",
"register_template_placeholder_plugin_path",
"deregister_template_placeholder_plugin_path",
"discover_workfile_build_plugins",
"register_workfile_build_plugin",
"deregister_workfile_build_plugin",
"register_workfile_build_plugin_path",
"deregister_workfile_build_plugin_path",
# Backwards compatible function names
"install",

View file

@ -22,11 +22,11 @@ from .build_workfile import BuildWorkfile
from .workfile_template_builder import (
discover_template_placeholder_plugins,
register_template_placeholder_plugin,
deregister_template_placeholder_plugin,
register_template_placeholder_plugin_path,
deregister_template_placeholder_plugin_path,
discover_workfile_build_plugins,
register_workfile_build_plugin,
deregister_workfile_build_plugin,
register_workfile_build_plugin_path,
deregister_workfile_build_plugin_path,
)
@ -49,9 +49,9 @@ __all__ = (
"BuildWorkfile",
"discover_template_placeholder_plugins",
"register_template_placeholder_plugin",
"deregister_template_placeholder_plugin",
"register_template_placeholder_plugin_path",
"deregister_template_placeholder_plugin_path",
"discover_workfile_build_plugins",
"register_workfile_build_plugin",
"deregister_workfile_build_plugin",
"register_workfile_build_plugin_path",
"deregister_workfile_build_plugin_path",
)

View file

@ -1925,21 +1925,21 @@ class CreatePlaceholderItem(PlaceholderItem):
self._failed_created_publish_instances.append(creator_data)
def discover_template_placeholder_plugins(*args, **kwargs):
def discover_workfile_build_plugins(*args, **kwargs):
return discover(PlaceholderPlugin, *args, **kwargs)
def register_template_placeholder_plugin(plugin: PlaceholderPlugin):
def register_workfile_build_plugin(plugin: PlaceholderPlugin):
register_plugin(PlaceholderPlugin, plugin)
def deregister_template_placeholder_plugin(plugin: PlaceholderPlugin):
def deregister_workfile_build_plugin(plugin: PlaceholderPlugin):
deregister_plugin(PlaceholderPlugin, plugin)
def register_template_placeholder_plugin_path(path: str):
def register_workfile_build_plugin_path(path: str):
register_plugin_path(PlaceholderPlugin, path)
def deregister_template_placeholder_plugin_path(path: str):
def deregister_workfile_build_plugin_path(path: str):
deregister_plugin_path(PlaceholderPlugin, path)