mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-26 13:52:15 +01:00
* General: Connect to AYON server (base) (#3924) * implemented 'get_workfile_info' in entities * removed 'prepare_asset_update_data' which is not used * disable settings and project manager if in v4 mode * prepared conversion helper functions for v4 entities * prepared conversion functions for hero versions * fix hero versions * implemented get_archived_representations * fix get latest versions * return prepared changes * handle archived representation * raise exception on failed json conversion * map archived to active properly * make sure default fields are added * fix conversion of hero version entity * fix conversion of archived representations * fix some conversions of representations and versions * changed active behavior in queries * fixed hero versions * implemented basic thumbnail caching * added raw variants of crud methods * implemented methods to get and create thumbnail * fix from flat dict * implemented some basic folder conversion for updates * fix thumbnail updates for version * implemented v4 thumbnail integrator * simplified data mapping * 'get_thumbnail' function also expect entity type and entity id for which is the thumbnail received * implemented 'get_thumbnail' for server * fix how thumbnail id is received from entity * removed unnecessary method 'get_thumbnail_id_from_source' * implemented thumbnail resolver for v4 * removed unnecessary print * move create and delete project directly to server api * disable local settings action too on v4 * OP-3521 - added method to check and download updated addons from v4 server * OP-3521 - added more descriptive error message for missing source * OP-3521 - added default implementation of addon downloader to import * OP-3521 - added check for dependency package zips WIP - server doesn't contain required endpoint. Testing only with mockup data for now. * OP-3521 - fixed parsing of DependencyItem Added Server Url type and ServerAddonDownloader - v4 server doesn't know its own DNS for static files so it is sending unique name and url must be created during runtime. * OP-3521 - fixed creation of targed directories * change nev keys to look for and don't set them automatically * fix task type conversion * implemented base of loading v4 addons in v3 * Refactored argument name in Downloaders * Updated parsing to DependencyItem according to current schema * Implemented downloading of package from server * Updated resolving of failures Uses Enum items. * Introduced passing of authorization token Better to inject it than to have it from env var. * Remove weird parsing of server_url Not necessary, endpoints have same prefix. * Fix doubling asset version name in addons folder Zip file should already contain `addonName_addonVersion` as first subfolder * Fix doubling asset version name in addons folder Zip file should already contain `addonName_addonVersion` as first subfolder * Made server_endpoint optional Argument should be better for testing, but for calling from separate methods it would be better to encapsulate it. Removed unwanted temporary productionPackage value * Use existing method to pull addon info from Server to load v4 version of addon * Raise exception when server doesn't have any production dependency package * added ability to specify v3 alias of addon name * expect v3_alias as uppered constant * Re-implemented method to get addon info Previous implementation wouldn't work in Python2 hosts. Will be refactored in the future. * fix '__getattr__' * added ayon api to pyproject.toml and lock file * use ayon api in common connection * added mapping for label * use ayon_api in client codebase * separated clearing cache of url and username * bump ayon api version * rename env 'OP4_TEST' to 'USE_AYON_SERVER' * Move and renamend get_addons_info to get_addons_info_as_dict in addon_distribution Should be moved to ayon_api later * Replaced requests calls with ayon_api * Replaced OP4_TEST_ENABLED with AYON_SERVER_ENABLED fixed endpoints * Hound * Hound * OP-3521 - fix wrong key in get_representation_parents parents overloads parents * OP-3521 - changes for v4 of SiteSync addon * OP-3521 - fix names * OP-3521 - remove storing project_name It should be safer to go thorug self.dbcon apparently * OP-3521 - remove unwanted "context["folder"]" can be only in dummy test data * OP-3521 - move site sync loaders to addon * Use only project instead of self.project * OP-3521 - added missed get_progress_for_repre * base of settings conversion script * simplified ayon functions in start.py * added loading of settings from ayon server * added a note about colors * fix global and local settings functions * AvalonMongoDB is not using mongo connection on ayon server enabled * 'get_dynamic_modules_dirs' is not checking system settings for paths in setting * log viewer is disabled when ayon server is enabled * basic logic of enabling/disabled addons * don't use mongo logging if ayon server is enabled * update ayon api * bump ayon api again * use ayon_api to get addons info in modules/base * update ayon api * moved helper functions to get addons and dependencies dir to common functions * Initialization of AddonInfo is not crashing on unkonwn sources * renamed 'DependencyDownloader' to 'AyonServerDownloader' * renamed function 'default_addon_downloader' to 'get_default_addon_downloader' * Added ability to convert 'WebAddonSource' to 'ServerResourceSorce' * missing dependency package on server won't cause crash * data sent to downloaders don't contain ayon specific headers * modified addon distribution to not duplicate 'ayon_api' functionality * fix doubled function defintioin * unzip client file to addon destination * formatting - unify quotes * disable usage of mongo connection if in ayon mode * renamed window.py to login_window.py * added webpublisher settings conversion * added maya conversion function * reuse variable * reuse variable (similar to previous commit) * fix ayon addons loading * fix typo 'AyonSettingsCahe' -> 'AyonSettingsCache' * fix enabled state changes * fix rr_path in royal render conversion * avoid mongo calls in AYON state * implemented custom AYON start script * fix formatting (after black) * ayon_start cleanup * 'get_addons_dir' and 'get_dependencies_dir' store value to environment variable * add docstrings to local dir functions * addon info has full name * fix modules enabled states * removed unused 'run_disk_mapping_commands' * removed ayon logic from 'start.py' * fix warning message * renamed 'openpype_common' to 'ayon_common' * removed unused import * don't import igniter * removed startup validations of third parties * change what's shown in version info * fix which keys are applied from ayon values * fix method name * get applications from attribs * Implemented UI basics to be able change user or logout * merged server.py and credentials.py * add more metadata to urls * implemented change token * implemented change user ui functionality * implemented change user ui * modify window to handle username and token value * pass username to add server * fix show UI cases * added loggin action to tray * update ayon api * added missing dependency * convert applications to config in a right way * initial implementation of 'nuke' settings conversion * removed few nuke comments * implemented hiero conversion * added imageio conversion * added run ayon tray script * fix few settings conversions * Renamed class of source classes as they are not just for addons * implemented objec to track source transfer progress * Implemented distribution item with multiple sources * Implemented ayon distribution wrapper to care about multiple things during distribution * added 'cleanup' method for downlaoders * download gets tranfer progress object * Change UploadState enum * added missing imports * use AyonDistribution in ayon_start.py * removed unused functions * removed implemented TODOs * fix import * fix key used for Web source * removed temp development fix * formatting fix * keep information if source require distribution * handle 'require_distribution' attribute in distribution process * added path attribute to server source * added option to pass addons infor to ayon distribution * fix tests * fix formatting * Fix typo * Fix typo * remove '_try_convert_to_server_source' * renamed attributes and methods to match their content * it is possible to pass dependency package info to AyonDistribution * fix called methods in tests * added public properties for error message and error detail * Added filename to WebSourceInfo Useful for GDrive sharable links where target file name is unknown/unparsable, it should be provided explicitly. * unify source conversion by adding 'convert_source' function * Fix error message Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com> * added docstring for 'transfer_progress' * don't create metadata file on read * added few docstrings * add default folder fields to folder/task queries * fix generators * add dependencies when runnign from code * add sys paths from distribution to pythonpath env * fix missing applications * added missing conversions for maya renderers * fix formatting * update ayon api * fix hashes in lock file * Use better exception Co-authored-by: Ondřej Samohel <33513211+antirotor@users.noreply.github.com> * Use Python 3 syntax Co-authored-by: Ondřej Samohel <33513211+antirotor@users.noreply.github.com> * apply some of sugested changes in ayon_start * added some docstrings and suggested modifications * copy create env from develop * fix rendersettings conversion * change code by suggestions * added missing args to docstring * added missing docstrings * separated downloader and download factory * fix ayon settings * added some basic file docstring to ayon_settings * join else conditions * fix project settings conversion * fix created at conversion * fix workfile info query * fix publisher UI * added utils function 'get_ayon_appdirs' * fix 'get_all_current_info' * fix server url assignment when url is set * updated ayon api * added utils functions to create local site id for ayon * added helper functions to create global connection * create global connection in ayon start to start use site id * use ayon site id in ayon mode * formatting cleanup * added header docstring * fixes after ayon_api update * load addons from ynput appdirs * fix function call * added docstring * update ayon pyton api * fix settings access * use ayon_api to get root overrides in Anatomy * bumbayon version to 0.1.13 * nuke: fixing settings keys from settings * fix burnins definitions * change v4 to AYON in thumbnail integrate * fix one more v4 information * Fixes after rebase * fix extract burnin conversion * additional fix of extract burnin * SiteSync:added missed loaders or v3 compatibility (#4587) * Added site sync loaders for v3 compatibility * Fix get_progress_for_repre * use 'files.name' instead of 'files.baseName' * update ayon api to 0.1.14 * add common to include files * change arguments for hero version creation * skip shotgrid settings conversion if different ayon addon is used * added ayon icons * fix labels of application variants * added option to show login window always on top * login window on invalid credentials is always on top * update ayon api * update ayon api * add entityType to project and folders * AYON: Editorial hierarchy creation (#4699) * disable extract hierarchy avalon when ayon mode is enabled * implemented extract hierarchy to AYON --------- Co-authored-by: Petr Kalis <petr.kalis@gmail.com> Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com> Co-authored-by: Ondřej Samohel <33513211+antirotor@users.noreply.github.com> Co-authored-by: Jakub Jezek <jakubjezek001@gmail.com> * replace 'legacy_io' with context functions in load plugins * added 'get_global_context' to pipeline init * use context getters instead of legacy_io in publish plugins * use data on context instead of 'legacy_io' in submit publish job * skip query of asset docs in collect nuke reads * use context functions on other places * 'list_looks' expects project name * remove 'get_context_title' * don't pass AvalonMongoDB to prelaunch hooks * change how context is calculated in hiero * implemented function 'get_fps_for_current_context' for maya * initialize '_image_dir' and '_image_prefixes' in init * legacy creator is using 'get_current_project_name' * fill docstrings * use context functions in workfile builders * hound fixes * 'create_workspace_mel' can expect project settings * swapped order of arguments * use information from instance/context data * Use self.project_name in workfiles tool Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com> * Remove outdated todo Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com> * don't query project document in nuke lib * Fix access to context data * Use right function to get project name Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com> * fix submit max deadline and swap order of arguments * added 'get_context_label' to nuke * fix import * fix typo 'curent_context' -> 'current_context' * fix project_setting variable * fix submit publish job environments * use task from context * Removed unused import --------- Co-authored-by: Petr Kalis <petr.kalis@gmail.com> Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com> Co-authored-by: Ondřej Samohel <33513211+antirotor@users.noreply.github.com> Co-authored-by: Jakub Jezek <jakubjezek001@gmail.com>
428 lines
14 KiB
Python
428 lines
14 KiB
Python
"""Single access point to all tools usable in hosts.
|
|
|
|
It is possible to create `HostToolsHelper` in host implementation or
|
|
use singleton approach with global functions (using helper anyway).
|
|
"""
|
|
import os
|
|
|
|
import pyblish.api
|
|
from openpype.host import IWorkfileHost, ILoadHost
|
|
from openpype.lib import Logger
|
|
from openpype.pipeline import (
|
|
registered_host,
|
|
get_current_asset_name,
|
|
)
|
|
|
|
from .lib import qt_app_context
|
|
|
|
|
|
class HostToolsHelper:
|
|
"""Create and cache tool windows in memory.
|
|
|
|
Almost all methods expect parent widget but the parent is used only on
|
|
first tool creation.
|
|
|
|
Class may also contain tools that are available only for one or few hosts.
|
|
"""
|
|
|
|
def __init__(self, parent=None):
|
|
self._log = None
|
|
# Global parent for all tools (may and may not be set)
|
|
self._parent = parent
|
|
|
|
# Prepare attributes for all tools
|
|
self._workfiles_tool = None
|
|
self._loader_tool = None
|
|
self._creator_tool = None
|
|
self._publisher_tool = None
|
|
self._subset_manager_tool = None
|
|
self._scene_inventory_tool = None
|
|
self._library_loader_tool = None
|
|
self._experimental_tools_dialog = None
|
|
|
|
@property
|
|
def log(self):
|
|
if self._log is None:
|
|
self._log = Logger.get_logger(self.__class__.__name__)
|
|
return self._log
|
|
|
|
def get_workfiles_tool(self, parent):
|
|
"""Create, cache and return workfiles tool window."""
|
|
if self._workfiles_tool is None:
|
|
from openpype.tools.workfiles.app import Window
|
|
|
|
# Host validation
|
|
host = registered_host()
|
|
IWorkfileHost.validate_workfile_methods(host)
|
|
|
|
workfiles_window = Window(parent=parent)
|
|
self._workfiles_tool = workfiles_window
|
|
|
|
return self._workfiles_tool
|
|
|
|
def show_workfiles(
|
|
self, parent=None, use_context=None, save=None, on_top=None
|
|
):
|
|
"""Workfiles tool for changing context and saving workfiles."""
|
|
|
|
with qt_app_context():
|
|
workfiles_tool = self.get_workfiles_tool(parent)
|
|
workfiles_tool.ensure_visible(use_context, save, on_top)
|
|
|
|
def get_loader_tool(self, parent):
|
|
"""Create, cache and return loader tool window."""
|
|
if self._loader_tool is None:
|
|
from openpype.tools.loader import LoaderWindow
|
|
|
|
host = registered_host()
|
|
ILoadHost.validate_load_methods(host)
|
|
|
|
loader_window = LoaderWindow(parent=parent or self._parent)
|
|
self._loader_tool = loader_window
|
|
|
|
return self._loader_tool
|
|
|
|
def show_loader(self, parent=None, use_context=None):
|
|
"""Loader tool for loading representations."""
|
|
with qt_app_context():
|
|
loader_tool = self.get_loader_tool(parent)
|
|
|
|
loader_tool.show()
|
|
loader_tool.raise_()
|
|
loader_tool.activateWindow()
|
|
loader_tool.showNormal()
|
|
|
|
if use_context is None:
|
|
use_context = False
|
|
|
|
if use_context:
|
|
context = {"asset": get_current_asset_name()}
|
|
loader_tool.set_context(context, refresh=True)
|
|
else:
|
|
loader_tool.refresh()
|
|
|
|
def get_creator_tool(self, parent):
|
|
"""Create, cache and return creator tool window."""
|
|
if self._creator_tool is None:
|
|
from openpype.tools.creator import CreatorWindow
|
|
|
|
creator_window = CreatorWindow(parent=parent or self._parent)
|
|
self._creator_tool = creator_window
|
|
|
|
return self._creator_tool
|
|
|
|
def show_creator(self, parent=None):
|
|
"""Show tool to create new instantes for publishing."""
|
|
with qt_app_context():
|
|
creator_tool = self.get_creator_tool(parent)
|
|
creator_tool.refresh()
|
|
creator_tool.show()
|
|
|
|
# Pull window to the front.
|
|
creator_tool.raise_()
|
|
creator_tool.activateWindow()
|
|
|
|
def get_subset_manager_tool(self, parent):
|
|
"""Create, cache and return subset manager tool window."""
|
|
if self._subset_manager_tool is None:
|
|
from openpype.tools.subsetmanager import SubsetManagerWindow
|
|
|
|
subset_manager_window = SubsetManagerWindow(
|
|
parent=parent or self._parent
|
|
)
|
|
self._subset_manager_tool = subset_manager_window
|
|
|
|
return self._subset_manager_tool
|
|
|
|
def show_subset_manager(self, parent=None):
|
|
"""Show tool display/remove existing created instances."""
|
|
with qt_app_context():
|
|
subset_manager_tool = self.get_subset_manager_tool(parent)
|
|
subset_manager_tool.show()
|
|
|
|
# Pull window to the front.
|
|
subset_manager_tool.raise_()
|
|
subset_manager_tool.activateWindow()
|
|
|
|
def get_scene_inventory_tool(self, parent):
|
|
"""Create, cache and return scene inventory tool window."""
|
|
if self._scene_inventory_tool is None:
|
|
from openpype.tools.sceneinventory import SceneInventoryWindow
|
|
|
|
host = registered_host()
|
|
ILoadHost.validate_load_methods(host)
|
|
|
|
scene_inventory_window = SceneInventoryWindow(
|
|
parent=parent or self._parent
|
|
)
|
|
self._scene_inventory_tool = scene_inventory_window
|
|
|
|
return self._scene_inventory_tool
|
|
|
|
def show_scene_inventory(self, parent=None):
|
|
"""Show tool maintain loaded containers."""
|
|
with qt_app_context():
|
|
scene_inventory_tool = self.get_scene_inventory_tool(parent)
|
|
scene_inventory_tool.show()
|
|
scene_inventory_tool.refresh()
|
|
|
|
# Pull window to the front.
|
|
scene_inventory_tool.raise_()
|
|
scene_inventory_tool.activateWindow()
|
|
scene_inventory_tool.showNormal()
|
|
|
|
def get_library_loader_tool(self, parent):
|
|
"""Create, cache and return library loader tool window."""
|
|
if self._library_loader_tool is None:
|
|
from openpype.tools.libraryloader import LibraryLoaderWindow
|
|
|
|
library_window = LibraryLoaderWindow(
|
|
parent=parent or self._parent
|
|
)
|
|
self._library_loader_tool = library_window
|
|
|
|
return self._library_loader_tool
|
|
|
|
def show_library_loader(self, parent=None):
|
|
"""Loader tool for loading representations from library project."""
|
|
with qt_app_context():
|
|
library_loader_tool = self.get_library_loader_tool(parent)
|
|
library_loader_tool.show()
|
|
library_loader_tool.raise_()
|
|
library_loader_tool.activateWindow()
|
|
library_loader_tool.showNormal()
|
|
library_loader_tool.refresh()
|
|
|
|
def show_publish(self, parent=None):
|
|
"""Try showing the most desirable publish GUI
|
|
|
|
This function cycles through the currently registered
|
|
graphical user interfaces, if any, and presents it to
|
|
the user.
|
|
"""
|
|
|
|
pyblish_show = self._discover_pyblish_gui()
|
|
return pyblish_show(parent)
|
|
|
|
def _discover_pyblish_gui(self):
|
|
"""Return the most desirable of the currently registered GUIs"""
|
|
# Prefer last registered
|
|
guis = list(reversed(pyblish.api.registered_guis()))
|
|
for gui in guis:
|
|
try:
|
|
gui = __import__(gui).show
|
|
except (ImportError, AttributeError):
|
|
continue
|
|
else:
|
|
return gui
|
|
|
|
raise ImportError("No Pyblish GUI found")
|
|
|
|
def get_experimental_tools_dialog(self, parent=None):
|
|
"""Dialog of experimental tools.
|
|
|
|
For some hosts it is not easy to modify menu of tools. For
|
|
those cases was added experimental tools dialog which is Qt based
|
|
and can dynamically filled by experimental tools so
|
|
host need only single "Experimental tools" button to see them.
|
|
|
|
Dialog can be also empty with a message that there are not available
|
|
experimental tools.
|
|
"""
|
|
if self._experimental_tools_dialog is None:
|
|
from openpype.tools.experimental_tools import (
|
|
ExperimentalToolsDialog
|
|
)
|
|
|
|
self._experimental_tools_dialog = ExperimentalToolsDialog(parent)
|
|
return self._experimental_tools_dialog
|
|
|
|
def show_experimental_tools_dialog(self, parent=None):
|
|
"""Show dialog with experimental tools."""
|
|
with qt_app_context():
|
|
dialog = self.get_experimental_tools_dialog(parent)
|
|
|
|
dialog.show()
|
|
dialog.raise_()
|
|
dialog.activateWindow()
|
|
dialog.showNormal()
|
|
|
|
def get_publisher_tool(self, parent=None, controller=None):
|
|
"""Create, cache and return publisher window."""
|
|
|
|
if self._publisher_tool is None:
|
|
from openpype.tools.publisher.window import PublisherWindow
|
|
|
|
host = registered_host()
|
|
ILoadHost.validate_load_methods(host)
|
|
|
|
publisher_window = PublisherWindow(
|
|
controller=controller, parent=parent or self._parent
|
|
)
|
|
self._publisher_tool = publisher_window
|
|
|
|
return self._publisher_tool
|
|
|
|
def show_publisher_tool(self, parent=None, controller=None, tab=None):
|
|
with qt_app_context():
|
|
window = self.get_publisher_tool(parent, controller)
|
|
if tab:
|
|
window.set_current_tab(tab)
|
|
window.make_sure_is_visible()
|
|
|
|
def get_tool_by_name(self, tool_name, parent=None, *args, **kwargs):
|
|
"""Show tool by it's name.
|
|
|
|
This is helper for
|
|
"""
|
|
if tool_name == "workfiles":
|
|
return self.get_workfiles_tool(parent, *args, **kwargs)
|
|
|
|
elif tool_name == "loader":
|
|
return self.get_loader_tool(parent, *args, **kwargs)
|
|
|
|
elif tool_name == "libraryloader":
|
|
return self.get_library_loader_tool(parent, *args, **kwargs)
|
|
|
|
elif tool_name == "creator":
|
|
return self.get_creator_tool(parent, *args, **kwargs)
|
|
|
|
elif tool_name == "subsetmanager":
|
|
return self.get_subset_manager_tool(parent, *args, **kwargs)
|
|
|
|
elif tool_name == "sceneinventory":
|
|
return self.get_scene_inventory_tool(parent, *args, **kwargs)
|
|
|
|
elif tool_name == "publish":
|
|
self.log.info("Can't return publish tool window.")
|
|
|
|
# "new" publisher
|
|
elif tool_name == "publisher":
|
|
return self.get_publisher_tool(parent, *args, **kwargs)
|
|
|
|
elif tool_name == "experimental_tools":
|
|
return self.get_experimental_tools_dialog(parent, *args, **kwargs)
|
|
|
|
else:
|
|
self.log.warning(
|
|
"Can't show unknown tool name: \"{}\"".format(tool_name)
|
|
)
|
|
|
|
def show_tool_by_name(self, tool_name, parent=None, *args, **kwargs):
|
|
"""Show tool by it's name.
|
|
|
|
This is helper for
|
|
"""
|
|
if tool_name == "workfiles":
|
|
self.show_workfiles(parent, *args, **kwargs)
|
|
|
|
elif tool_name == "loader":
|
|
self.show_loader(parent, *args, **kwargs)
|
|
|
|
elif tool_name == "libraryloader":
|
|
self.show_library_loader(parent, *args, **kwargs)
|
|
|
|
elif tool_name == "creator":
|
|
self.show_creator(parent, *args, **kwargs)
|
|
|
|
elif tool_name == "subsetmanager":
|
|
self.show_subset_manager(parent, *args, **kwargs)
|
|
|
|
elif tool_name == "sceneinventory":
|
|
self.show_scene_inventory(parent, *args, **kwargs)
|
|
|
|
elif tool_name == "publish":
|
|
self.show_publish(parent, *args, **kwargs)
|
|
|
|
elif tool_name == "publisher":
|
|
self.show_publisher_tool(parent, *args, **kwargs)
|
|
|
|
elif tool_name == "experimental_tools":
|
|
self.show_experimental_tools_dialog(parent, *args, **kwargs)
|
|
|
|
else:
|
|
self.log.warning(
|
|
"Can't show unknown tool name: \"{}\"".format(tool_name)
|
|
)
|
|
|
|
|
|
class _SingletonPoint:
|
|
"""Singleton access to host tools.
|
|
|
|
Some hosts don't have ability to create 'HostToolsHelper' object anc can
|
|
only register function callbacks. For those cases is created this singleton
|
|
point where 'HostToolsHelper' is created "in shared memory".
|
|
"""
|
|
helper = None
|
|
|
|
@classmethod
|
|
def _create_helper(cls):
|
|
if cls.helper is None:
|
|
cls.helper = HostToolsHelper()
|
|
|
|
@classmethod
|
|
def show_tool_by_name(cls, tool_name, parent=None, *args, **kwargs):
|
|
cls._create_helper()
|
|
cls.helper.show_tool_by_name(tool_name, parent, *args, **kwargs)
|
|
|
|
@classmethod
|
|
def get_tool_by_name(cls, tool_name, parent=None, *args, **kwargs):
|
|
cls._create_helper()
|
|
return cls.helper.get_tool_by_name(tool_name, parent, *args, **kwargs)
|
|
|
|
|
|
# Function callbacks using singleton access point
|
|
def get_tool_by_name(tool_name, parent=None, *args, **kwargs):
|
|
return _SingletonPoint.get_tool_by_name(tool_name, parent, *args, **kwargs)
|
|
|
|
|
|
def show_tool_by_name(tool_name, parent=None, *args, **kwargs):
|
|
_SingletonPoint.show_tool_by_name(tool_name, parent, *args, **kwargs)
|
|
|
|
|
|
def show_workfiles(*args, **kwargs):
|
|
_SingletonPoint.show_tool_by_name(
|
|
"workfiles", *args, **kwargs
|
|
)
|
|
|
|
|
|
def show_loader(parent=None, use_context=None):
|
|
_SingletonPoint.show_tool_by_name(
|
|
"loader", parent, use_context=use_context
|
|
)
|
|
|
|
|
|
def show_library_loader(parent=None):
|
|
_SingletonPoint.show_tool_by_name("libraryloader", parent)
|
|
|
|
|
|
def show_creator(parent=None):
|
|
_SingletonPoint.show_tool_by_name("creator", parent)
|
|
|
|
|
|
def show_subset_manager(parent=None):
|
|
_SingletonPoint.show_tool_by_name("subsetmanager", parent)
|
|
|
|
|
|
def show_scene_inventory(parent=None):
|
|
_SingletonPoint.show_tool_by_name("sceneinventory", parent)
|
|
|
|
|
|
def show_publish(parent=None):
|
|
_SingletonPoint.show_tool_by_name("publish", parent)
|
|
|
|
|
|
def show_publisher(parent=None, **kwargs):
|
|
_SingletonPoint.show_tool_by_name("publisher", parent, **kwargs)
|
|
|
|
|
|
def show_experimental_tools_dialog(parent=None):
|
|
_SingletonPoint.show_tool_by_name("experimental_tools", parent)
|
|
|
|
|
|
def get_pyblish_icon():
|
|
pyblish_dir = os.path.abspath(os.path.dirname(pyblish.api.__file__))
|
|
icon_path = os.path.join(pyblish_dir, "icons", "logo-32x32.svg")
|
|
if os.path.exists(icon_path):
|
|
return icon_path
|
|
return None
|