mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
implemented 'get_workfile_build_placeholder_plugins' for maya
This commit is contained in:
parent
5ccda391e4
commit
e5654595a8
2 changed files with 10 additions and 4 deletions
|
|
@ -35,6 +35,7 @@ from openpype.hosts.maya import MAYA_ROOT_DIR
|
|||
from openpype.hosts.maya.lib import copy_workspace_mel
|
||||
|
||||
from . import menu, lib
|
||||
from .new_template_builder import MayaLoadPlaceholderPlugin
|
||||
from .workio import (
|
||||
open_file,
|
||||
save_file,
|
||||
|
|
@ -123,6 +124,11 @@ class MayaHost(HostBase, IWorkfileHost, ILoadHost):
|
|||
def get_containers(self):
|
||||
return ls()
|
||||
|
||||
def get_workfile_build_placeholder_plugins(self):
|
||||
return [
|
||||
MayaLoadPlaceholderPlugin
|
||||
]
|
||||
|
||||
@contextlib.contextmanager
|
||||
def maintained_selection(self):
|
||||
with lib.maintained_selection():
|
||||
|
|
|
|||
|
|
@ -75,15 +75,15 @@ class AbstractTemplateLoader:
|
|||
def get_placeholder_plugin_classes(self):
|
||||
"""Get placeholder plugin classes that can be used to build template.
|
||||
|
||||
Default implementation looks for 'get_placeholder_plugin_classes' on
|
||||
host.
|
||||
Default implementation looks for method
|
||||
'get_workfile_build_placeholder_plugins' on host.
|
||||
|
||||
Returns:
|
||||
List[PlaceholderPlugin]: Plugin classes available for host.
|
||||
"""
|
||||
|
||||
if hasattr(self._host, "get_placeholder_plugin_classes"):
|
||||
return self._host.get_placeholder_plugin_classes()
|
||||
if hasattr(self._host, "get_workfile_build_placeholder_plugins"):
|
||||
return self._host.get_workfile_build_placeholder_plugins()
|
||||
return []
|
||||
|
||||
@property
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue