diff --git a/client/ayon_core/addon/base.py b/client/ayon_core/addon/base.py index ccd73d456a..77bf8ff4f6 100644 --- a/client/ayon_core/addon/base.py +++ b/client/ayon_core/addon/base.py @@ -8,7 +8,6 @@ import inspect import logging import threading import collections - from uuid import uuid4 from abc import ABCMeta, abstractmethod @@ -51,10 +50,13 @@ IGNORED_MODULES_IN_AYON = set() # - this is used to log the missing addon MOVED_ADDON_MILESTONE_VERSIONS = { "applications": VersionInfo(0, 2, 0), + "blender": VersionInfo(0, 2, 0), "celaction": VersionInfo(0, 2, 0), "clockify": VersionInfo(0, 2, 0), "flame": VersionInfo(0, 2, 0), "fusion": VersionInfo(0, 2, 0), + "harmony": VersionInfo(0, 2, 0), + "hiero": VersionInfo(0, 2, 0), "max": VersionInfo(0, 2, 0), "photoshop": VersionInfo(0, 2, 0), "traypublisher": VersionInfo(0, 2, 0), @@ -552,6 +554,9 @@ class AYONAddon(object): enabled = True _id = None + # Temporary variable for 'version' property + _missing_version_warned = False + def __init__(self, manager, settings): self.manager = manager @@ -582,6 +587,26 @@ class AYONAddon(object): pass + @property + def version(self): + """Addon version. + + Todo: + Should be abstract property (required). Introduced in + ayon-core 0.3.3 . + + Returns: + str: Addon version as semver compatible string. + + """ + if not self.__class__._missing_version_warned: + self.__class__._missing_version_warned = True + print( + f"DEV WARNING: Addon '{self.name}' does not have" + f" defined version." + ) + return "0.0.0" + def initialize(self, settings): """Initialization of addon attributes. @@ -697,6 +722,30 @@ class OpenPypeAddOn(OpenPypeModule): enabled = True +class _AddonReportInfo: + def __init__( + self, class_name, name, version, report_value_by_label + ): + self.class_name = class_name + self.name = name + self.version = version + self.report_value_by_label = report_value_by_label + + @classmethod + def from_addon(cls, addon, report): + class_name = addon.__class__.__name__ + report_value_by_label = { + label: reported.get(class_name) + for label, reported in report.items() + } + return cls( + addon.__class__.__name__, + addon.name, + addon.version, + report_value_by_label + ) + + class AddonsManager: """Manager of addons that helps to load and prepare them to work. @@ -873,10 +922,6 @@ class AddonsManager: name_alias = getattr(addon, "openpype_alias", None) if name_alias: aliased_names.append((name_alias, addon)) - enabled_str = "X" - if not addon.enabled: - enabled_str = " " - self.log.debug("[{}] {}".format(enabled_str, name)) now = time.time() report[addon.__class__.__name__] = now - prev_start_time @@ -888,6 +933,13 @@ class AddonsManager: exc_info=True ) + for addon_name in sorted(self._addons_by_name.keys()): + addon = self._addons_by_name[addon_name] + enabled_str = "X" if addon.enabled else " " + self.log.debug( + f"[{enabled_str}] {addon.name} ({addon.version})" + ) + for item in aliased_names: name_alias, addon = item if name_alias not in self._addons_by_name: @@ -1176,39 +1228,55 @@ class AddonsManager: available_col_names |= set(addon_names.keys()) # Prepare ordered dictionary for columns - cols = collections.OrderedDict() - # Add addon names to first columnt - cols["Addon name"] = list(sorted( - addon.__class__.__name__ + addons_info = [ + _AddonReportInfo.from_addon(addon, self._report) for addon in self.addons if addon.__class__.__name__ in available_col_names - )) + ] + addons_info.sort(key=lambda x: x.name) + + addon_name_rows = [ + addon_info.name + for addon_info in addons_info + ] + addon_version_rows = [ + addon_info.version + for addon_info in addons_info + ] + # Add total key (as last addon) - cols["Addon name"].append(self._report_total_key) + addon_name_rows.append(self._report_total_key) + addon_version_rows.append(f"({len(addons_info)})") + + cols = collections.OrderedDict() + # Add addon names to first columnt + cols["Addon name"] = addon_name_rows + cols["Version"] = addon_version_rows # Add columns from report + total_by_addon = { + row: 0 + for row in addon_name_rows + } for label in self._report.keys(): - cols[label] = [] - - total_addon_times = {} - for addon_name in cols["Addon name"]: - total_addon_times[addon_name] = 0 - - for label, reported in self._report.items(): - for addon_name in cols["Addon name"]: - col_time = reported.get(addon_name) - if col_time is None: - cols[label].append("N/A") + rows = [] + col_total = 0 + for addon_info in addons_info: + value = addon_info.report_value_by_label.get(label) + if value is None: + rows.append("N/A") continue - cols[label].append("{:.3f}".format(col_time)) - total_addon_times[addon_name] += col_time - + rows.append("{:.3f}".format(value)) + total_by_addon[addon_info.name] += value + col_total += value + total_by_addon[self._report_total_key] += col_total + rows.append("{:.3f}".format(col_total)) + cols[label] = rows # Add to also total column that should sum the row - cols[self._report_total_key] = [] - for addon_name in cols["Addon name"]: - cols[self._report_total_key].append( - "{:.3f}".format(total_addon_times[addon_name]) - ) + cols[self._report_total_key] = [ + "{:.3f}".format(total_by_addon[addon_name]) + for addon_name in cols["Addon name"] + ] # Prepare column widths and total row count # - column width is by diff --git a/client/ayon_core/hosts/blender/__init__.py b/client/ayon_core/hosts/blender/__init__.py deleted file mode 100644 index 2a6603606a..0000000000 --- a/client/ayon_core/hosts/blender/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -from .addon import BlenderAddon - - -__all__ = ( - "BlenderAddon", -) diff --git a/client/ayon_core/hosts/hiero/__init__.py b/client/ayon_core/hosts/hiero/__init__.py deleted file mode 100644 index e6744d5aec..0000000000 --- a/client/ayon_core/hosts/hiero/__init__.py +++ /dev/null @@ -1,10 +0,0 @@ -from .addon import ( - HIERO_ROOT_DIR, - HieroAddon, -) - - -__all__ = ( - "HIERO_ROOT_DIR", - "HieroAddon", -) diff --git a/client/ayon_core/modules/deadline/deadline_module.py b/client/ayon_core/modules/deadline/deadline_module.py index b1089bbfe2..ea0350d2d9 100644 --- a/client/ayon_core/modules/deadline/deadline_module.py +++ b/client/ayon_core/modules/deadline/deadline_module.py @@ -7,6 +7,8 @@ import six from ayon_core.lib import Logger from ayon_core.modules import AYONAddon, IPluginPaths +from .version import __version__ + class DeadlineWebserviceError(Exception): """ @@ -16,6 +18,7 @@ class DeadlineWebserviceError(Exception): class DeadlineModule(AYONAddon, IPluginPaths): name = "deadline" + version = __version__ def initialize(self, studio_settings): # This module is always enabled diff --git a/client/ayon_core/modules/job_queue/__init__.py b/client/ayon_core/modules/job_queue/__init__.py index 0a4c62abfb..041782dd29 100644 --- a/client/ayon_core/modules/job_queue/__init__.py +++ b/client/ayon_core/modules/job_queue/__init__.py @@ -1,6 +1,9 @@ +from .version import __version__ from .addon import JobQueueAddon __all__ = ( + "__version__", + "JobQueueAddon", ) diff --git a/client/ayon_core/modules/job_queue/addon.py b/client/ayon_core/modules/job_queue/addon.py index 0fa54eb2f0..96f6ff0d4d 100644 --- a/client/ayon_core/modules/job_queue/addon.py +++ b/client/ayon_core/modules/job_queue/addon.py @@ -44,9 +44,12 @@ import platform from ayon_core.addon import AYONAddon, click_wrap from ayon_core.settings import get_studio_settings +from .version import __version__ + class JobQueueAddon(AYONAddon): name = "job_queue" + version = __version__ def initialize(self, studio_settings): addon_settings = studio_settings.get(self.name) or {} diff --git a/client/ayon_core/modules/job_queue/version.py b/client/ayon_core/modules/job_queue/version.py new file mode 100644 index 0000000000..5becc17c04 --- /dev/null +++ b/client/ayon_core/modules/job_queue/version.py @@ -0,0 +1 @@ +__version__ = "1.0.0" diff --git a/client/ayon_core/modules/launcher_action.py b/client/ayon_core/modules/launcher_action.py index 38e88d36ca..344b0bc389 100644 --- a/client/ayon_core/modules/launcher_action.py +++ b/client/ayon_core/modules/launcher_action.py @@ -7,6 +7,7 @@ from ayon_core.addon import AYONAddon, ITrayAction class LauncherAction(AYONAddon, ITrayAction): label = "Launcher" name = "launcher_tool" + version = "1.0.0" def initialize(self, settings): diff --git a/client/ayon_core/modules/loader_action.py b/client/ayon_core/modules/loader_action.py index 1e45db05dc..a58d7fd456 100644 --- a/client/ayon_core/modules/loader_action.py +++ b/client/ayon_core/modules/loader_action.py @@ -3,6 +3,7 @@ from ayon_core.addon import AYONAddon, ITrayAddon class LoaderAddon(AYONAddon, ITrayAddon): name = "loader_tool" + version = "1.0.0" def initialize(self, settings): # Tray attributes diff --git a/client/ayon_core/modules/python_console_interpreter/addon.py b/client/ayon_core/modules/python_console_interpreter/addon.py index ffad3ce707..b0dce2585e 100644 --- a/client/ayon_core/modules/python_console_interpreter/addon.py +++ b/client/ayon_core/modules/python_console_interpreter/addon.py @@ -4,6 +4,7 @@ from ayon_core.addon import AYONAddon, ITrayAction class PythonInterpreterAction(AYONAddon, ITrayAction): label = "Console" name = "python_interpreter" + version = "1.0.0" admin_action = True def initialize(self, settings): diff --git a/client/ayon_core/modules/royalrender/__init__.py b/client/ayon_core/modules/royalrender/__init__.py index 121530beda..8bf207e7db 100644 --- a/client/ayon_core/modules/royalrender/__init__.py +++ b/client/ayon_core/modules/royalrender/__init__.py @@ -1,6 +1,9 @@ +from .version import __version__ from .addon import RoyalRenderAddon __all__ = ( + "__version__", + "RoyalRenderAddon", ) diff --git a/client/ayon_core/modules/royalrender/addon.py b/client/ayon_core/modules/royalrender/addon.py index e69cf9feec..264d3516c1 100644 --- a/client/ayon_core/modules/royalrender/addon.py +++ b/client/ayon_core/modules/royalrender/addon.py @@ -4,10 +4,13 @@ import os from ayon_core.addon import AYONAddon, IPluginPaths +from .version import __version__ + class RoyalRenderAddon(AYONAddon, IPluginPaths): """Class providing basic Royal Render implementation logic.""" name = "royalrender" + version = __version__ # _rr_api = None # @property diff --git a/client/ayon_core/modules/royalrender/version.py b/client/ayon_core/modules/royalrender/version.py new file mode 100644 index 0000000000..485f44ac21 --- /dev/null +++ b/client/ayon_core/modules/royalrender/version.py @@ -0,0 +1 @@ +__version__ = "0.1.1" diff --git a/client/ayon_core/modules/timers_manager/__init__.py b/client/ayon_core/modules/timers_manager/__init__.py index 5d7a4166d3..1ec0d9b74b 100644 --- a/client/ayon_core/modules/timers_manager/__init__.py +++ b/client/ayon_core/modules/timers_manager/__init__.py @@ -1,7 +1,10 @@ +from .version import __version__ from .timers_manager import ( TimersManager ) __all__ = ( + "__version__", + "TimersManager", ) diff --git a/client/ayon_core/modules/timers_manager/timers_manager.py b/client/ayon_core/modules/timers_manager/timers_manager.py index 4212ff6b25..2aac7b2a49 100644 --- a/client/ayon_core/modules/timers_manager/timers_manager.py +++ b/client/ayon_core/modules/timers_manager/timers_manager.py @@ -10,6 +10,7 @@ from ayon_core.addon import ( ) from ayon_core.lib.events import register_event_callback +from .version import __version__ from .exceptions import InvalidContextError TIMER_MODULE_DIR = os.path.dirname(os.path.abspath(__file__)) @@ -96,6 +97,7 @@ class TimersManager( See `ExampleTimersManagerConnector`. """ name = "timers_manager" + version = __version__ label = "Timers Service" _required_methods = ( diff --git a/client/ayon_core/modules/timers_manager/version.py b/client/ayon_core/modules/timers_manager/version.py new file mode 100644 index 0000000000..485f44ac21 --- /dev/null +++ b/client/ayon_core/modules/timers_manager/version.py @@ -0,0 +1 @@ +__version__ = "0.1.1" diff --git a/client/ayon_core/modules/webserver/__init__.py b/client/ayon_core/modules/webserver/__init__.py index 0d3f767638..32f2c55f65 100644 --- a/client/ayon_core/modules/webserver/__init__.py +++ b/client/ayon_core/modules/webserver/__init__.py @@ -1,8 +1,13 @@ +from .version import __version__ +from .structures import HostMsgAction from .webserver_module import ( WebServerAddon ) __all__ = ( + "__version__", + + "HostMsgAction", "WebServerAddon", ) diff --git a/client/ayon_core/modules/webserver/host_console_listener.py b/client/ayon_core/modules/webserver/host_console_listener.py index ed8a32b9f2..2efd768e24 100644 --- a/client/ayon_core/modules/webserver/host_console_listener.py +++ b/client/ayon_core/modules/webserver/host_console_listener.py @@ -9,22 +9,18 @@ from qtpy import QtWidgets from ayon_core.addon import ITrayService from ayon_core.tools.stdout_broker.window import ConsoleDialog +from .structures import HostMsgAction + log = logging.getLogger(__name__) +# Host listener icon type class IconType: IDLE = "idle" RUNNING = "running" FAILED = "failed" -class MsgAction: - CONNECTING = "connecting" - INITIALIZED = "initialized" - ADD = "add" - CLOSE = "close" - - class HostListener: def __init__(self, webserver, module): self._window_per_id = {} @@ -96,22 +92,22 @@ class HostListener: if msg.type == aiohttp.WSMsgType.TEXT: host_name, action, text = self._parse_message(msg) - if action == MsgAction.CONNECTING: + if action == HostMsgAction.CONNECTING: self._action_per_id[host_name] = None # must be sent to main thread, or action wont trigger self.module.execute_in_main_thread( lambda: self._host_is_connecting(host_name, text)) - elif action == MsgAction.CLOSE: + elif action == HostMsgAction.CLOSE: # clean close self._close(host_name) await ws.close() - elif action == MsgAction.INITIALIZED: + elif action == HostMsgAction.INITIALIZED: self.module.execute_in_main_thread( # must be queued as _host_is_connecting might not # be triggered/finished yet lambda: self._set_host_icon(host_name, IconType.RUNNING)) - elif action == MsgAction.ADD: + elif action == HostMsgAction.ADD: self.module.execute_in_main_thread( lambda: self._add_text(host_name, text)) elif msg.type == aiohttp.WSMsgType.ERROR: diff --git a/client/ayon_core/modules/webserver/structures.py b/client/ayon_core/modules/webserver/structures.py new file mode 100644 index 0000000000..a598e3342a --- /dev/null +++ b/client/ayon_core/modules/webserver/structures.py @@ -0,0 +1,6 @@ +# Host listener message actions +class HostMsgAction: + CONNECTING = "connecting" + INITIALIZED = "initialized" + ADD = "add" + CLOSE = "close" diff --git a/client/ayon_core/modules/webserver/version.py b/client/ayon_core/modules/webserver/version.py new file mode 100644 index 0000000000..5becc17c04 --- /dev/null +++ b/client/ayon_core/modules/webserver/version.py @@ -0,0 +1 @@ +__version__ = "1.0.0" diff --git a/client/ayon_core/modules/webserver/webserver_module.py b/client/ayon_core/modules/webserver/webserver_module.py index c324e0dd18..997b6f754c 100644 --- a/client/ayon_core/modules/webserver/webserver_module.py +++ b/client/ayon_core/modules/webserver/webserver_module.py @@ -26,9 +26,12 @@ import socket from ayon_core import resources from ayon_core.addon import AYONAddon, ITrayService +from .version import __version__ + class WebServerAddon(AYONAddon, ITrayService): name = "webserver" + version = __version__ label = "WebServer" webserver_url_env = "AYON_WEBSERVER_URL" diff --git a/client/ayon_core/pipeline/context_tools.py b/client/ayon_core/pipeline/context_tools.py index c32d04c44c..8b72405048 100644 --- a/client/ayon_core/pipeline/context_tools.py +++ b/client/ayon_core/pipeline/context_tools.py @@ -11,7 +11,12 @@ from pyblish.lib import MessageHandler from ayon_core import AYON_CORE_ROOT from ayon_core.host import HostBase -from ayon_core.lib import is_in_tests, initialize_ayon_connection, emit_event +from ayon_core.lib import ( + is_in_tests, + initialize_ayon_connection, + emit_event, + version_up +) from ayon_core.addon import load_addons, AddonsManager from ayon_core.settings import get_project_settings @@ -21,6 +26,8 @@ from .template_data import get_template_data_with_names from .workfile import ( get_workdir, get_custom_workfile_template_by_string_context, + get_workfile_template_key_from_context, + get_last_workfile ) from . import ( register_loader_plugin_path, @@ -579,3 +586,48 @@ def get_process_id(): if _process_id is None: _process_id = str(uuid.uuid4()) return _process_id + + +def version_up_current_workfile(): + """Function to increment and save workfile + """ + host = registered_host() + if not host.has_unsaved_changes(): + print("No unsaved changes, skipping file save..") + return + + project_name = get_current_project_name() + folder_path = get_current_folder_path() + task_name = get_current_task_name() + host_name = get_current_host_name() + + template_key = get_workfile_template_key_from_context( + project_name, + folder_path, + task_name, + host_name, + ) + anatomy = Anatomy(project_name) + + data = get_template_data_with_names( + project_name, folder_path, task_name, host_name + ) + data["root"] = anatomy.roots + + work_template = anatomy.get_template_item("work", template_key) + + # Define saving file extension + extensions = host.get_workfile_extensions() + current_file = host.get_current_workfile() + if current_file: + extensions = [os.path.splitext(current_file)[-1]] + + work_root = work_template["directory"].format_strict(data) + file_template = work_template["file"].template + last_workfile_path = get_last_workfile( + work_root, file_template, data, extensions, True + ) + new_workfile_path = version_up(last_workfile_path) + if os.path.exists(new_workfile_path): + new_workfile_path = version_up(new_workfile_path) + host.save_workfile(new_workfile_path) diff --git a/client/ayon_core/pipeline/publish/lib.py b/client/ayon_core/pipeline/publish/lib.py index 8d3644637b..7f63089d33 100644 --- a/client/ayon_core/pipeline/publish/lib.py +++ b/client/ayon_core/pipeline/publish/lib.py @@ -336,17 +336,16 @@ def get_plugin_settings(plugin, project_settings, log, category=None): settings_category = getattr(plugin, "settings_category", None) if settings_category: try: - return ( - project_settings - [settings_category] - ["publish"] - [plugin.__name__] - ) + category_settings = project_settings[settings_category] except KeyError: log.warning(( - "Couldn't find plugin '{}' settings" - " under settings category '{}'" - ).format(plugin.__name__, settings_category)) + "Couldn't find settings category '{}' in project settings" + ).format(settings_category)) + return {} + + try: + return category_settings["publish"][plugin.__name__] + except KeyError: return {} # Use project settings based on a category name diff --git a/client/ayon_core/tools/loader/abstract.py b/client/ayon_core/tools/loader/abstract.py index 509db4d037..a1c1e6a062 100644 --- a/client/ayon_core/tools/loader/abstract.py +++ b/client/ayon_core/tools/loader/abstract.py @@ -172,12 +172,30 @@ class VersionItem: def __gt__(self, other): if not isinstance(other, VersionItem): return False - if ( - other.version == self.version - and self.is_hero - ): + # Make sure hero versions are positive + version = abs(self.version) + other_version = abs(other.version) + # Hero version is greater than non-hero + if version == other_version: + return self.is_hero + return version > other_version + + def __lt__(self, other): + if not isinstance(other, VersionItem): return True - return other.version < self.version + # Make sure hero versions are positive + version = abs(self.version) + other_version = abs(other.version) + # Non-hero version is lesser than hero + if version == other_version: + return not self.is_hero + return version < other_version + + def __ge__(self, other): + return self.__eq__(other) or self.__gt__(other) + + def __le__(self, other): + return self.__eq__(other) or self.__lt__(other) def to_data(self): return { diff --git a/client/ayon_core/tools/loader/ui/products_model.py b/client/ayon_core/tools/loader/ui/products_model.py index 8035b1f0fe..7b9124608b 100644 --- a/client/ayon_core/tools/loader/ui/products_model.py +++ b/client/ayon_core/tools/loader/ui/products_model.py @@ -199,7 +199,9 @@ class ProductsModel(QtGui.QStandardItemModel): product_item = self._product_items_by_id.get(product_id) if product_item is None: return None - return list(product_item.version_items.values()) + product_items = list(product_item.version_items.values()) + product_items.sort(reverse=True) + return product_items if role == QtCore.Qt.EditRole: return None diff --git a/client/ayon_core/tools/stdout_broker/__init__.py b/client/ayon_core/tools/stdout_broker/__init__.py index e69de29bb2..e104c60573 100644 --- a/client/ayon_core/tools/stdout_broker/__init__.py +++ b/client/ayon_core/tools/stdout_broker/__init__.py @@ -0,0 +1,5 @@ +from .broker import StdOutBroker + +__all__ = ( + "StdOutBroker", +) diff --git a/client/ayon_core/tools/stdout_broker/app.py b/client/ayon_core/tools/stdout_broker/app.py index 15447b608b..ae73db1bb9 100644 --- a/client/ayon_core/tools/stdout_broker/app.py +++ b/client/ayon_core/tools/stdout_broker/app.py @@ -1,173 +1,12 @@ -import os -import sys -import threading -import collections -import websocket -import json -from datetime import datetime +import warnings +from .broker import StdOutBroker -from ayon_core.lib import Logger -from openpype_modules.webserver.host_console_listener import MsgAction +warnings.warn( + ( + "Import of 'StdOutBroker' from 'ayon_core.tools.stdout_broker.app'" + " is deprecated. Please use 'ayon_core.tools.stdout_broker' instead." + ), + DeprecationWarning +) -log = Logger.get_logger(__name__) - - -class StdOutBroker: - """ - Application showing console in Services tray for non python hosts - instead of cmd window. - """ - MAX_LINES = 10000 - TIMER_TIMEOUT = 0.200 - - def __init__(self, host_name): - self.host_name = host_name - self.webserver_client = None - - self.original_stdout_write = None - self.original_stderr_write = None - self.log_queue = collections.deque() - - date_str = datetime.now().strftime("%d%m%Y%H%M%S") - self.host_id = "{}_{}".format(self.host_name, date_str) - - self._std_available = False - self._is_running = False - self._catch_std_outputs() - - self._timer = None - - @property - def send_to_tray(self): - """Checks if connected to tray and have access to logs.""" - return self.webserver_client and self._std_available - - def start(self): - """Start app, create and start timer""" - if not self._std_available or self._is_running: - return - self._is_running = True - self._create_timer() - self._connect_to_tray() - - def stop(self): - """Disconnect from Tray, process last logs""" - if not self._is_running: - return - self._is_running = False - self._process_queue() - self._disconnect_from_tray() - - def host_connected(self): - """Send to Tray console that host is ready - icon change. """ - log.info("Host {} connected".format(self.host_id)) - - payload = { - "host": self.host_id, - "action": MsgAction.INITIALIZED, - "text": "Integration with {}".format( - str.capitalize(self.host_name)) - } - self._send(payload) - - def _create_timer(self): - timer = threading.Timer(self.TIMER_TIMEOUT, self._timer_callback) - timer.start() - self._timer = timer - - def _timer_callback(self): - if not self._is_running: - return - self._process_queue() - self._create_timer() - - def _connect_to_tray(self): - """Connect to Tray webserver to pass console output. """ - if not self._std_available: # not content to log - return - ws = websocket.WebSocket() - webserver_url = os.environ.get("AYON_WEBSERVER_URL") - - if not webserver_url: - print("Unknown webserver url, cannot connect to pass log") - return - - webserver_url = webserver_url.replace("http", "ws") - ws.connect("{}/ws/host_listener".format(webserver_url)) - self.webserver_client = ws - - payload = { - "host": self.host_id, - "action": MsgAction.CONNECTING, - "text": "Integration with {}".format( - str.capitalize(self.host_name)) - } - self._send(payload) - - def _disconnect_from_tray(self): - """Send to Tray that host is closing - remove from Services. """ - print("Host {} closing".format(self.host_name)) - if not self.webserver_client: - return - - payload = { - "host": self.host_id, - "action": MsgAction.CLOSE, - "text": "Integration with {}".format( - str.capitalize(self.host_name)) - } - - self._send(payload) - self.webserver_client.close() - - def _catch_std_outputs(self): - """Redirects standard out and error to own functions""" - if sys.stdout: - self.original_stdout_write = sys.stdout.write - sys.stdout.write = self._my_stdout_write - self._std_available = True - - if sys.stderr: - self.original_stderr_write = sys.stderr.write - sys.stderr.write = self._my_stderr_write - self._std_available = True - - def _my_stdout_write(self, text): - """Appends outputted text to queue, keep writing to original stdout""" - if self.original_stdout_write is not None: - self.original_stdout_write(text) - if self.send_to_tray: - self.log_queue.append(text) - - def _my_stderr_write(self, text): - """Appends outputted text to queue, keep writing to original stderr""" - if self.original_stderr_write is not None: - self.original_stderr_write(text) - if self.send_to_tray: - self.log_queue.append(text) - - def _process_queue(self): - """Sends lines and purges queue""" - if not self.send_to_tray: - return - - lines = tuple(self.log_queue) - self.log_queue.clear() - if lines: - payload = { - "host": self.host_id, - "action": MsgAction.ADD, - "text": "\n".join(lines) - } - - self._send(payload) - - def _send(self, payload): - """Worker method to send to existing websocket connection.""" - if not self.send_to_tray: - return - - try: - self.webserver_client.send(json.dumps(payload)) - except ConnectionResetError: # Tray closed - self._connect_to_tray() +__all__ = ("StdOutBroker", ) diff --git a/client/ayon_core/tools/stdout_broker/broker.py b/client/ayon_core/tools/stdout_broker/broker.py new file mode 100644 index 0000000000..291936008b --- /dev/null +++ b/client/ayon_core/tools/stdout_broker/broker.py @@ -0,0 +1,174 @@ +import os +import sys +import threading +import collections +import json +from datetime import datetime + +import websocket + +from ayon_core.lib import Logger +from ayon_core.modules.webserver import HostMsgAction + +log = Logger.get_logger(__name__) + + +class StdOutBroker: + """ + Application showing console in Services tray for non python hosts + instead of cmd window. + """ + MAX_LINES = 10000 + TIMER_TIMEOUT = 0.200 + + def __init__(self, host_name): + self.host_name = host_name + self.webserver_client = None + + self.original_stdout_write = None + self.original_stderr_write = None + self.log_queue = collections.deque() + + date_str = datetime.now().strftime("%d%m%Y%H%M%S") + self.host_id = "{}_{}".format(self.host_name, date_str) + + self._std_available = False + self._is_running = False + self._catch_std_outputs() + + self._timer = None + + @property + def send_to_tray(self): + """Checks if connected to tray and have access to logs.""" + return self.webserver_client and self._std_available + + def start(self): + """Start app, create and start timer""" + if not self._std_available or self._is_running: + return + self._is_running = True + self._create_timer() + self._connect_to_tray() + + def stop(self): + """Disconnect from Tray, process last logs""" + if not self._is_running: + return + self._is_running = False + self._process_queue() + self._disconnect_from_tray() + + def host_connected(self): + """Send to Tray console that host is ready - icon change. """ + log.info("Host {} connected".format(self.host_id)) + + payload = { + "host": self.host_id, + "action": HostMsgAction.INITIALIZED, + "text": "Integration with {}".format( + str.capitalize(self.host_name)) + } + self._send(payload) + + def _create_timer(self): + timer = threading.Timer(self.TIMER_TIMEOUT, self._timer_callback) + timer.start() + self._timer = timer + + def _timer_callback(self): + if not self._is_running: + return + self._process_queue() + self._create_timer() + + def _connect_to_tray(self): + """Connect to Tray webserver to pass console output. """ + if not self._std_available: # not content to log + return + ws = websocket.WebSocket() + webserver_url = os.environ.get("AYON_WEBSERVER_URL") + + if not webserver_url: + print("Unknown webserver url, cannot connect to pass log") + return + + webserver_url = webserver_url.replace("http", "ws") + ws.connect("{}/ws/host_listener".format(webserver_url)) + self.webserver_client = ws + + payload = { + "host": self.host_id, + "action": HostMsgAction.CONNECTING, + "text": "Integration with {}".format( + str.capitalize(self.host_name)) + } + self._send(payload) + + def _disconnect_from_tray(self): + """Send to Tray that host is closing - remove from Services. """ + print("Host {} closing".format(self.host_name)) + if not self.webserver_client: + return + + payload = { + "host": self.host_id, + "action": HostMsgAction.CLOSE, + "text": "Integration with {}".format( + str.capitalize(self.host_name)) + } + + self._send(payload) + self.webserver_client.close() + + def _catch_std_outputs(self): + """Redirects standard out and error to own functions""" + if sys.stdout: + self.original_stdout_write = sys.stdout.write + sys.stdout.write = self._my_stdout_write + self._std_available = True + + if sys.stderr: + self.original_stderr_write = sys.stderr.write + sys.stderr.write = self._my_stderr_write + self._std_available = True + + def _my_stdout_write(self, text): + """Appends outputted text to queue, keep writing to original stdout""" + if self.original_stdout_write is not None: + self.original_stdout_write(text) + if self.send_to_tray: + self.log_queue.append(text) + + def _my_stderr_write(self, text): + """Appends outputted text to queue, keep writing to original stderr""" + if self.original_stderr_write is not None: + self.original_stderr_write(text) + if self.send_to_tray: + self.log_queue.append(text) + + def _process_queue(self): + """Sends lines and purges queue""" + if not self.send_to_tray: + return + + lines = tuple(self.log_queue) + self.log_queue.clear() + if lines: + payload = { + "host": self.host_id, + "action": HostMsgAction.ADD, + "text": "\n".join(lines) + } + + self._send(payload) + + def _send(self, payload): + """Worker method to send to existing websocket connection.""" + if not self.send_to_tray: + return + + try: + self.webserver_client.send(json.dumps(payload)) + except ConnectionResetError: # Tray closed + self._connect_to_tray() diff --git a/client/ayon_core/tools/tray/tray.py b/client/ayon_core/tools/tray/tray.py index 957518afe4..eca87eb11d 100644 --- a/client/ayon_core/tools/tray/tray.py +++ b/client/ayon_core/tools/tray/tray.py @@ -447,8 +447,10 @@ class SystemTrayIcon(QtWidgets.QSystemTrayIcon): def initialize_addons(self): self._initializing_addons = True - self.tray_man.initialize_addons() - self._initializing_addons = False + try: + self.tray_man.initialize_addons() + finally: + self._initializing_addons = False def _click_timer_timeout(self): self._click_timer.stop() diff --git a/pyproject.toml b/pyproject.toml index 63d7434c06..ca887f2299 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -80,11 +80,11 @@ dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" exclude = [ "client/ayon_core/hosts/unreal/integration/*", "client/ayon_core/hosts/aftereffects/api/extension/js/libs/*", - "client/ayon_core/hosts/hiero/api/startup/*", "client/ayon_core/modules/deadline/repository/custom/plugins/CelAction/*", "client/ayon_core/modules/deadline/repository/custom/plugins/HarmonyAYON/*", "client/ayon_core/modules/click_wrap.py", - "client/ayon_core/scripts/slates/__init__.py" + "client/ayon_core/scripts/slates/__init__.py", + "server_addon/hiero/client/ayon_hiero/api/startup/*" ] [tool.ruff.lint.per-file-ignores] diff --git a/server/settings/publish_plugins.py b/server/settings/publish_plugins.py index 2640a3db37..4191cccb7b 100644 --- a/server/settings/publish_plugins.py +++ b/server/settings/publish_plugins.py @@ -798,7 +798,7 @@ class PublishPuginsModel(BaseSettingsModel): ) ValidateOutdatedContainers: PluginStateByHostModel = SettingsField( default_factory=PluginStateByHostModel, - title="Validate Containers" + title="Validate Outdated Containers" ) ValidateIntent: ValidateIntentModel = SettingsField( default_factory=ValidateIntentModel, diff --git a/server/settings/tools.py b/server/settings/tools.py index fb8430a71c..1d32169954 100644 --- a/server/settings/tools.py +++ b/server/settings/tools.py @@ -118,6 +118,15 @@ class WorkfilesLockProfile(BaseSettingsModel): enabled: bool = SettingsField(True, title="Enabled") +class AYONMenuModel(BaseSettingsModel): + _layout = "expanded" + version_up_current_workfile: bool = SettingsField( + False, + title="Version Up Workfile", + description="Add 'Version Up Workfile' to AYON menu" + ) + + class WorkfilesToolModel(BaseSettingsModel): workfile_template_profiles: list[WorkfileTemplateProfile] = SettingsField( default_factory=list, @@ -268,6 +277,10 @@ class PublishToolModel(BaseSettingsModel): class GlobalToolsModel(BaseSettingsModel): + ayon_menu: AYONMenuModel = SettingsField( + default_factory=AYONMenuModel, + title="AYON Menu" + ) creator: CreatorToolModel = SettingsField( default_factory=CreatorToolModel, title="Creator" @@ -287,6 +300,9 @@ class GlobalToolsModel(BaseSettingsModel): DEFAULT_TOOLS_VALUES = { + "ayon_menu": { + "version_up_current_workfile": False + }, "creator": { "product_types_smart_select": [ { diff --git a/server_addon/blender/client/ayon_blender/__init__.py b/server_addon/blender/client/ayon_blender/__init__.py new file mode 100644 index 0000000000..221dcd4138 --- /dev/null +++ b/server_addon/blender/client/ayon_blender/__init__.py @@ -0,0 +1,13 @@ +from .version import __version__ +from .addon import ( + BlenderAddon, + BLENDER_ADDON_ROOT, +) + + +__all__ = ( + "__version__", + + "BlenderAddon", + "BLENDER_ADDON_ROOT", +) diff --git a/client/ayon_core/hosts/blender/addon.py b/server_addon/blender/client/ayon_blender/addon.py similarity index 91% rename from client/ayon_core/hosts/blender/addon.py rename to server_addon/blender/client/ayon_blender/addon.py index 6a4b325365..9711580369 100644 --- a/client/ayon_core/hosts/blender/addon.py +++ b/server_addon/blender/client/ayon_blender/addon.py @@ -1,18 +1,21 @@ import os from ayon_core.addon import AYONAddon, IHostAddon -BLENDER_ROOT_DIR = os.path.dirname(os.path.abspath(__file__)) +from .version import __version__ + +BLENDER_ADDON_ROOT = os.path.dirname(os.path.abspath(__file__)) class BlenderAddon(AYONAddon, IHostAddon): name = "blender" + version = __version__ host_name = "blender" def add_implementation_envs(self, env, _app): """Modify environments to contain all required for implementation.""" # Prepare path to implementation script implementation_user_script_path = os.path.join( - BLENDER_ROOT_DIR, + BLENDER_ADDON_ROOT, "blender_addon" ) @@ -61,7 +64,7 @@ class BlenderAddon(AYONAddon, IHostAddon): if app.host_name != self.host_name: return [] return [ - os.path.join(BLENDER_ROOT_DIR, "hooks") + os.path.join(BLENDER_ADDON_ROOT, "hooks") ] def get_workfile_extensions(self): diff --git a/client/ayon_core/hosts/blender/api/__init__.py b/server_addon/blender/client/ayon_blender/api/__init__.py similarity index 97% rename from client/ayon_core/hosts/blender/api/__init__.py rename to server_addon/blender/client/ayon_blender/api/__init__.py index ce2b444997..da2a6fbbbb 100644 --- a/client/ayon_core/hosts/blender/api/__init__.py +++ b/server_addon/blender/client/ayon_blender/api/__init__.py @@ -15,7 +15,6 @@ from .pipeline import ( from .plugin import ( Creator, - Loader, ) from .workio import ( @@ -51,7 +50,6 @@ __all__ = [ "BlenderHost", "Creator", - "Loader", # Workfiles API "open_file", diff --git a/client/ayon_core/hosts/blender/api/action.py b/server_addon/blender/client/ayon_blender/api/action.py similarity index 100% rename from client/ayon_core/hosts/blender/api/action.py rename to server_addon/blender/client/ayon_blender/api/action.py diff --git a/client/ayon_core/hosts/blender/api/capture.py b/server_addon/blender/client/ayon_blender/api/capture.py similarity index 100% rename from client/ayon_core/hosts/blender/api/capture.py rename to server_addon/blender/client/ayon_blender/api/capture.py diff --git a/client/ayon_core/hosts/blender/api/colorspace.py b/server_addon/blender/client/ayon_blender/api/colorspace.py similarity index 100% rename from client/ayon_core/hosts/blender/api/colorspace.py rename to server_addon/blender/client/ayon_blender/api/colorspace.py diff --git a/client/ayon_core/hosts/blender/api/icons/pyblish-32x32.png b/server_addon/blender/client/ayon_blender/api/icons/pyblish-32x32.png similarity index 100% rename from client/ayon_core/hosts/blender/api/icons/pyblish-32x32.png rename to server_addon/blender/client/ayon_blender/api/icons/pyblish-32x32.png diff --git a/client/ayon_core/hosts/blender/api/lib.py b/server_addon/blender/client/ayon_blender/api/lib.py similarity index 100% rename from client/ayon_core/hosts/blender/api/lib.py rename to server_addon/blender/client/ayon_blender/api/lib.py diff --git a/client/ayon_core/hosts/blender/api/ops.py b/server_addon/blender/client/ayon_blender/api/ops.py similarity index 99% rename from client/ayon_core/hosts/blender/api/ops.py rename to server_addon/blender/client/ayon_blender/api/ops.py index c03ec98d0c..7cf9600067 100644 --- a/client/ayon_core/hosts/blender/api/ops.py +++ b/server_addon/blender/client/ayon_blender/api/ops.py @@ -305,7 +305,7 @@ class LaunchCreator(LaunchQtApp): class LaunchLoader(LaunchQtApp): - """Launch Avalon Loader.""" + """Launch AYON Loader.""" bl_idname = "wm.avalon_loader" bl_label = "Load..." diff --git a/client/ayon_core/hosts/blender/api/pipeline.py b/server_addon/blender/client/ayon_blender/api/pipeline.py similarity index 99% rename from client/ayon_core/hosts/blender/api/pipeline.py rename to server_addon/blender/client/ayon_blender/api/pipeline.py index 84e78d0883..d2ff129a48 100644 --- a/client/ayon_core/hosts/blender/api/pipeline.py +++ b/server_addon/blender/client/ayon_blender/api/pipeline.py @@ -5,9 +5,6 @@ from typing import Callable, Dict, Iterator, List, Optional import bpy -from . import lib -from . import ops - import pyblish.api import ayon_api @@ -33,8 +30,12 @@ from ayon_core.lib import ( register_event_callback, emit_event ) -import ayon_core.hosts.blender from ayon_core.settings import get_project_settings +from ayon_blender import BLENDER_ADDON_ROOT + +from . import lib +from . import ops + from .workio import ( open_file, save_file, @@ -44,9 +45,7 @@ from .workio import ( work_root, ) - -HOST_DIR = os.path.dirname(os.path.abspath(ayon_core.hosts.blender.__file__)) -PLUGINS_DIR = os.path.join(HOST_DIR, "plugins") +PLUGINS_DIR = os.path.join(BLENDER_ADDON_ROOT, "plugins") PUBLISH_PATH = os.path.join(PLUGINS_DIR, "publish") LOAD_PATH = os.path.join(PLUGINS_DIR, "load") CREATE_PATH = os.path.join(PLUGINS_DIR, "create") diff --git a/client/ayon_core/hosts/blender/api/plugin.py b/server_addon/blender/client/ayon_blender/api/plugin.py similarity index 96% rename from client/ayon_core/hosts/blender/api/plugin.py rename to server_addon/blender/client/ayon_blender/api/plugin.py index e00e127f70..e72bf20287 100644 --- a/client/ayon_core/hosts/blender/api/plugin.py +++ b/server_addon/blender/client/ayon_blender/api/plugin.py @@ -4,6 +4,7 @@ import itertools from pathlib import Path from typing import Dict, List, Optional +import pyblish.api import bpy from ayon_core.pipeline import ( @@ -13,6 +14,7 @@ from ayon_core.pipeline import ( AVALON_INSTANCE_ID, AYON_INSTANCE_ID, ) +from ayon_core.pipeline.publish import Extractor from ayon_core.lib import BoolDef from .pipeline import ( @@ -161,10 +163,23 @@ def deselect_all(): bpy.context.view_layer.objects.active = active -class BaseCreator(Creator): +class BlenderInstancePlugin(pyblish.api.InstancePlugin): + settings_category = "blender" + + +class BlenderContextPlugin(pyblish.api.ContextPlugin): + settings_category = "blender" + + +class BlenderExtractor(Extractor): + settings_category = "blender" + + +class BlenderCreator(Creator): """Base class for Blender Creator plug-ins.""" defaults = ['Main'] + settings_category = "blender" create_as_asset_group = False @staticmethod @@ -265,7 +280,7 @@ class BaseCreator(Creator): return instance_node def collect_instances(self): - """Override abstract method from BaseCreator. + """Override abstract method from BlenderCreator. Collect existing instances related to this creator plugin.""" # Cache instances in shared data @@ -292,7 +307,7 @@ class BaseCreator(Creator): self._add_instance_to_context(instance) def update_instances(self, update_list): - """Override abstract method from BaseCreator. + """Override abstract method from BlenderCreator. Store changes of existing instances so they can be recollected. Args: @@ -376,13 +391,7 @@ class BaseCreator(Creator): ] -class Loader(LoaderPlugin): - """Base class for Loader plug-ins.""" - - hosts = ["blender"] - - -class AssetLoader(LoaderPlugin): +class BlenderLoader(LoaderPlugin): """A basic AssetLoader for Blender This will implement the basic logic for linking/appending assets @@ -392,6 +401,7 @@ class AssetLoader(LoaderPlugin): it's different for different types (e.g. model, rig, animation, etc.). """ + settings_category = "blender" @staticmethod def _get_instance_empty(instance_name: str, nodes: List) -> Optional[bpy.types.Object]: @@ -496,7 +506,7 @@ class AssetLoader(LoaderPlugin): # Only containerise if it's not already a collection from a .blend file. # representation = context["representation"]["name"] # if representation != "blend": - # from ayon_core.hosts.blender.api.pipeline import containerise + # from ayon_blender.api.pipeline import containerise # return containerise( # name=name, # namespace=namespace, diff --git a/client/ayon_core/hosts/blender/api/render_lib.py b/server_addon/blender/client/ayon_blender/api/render_lib.py similarity index 100% rename from client/ayon_core/hosts/blender/api/render_lib.py rename to server_addon/blender/client/ayon_blender/api/render_lib.py diff --git a/client/ayon_core/hosts/blender/api/workio.py b/server_addon/blender/client/ayon_blender/api/workio.py similarity index 100% rename from client/ayon_core/hosts/blender/api/workio.py rename to server_addon/blender/client/ayon_blender/api/workio.py diff --git a/client/ayon_core/hosts/blender/blender_addon/startup/init.py b/server_addon/blender/client/ayon_blender/blender_addon/startup/init.py similarity index 70% rename from client/ayon_core/hosts/blender/blender_addon/startup/init.py rename to server_addon/blender/client/ayon_blender/blender_addon/startup/init.py index 816f30f73f..bd0d52627c 100644 --- a/client/ayon_core/hosts/blender/blender_addon/startup/init.py +++ b/server_addon/blender/client/ayon_blender/blender_addon/startup/init.py @@ -1,5 +1,5 @@ from ayon_core.pipeline import install_host -from ayon_core.hosts.blender.api import BlenderHost +from ayon_blender.api import BlenderHost def register(): diff --git a/client/ayon_core/hosts/blender/hooks/pre_add_run_python_script_arg.py b/server_addon/blender/client/ayon_blender/hooks/pre_add_run_python_script_arg.py similarity index 100% rename from client/ayon_core/hosts/blender/hooks/pre_add_run_python_script_arg.py rename to server_addon/blender/client/ayon_blender/hooks/pre_add_run_python_script_arg.py diff --git a/client/ayon_core/hosts/blender/hooks/pre_pyside_install.py b/server_addon/blender/client/ayon_blender/hooks/pre_pyside_install.py similarity index 100% rename from client/ayon_core/hosts/blender/hooks/pre_pyside_install.py rename to server_addon/blender/client/ayon_blender/hooks/pre_pyside_install.py diff --git a/client/ayon_core/hosts/blender/hooks/pre_windows_console.py b/server_addon/blender/client/ayon_blender/hooks/pre_windows_console.py similarity index 100% rename from client/ayon_core/hosts/blender/hooks/pre_windows_console.py rename to server_addon/blender/client/ayon_blender/hooks/pre_windows_console.py diff --git a/client/ayon_core/hosts/blender/plugins/create/convert_legacy.py b/server_addon/blender/client/ayon_blender/plugins/create/convert_legacy.py similarity index 96% rename from client/ayon_core/hosts/blender/plugins/create/convert_legacy.py rename to server_addon/blender/client/ayon_blender/plugins/create/convert_legacy.py index 613574eee0..095f3ab919 100644 --- a/client/ayon_core/hosts/blender/plugins/create/convert_legacy.py +++ b/server_addon/blender/client/ayon_blender/plugins/create/convert_legacy.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Converter for legacy Houdini products.""" from ayon_core.pipeline.create.creator_plugins import ProductConvertorPlugin -from ayon_core.hosts.blender.api.lib import imprint +from ayon_blender.api.lib import imprint class BlenderLegacyConvertor(ProductConvertorPlugin): @@ -42,7 +42,7 @@ class BlenderLegacyConvertor(ProductConvertorPlugin): parameter on them. This is using cached entries done in - :py:meth:`~BaseCreator.cache_instance_data()` + :py:meth:`~BlenderCreator.cache_instance_data()` """ self.legacy_instances = self.collection_shared_data.get( diff --git a/client/ayon_core/hosts/blender/plugins/create/create_action.py b/server_addon/blender/client/ayon_blender/plugins/create/create_action.py similarity index 92% rename from client/ayon_core/hosts/blender/plugins/create/create_action.py rename to server_addon/blender/client/ayon_blender/plugins/create/create_action.py index 070b9843c3..123a2e0df1 100644 --- a/client/ayon_core/hosts/blender/plugins/create/create_action.py +++ b/server_addon/blender/client/ayon_blender/plugins/create/create_action.py @@ -2,10 +2,10 @@ import bpy -from ayon_core.hosts.blender.api import lib, plugin +from ayon_blender.api import lib, plugin -class CreateAction(plugin.BaseCreator): +class CreateAction(plugin.BlenderCreator): """Action output for character rigs.""" identifier = "io.openpype.creators.blender.action" diff --git a/client/ayon_core/hosts/blender/plugins/create/create_animation.py b/server_addon/blender/client/ayon_blender/plugins/create/create_animation.py similarity index 90% rename from client/ayon_core/hosts/blender/plugins/create/create_animation.py rename to server_addon/blender/client/ayon_blender/plugins/create/create_animation.py index b806a5a7ca..cfb2c254ef 100644 --- a/client/ayon_core/hosts/blender/plugins/create/create_animation.py +++ b/server_addon/blender/client/ayon_blender/plugins/create/create_animation.py @@ -1,9 +1,9 @@ """Create an animation asset.""" -from ayon_core.hosts.blender.api import plugin, lib +from ayon_blender.api import plugin, lib -class CreateAnimation(plugin.BaseCreator): +class CreateAnimation(plugin.BlenderCreator): """Animation output for character rigs.""" identifier = "io.openpype.creators.blender.animation" diff --git a/client/ayon_core/hosts/blender/plugins/create/create_blendScene.py b/server_addon/blender/client/ayon_blender/plugins/create/create_blendScene.py similarity index 90% rename from client/ayon_core/hosts/blender/plugins/create/create_blendScene.py rename to server_addon/blender/client/ayon_blender/plugins/create/create_blendScene.py index 51250bf18b..363a35883b 100644 --- a/client/ayon_core/hosts/blender/plugins/create/create_blendScene.py +++ b/server_addon/blender/client/ayon_blender/plugins/create/create_blendScene.py @@ -2,10 +2,10 @@ import bpy -from ayon_core.hosts.blender.api import plugin, lib +from ayon_blender.api import plugin, lib -class CreateBlendScene(plugin.BaseCreator): +class CreateBlendScene(plugin.BlenderCreator): """Generic group of assets.""" identifier = "io.openpype.creators.blender.blendscene" diff --git a/client/ayon_core/hosts/blender/plugins/create/create_camera.py b/server_addon/blender/client/ayon_blender/plugins/create/create_camera.py similarity index 87% rename from client/ayon_core/hosts/blender/plugins/create/create_camera.py rename to server_addon/blender/client/ayon_blender/plugins/create/create_camera.py index cd82bec236..8cfe8f989b 100644 --- a/client/ayon_core/hosts/blender/plugins/create/create_camera.py +++ b/server_addon/blender/client/ayon_blender/plugins/create/create_camera.py @@ -2,11 +2,11 @@ import bpy -from ayon_core.hosts.blender.api import plugin, lib -from ayon_core.hosts.blender.api.pipeline import AVALON_INSTANCES +from ayon_blender.api import plugin, lib +from ayon_blender.api.pipeline import AVALON_INSTANCES -class CreateCamera(plugin.BaseCreator): +class CreateCamera(plugin.BlenderCreator): """Polygonal static geometry.""" identifier = "io.openpype.creators.blender.camera" diff --git a/client/ayon_core/hosts/blender/plugins/create/create_layout.py b/server_addon/blender/client/ayon_blender/plugins/create/create_layout.py similarity index 89% rename from client/ayon_core/hosts/blender/plugins/create/create_layout.py rename to server_addon/blender/client/ayon_blender/plugins/create/create_layout.py index 289c39fc38..1e0f8effdd 100644 --- a/client/ayon_core/hosts/blender/plugins/create/create_layout.py +++ b/server_addon/blender/client/ayon_blender/plugins/create/create_layout.py @@ -2,10 +2,10 @@ import bpy -from ayon_core.hosts.blender.api import plugin, lib +from ayon_blender.api import plugin, lib -class CreateLayout(plugin.BaseCreator): +class CreateLayout(plugin.BlenderCreator): """Layout output for character rigs.""" identifier = "io.openpype.creators.blender.layout" diff --git a/client/ayon_core/hosts/blender/plugins/create/create_model.py b/server_addon/blender/client/ayon_blender/plugins/create/create_model.py similarity index 89% rename from client/ayon_core/hosts/blender/plugins/create/create_model.py rename to server_addon/blender/client/ayon_blender/plugins/create/create_model.py index 837ba47417..7e8bf566ea 100644 --- a/client/ayon_core/hosts/blender/plugins/create/create_model.py +++ b/server_addon/blender/client/ayon_blender/plugins/create/create_model.py @@ -2,10 +2,10 @@ import bpy -from ayon_core.hosts.blender.api import plugin, lib +from ayon_blender.api import plugin, lib -class CreateModel(plugin.BaseCreator): +class CreateModel(plugin.BlenderCreator): """Polygonal static geometry.""" identifier = "io.openpype.creators.blender.model" diff --git a/client/ayon_core/hosts/blender/plugins/create/create_pointcache.py b/server_addon/blender/client/ayon_blender/plugins/create/create_pointcache.py similarity index 88% rename from client/ayon_core/hosts/blender/plugins/create/create_pointcache.py rename to server_addon/blender/client/ayon_blender/plugins/create/create_pointcache.py index 0aa2d62c17..9730ddb89d 100644 --- a/client/ayon_core/hosts/blender/plugins/create/create_pointcache.py +++ b/server_addon/blender/client/ayon_blender/plugins/create/create_pointcache.py @@ -1,9 +1,9 @@ """Create a pointcache asset.""" -from ayon_core.hosts.blender.api import plugin, lib +from ayon_blender.api import plugin, lib -class CreatePointcache(plugin.BaseCreator): +class CreatePointcache(plugin.BlenderCreator): """Polygonal static geometry.""" identifier = "io.openpype.creators.blender.pointcache" diff --git a/client/ayon_core/hosts/blender/plugins/create/create_render.py b/server_addon/blender/client/ayon_blender/plugins/create/create_render.py similarity index 86% rename from client/ayon_core/hosts/blender/plugins/create/create_render.py rename to server_addon/blender/client/ayon_blender/plugins/create/create_render.py index bf3d1e62b3..6bbedb957f 100644 --- a/client/ayon_core/hosts/blender/plugins/create/create_render.py +++ b/server_addon/blender/client/ayon_blender/plugins/create/create_render.py @@ -2,12 +2,12 @@ import bpy from ayon_core.lib import version_up -from ayon_core.hosts.blender.api import plugin -from ayon_core.hosts.blender.api.render_lib import prepare_rendering -from ayon_core.hosts.blender.api.workio import save_file +from ayon_blender.api import plugin +from ayon_blender.api.render_lib import prepare_rendering +from ayon_blender.api.workio import save_file -class CreateRenderlayer(plugin.BaseCreator): +class CreateRenderlayer(plugin.BlenderCreator): """Single baked camera.""" identifier = "io.openpype.creators.blender.render" diff --git a/client/ayon_core/hosts/blender/plugins/create/create_review.py b/server_addon/blender/client/ayon_blender/plugins/create/create_review.py similarity index 87% rename from client/ayon_core/hosts/blender/plugins/create/create_review.py rename to server_addon/blender/client/ayon_blender/plugins/create/create_review.py index b478ec59f4..dbef9e371f 100644 --- a/client/ayon_core/hosts/blender/plugins/create/create_review.py +++ b/server_addon/blender/client/ayon_blender/plugins/create/create_review.py @@ -1,9 +1,9 @@ """Create review.""" -from ayon_core.hosts.blender.api import plugin, lib +from ayon_blender.api import plugin, lib -class CreateReview(plugin.BaseCreator): +class CreateReview(plugin.BlenderCreator): """Single baked camera.""" identifier = "io.openpype.creators.blender.review" diff --git a/client/ayon_core/hosts/blender/plugins/create/create_rig.py b/server_addon/blender/client/ayon_blender/plugins/create/create_rig.py similarity index 89% rename from client/ayon_core/hosts/blender/plugins/create/create_rig.py rename to server_addon/blender/client/ayon_blender/plugins/create/create_rig.py index 10b6b20d36..aad24bda69 100644 --- a/client/ayon_core/hosts/blender/plugins/create/create_rig.py +++ b/server_addon/blender/client/ayon_blender/plugins/create/create_rig.py @@ -2,10 +2,10 @@ import bpy -from ayon_core.hosts.blender.api import plugin, lib +from ayon_blender.api import plugin, lib -class CreateRig(plugin.BaseCreator): +class CreateRig(plugin.BlenderCreator): """Artist-friendly rig with controls to direct motion.""" identifier = "io.openpype.creators.blender.rig" diff --git a/client/ayon_core/hosts/blender/plugins/create/create_usd.py b/server_addon/blender/client/ayon_blender/plugins/create/create_usd.py similarity index 88% rename from client/ayon_core/hosts/blender/plugins/create/create_usd.py rename to server_addon/blender/client/ayon_blender/plugins/create/create_usd.py index 2c2d0c46c6..d7770b15f7 100644 --- a/client/ayon_core/hosts/blender/plugins/create/create_usd.py +++ b/server_addon/blender/client/ayon_blender/plugins/create/create_usd.py @@ -1,9 +1,9 @@ """Create a USD Export.""" -from ayon_core.hosts.blender.api import plugin, lib +from ayon_blender.api import plugin, lib -class CreateUSD(plugin.BaseCreator): +class CreateUSD(plugin.BlenderCreator): """Create USD Export""" identifier = "io.openpype.creators.blender.usd" diff --git a/client/ayon_core/hosts/blender/plugins/create/create_workfile.py b/server_addon/blender/client/ayon_blender/plugins/create/create_workfile.py similarity index 96% rename from client/ayon_core/hosts/blender/plugins/create/create_workfile.py rename to server_addon/blender/client/ayon_blender/plugins/create/create_workfile.py index 296a03e317..03cfc322a9 100644 --- a/client/ayon_core/hosts/blender/plugins/create/create_workfile.py +++ b/server_addon/blender/client/ayon_blender/plugins/create/create_workfile.py @@ -2,14 +2,14 @@ import bpy import ayon_api from ayon_core.pipeline import CreatedInstance, AutoCreator -from ayon_core.hosts.blender.api.plugin import BaseCreator -from ayon_core.hosts.blender.api.pipeline import ( +from ayon_blender.api.plugin import BlenderCreator +from ayon_blender.api.pipeline import ( AVALON_PROPERTY, AVALON_CONTAINERS ) -class CreateWorkfile(BaseCreator, AutoCreator): +class CreateWorkfile(BlenderCreator, AutoCreator): """Workfile auto-creator. The workfile instance stores its data on the `AVALON_CONTAINERS` collection diff --git a/client/ayon_core/hosts/blender/plugins/load/import_workfile.py b/server_addon/blender/client/ayon_blender/plugins/load/import_workfile.py similarity index 95% rename from client/ayon_core/hosts/blender/plugins/load/import_workfile.py rename to server_addon/blender/client/ayon_blender/plugins/load/import_workfile.py index d2e58c7752..16cba6913d 100644 --- a/client/ayon_core/hosts/blender/plugins/load/import_workfile.py +++ b/server_addon/blender/client/ayon_blender/plugins/load/import_workfile.py @@ -1,6 +1,6 @@ import bpy -from ayon_core.hosts.blender.api import plugin +from ayon_blender.api import plugin def append_workfile(context, fname, do_import): @@ -34,7 +34,7 @@ def append_workfile(context, fname, do_import): collection.children.link(coll) -class AppendBlendLoader(plugin.AssetLoader): +class AppendBlendLoader(plugin.BlenderLoader): """Append workfile in Blender (unmanaged) Warning: @@ -59,7 +59,7 @@ class AppendBlendLoader(plugin.AssetLoader): return -class ImportBlendLoader(plugin.AssetLoader): +class ImportBlendLoader(plugin.BlenderLoader): """Import workfile in the current Blender scene (unmanaged) Warning: diff --git a/client/ayon_core/hosts/blender/plugins/load/load_action.py b/server_addon/blender/client/ayon_blender/plugins/load/load_action.py similarity index 98% rename from client/ayon_core/hosts/blender/plugins/load/load_action.py rename to server_addon/blender/client/ayon_blender/plugins/load/load_action.py index 8135df042a..ddfaa94044 100644 --- a/client/ayon_core/hosts/blender/plugins/load/load_action.py +++ b/server_addon/blender/client/ayon_blender/plugins/load/load_action.py @@ -7,8 +7,8 @@ from typing import Dict, List, Optional import bpy from ayon_core.pipeline import get_representation_path -from ayon_core.hosts.blender.api import plugin -from ayon_core.hosts.blender.api.pipeline import ( +from ayon_blender.api import plugin +from ayon_blender.api.pipeline import ( containerise_existing, AVALON_PROPERTY, ) @@ -16,7 +16,7 @@ from ayon_core.hosts.blender.api.pipeline import ( logger = logging.getLogger("ayon").getChild("blender").getChild("load_action") -class BlendActionLoader(plugin.AssetLoader): +class BlendActionLoader(plugin.BlenderLoader): """Load action from a .blend file. Warning: diff --git a/client/ayon_core/hosts/blender/plugins/load/load_animation.py b/server_addon/blender/client/ayon_blender/plugins/load/load_animation.py similarity index 92% rename from client/ayon_core/hosts/blender/plugins/load/load_animation.py rename to server_addon/blender/client/ayon_blender/plugins/load/load_animation.py index c9f3b33a6f..241b76b600 100644 --- a/client/ayon_core/hosts/blender/plugins/load/load_animation.py +++ b/server_addon/blender/client/ayon_blender/plugins/load/load_animation.py @@ -4,11 +4,11 @@ from typing import Dict, List, Optional import bpy -from ayon_core.hosts.blender.api import plugin -from ayon_core.hosts.blender.api.pipeline import AVALON_PROPERTY +from ayon_blender.api import plugin +from ayon_blender.api.pipeline import AVALON_PROPERTY -class BlendAnimationLoader(plugin.AssetLoader): +class BlendAnimationLoader(plugin.BlenderLoader): """Load animations from a .blend file. Warning: diff --git a/client/ayon_core/hosts/blender/plugins/load/load_audio.py b/server_addon/blender/client/ayon_blender/plugins/load/load_audio.py similarity index 98% rename from client/ayon_core/hosts/blender/plugins/load/load_audio.py rename to server_addon/blender/client/ayon_blender/plugins/load/load_audio.py index 3d2f412e2b..b8682e7c13 100644 --- a/client/ayon_core/hosts/blender/plugins/load/load_audio.py +++ b/server_addon/blender/client/ayon_blender/plugins/load/load_audio.py @@ -10,14 +10,14 @@ from ayon_core.pipeline import ( get_representation_path, AVALON_CONTAINER_ID, ) -from ayon_core.hosts.blender.api import plugin -from ayon_core.hosts.blender.api.pipeline import ( +from ayon_blender.api import plugin +from ayon_blender.api.pipeline import ( AVALON_CONTAINERS, AVALON_PROPERTY, ) -class AudioLoader(plugin.AssetLoader): +class AudioLoader(plugin.BlenderLoader): """Load audio in Blender.""" product_types = {"audio"} diff --git a/client/ayon_core/hosts/blender/plugins/load/load_blend.py b/server_addon/blender/client/ayon_blender/plugins/load/load_blend.py similarity index 98% rename from client/ayon_core/hosts/blender/plugins/load/load_blend.py rename to server_addon/blender/client/ayon_blender/plugins/load/load_blend.py index f9377d615c..c9f3ec0c71 100644 --- a/client/ayon_core/hosts/blender/plugins/load/load_blend.py +++ b/server_addon/blender/client/ayon_blender/plugins/load/load_blend.py @@ -9,15 +9,15 @@ from ayon_core.pipeline import ( registered_host ) from ayon_core.pipeline.create import CreateContext -from ayon_core.hosts.blender.api import plugin -from ayon_core.hosts.blender.api.lib import imprint -from ayon_core.hosts.blender.api.pipeline import ( +from ayon_blender.api import plugin +from ayon_blender.api.lib import imprint +from ayon_blender.api.pipeline import ( AVALON_CONTAINERS, AVALON_PROPERTY, ) -class BlendLoader(plugin.AssetLoader): +class BlendLoader(plugin.BlenderLoader): """Load assets from a .blend file.""" product_types = {"model", "rig", "layout", "camera"} diff --git a/client/ayon_core/hosts/blender/plugins/load/load_blendscene.py b/server_addon/blender/client/ayon_blender/plugins/load/load_blendscene.py similarity index 97% rename from client/ayon_core/hosts/blender/plugins/load/load_blendscene.py rename to server_addon/blender/client/ayon_blender/plugins/load/load_blendscene.py index f91d828d83..590ab0079e 100644 --- a/client/ayon_core/hosts/blender/plugins/load/load_blendscene.py +++ b/server_addon/blender/client/ayon_blender/plugins/load/load_blendscene.py @@ -7,15 +7,15 @@ from ayon_core.pipeline import ( get_representation_path, AVALON_CONTAINER_ID, ) -from ayon_core.hosts.blender.api import plugin -from ayon_core.hosts.blender.api.lib import imprint -from ayon_core.hosts.blender.api.pipeline import ( +from ayon_blender.api import plugin +from ayon_blender.api.lib import imprint +from ayon_blender.api.pipeline import ( AVALON_CONTAINERS, AVALON_PROPERTY, ) -class BlendSceneLoader(plugin.AssetLoader): +class BlendSceneLoader(plugin.BlenderLoader): """Load assets from a .blend file.""" product_types = {"blendScene"} diff --git a/client/ayon_core/hosts/blender/plugins/load/load_cache.py b/server_addon/blender/client/ayon_blender/plugins/load/load_cache.py similarity index 98% rename from client/ayon_core/hosts/blender/plugins/load/load_cache.py rename to server_addon/blender/client/ayon_blender/plugins/load/load_cache.py index 30c847f89d..599610ff39 100644 --- a/client/ayon_core/hosts/blender/plugins/load/load_cache.py +++ b/server_addon/blender/client/ayon_blender/plugins/load/load_cache.py @@ -11,14 +11,14 @@ from ayon_core.pipeline import ( AVALON_CONTAINER_ID, ) -from ayon_core.hosts.blender.api.pipeline import ( +from ayon_blender.api.pipeline import ( AVALON_CONTAINERS, AVALON_PROPERTY, ) -from ayon_core.hosts.blender.api import plugin, lib +from ayon_blender.api import plugin, lib -class CacheModelLoader(plugin.AssetLoader): +class CacheModelLoader(plugin.BlenderLoader): """Load cache models. Stores the imported asset in a collection named after the asset. diff --git a/client/ayon_core/hosts/blender/plugins/load/load_camera_abc.py b/server_addon/blender/client/ayon_blender/plugins/load/load_camera_abc.py similarity index 98% rename from client/ayon_core/hosts/blender/plugins/load/load_camera_abc.py rename to server_addon/blender/client/ayon_blender/plugins/load/load_camera_abc.py index a49bb40d9a..7305afd423 100644 --- a/client/ayon_core/hosts/blender/plugins/load/load_camera_abc.py +++ b/server_addon/blender/client/ayon_blender/plugins/load/load_camera_abc.py @@ -10,14 +10,14 @@ from ayon_core.pipeline import ( get_representation_path, AVALON_CONTAINER_ID, ) -from ayon_core.hosts.blender.api import plugin, lib -from ayon_core.hosts.blender.api.pipeline import ( +from ayon_blender.api import plugin, lib +from ayon_blender.api.pipeline import ( AVALON_CONTAINERS, AVALON_PROPERTY, ) -class AbcCameraLoader(plugin.AssetLoader): +class AbcCameraLoader(plugin.BlenderLoader): """Load a camera from Alembic file. Stores the imported asset in an empty named after the asset. diff --git a/client/ayon_core/hosts/blender/plugins/load/load_camera_fbx.py b/server_addon/blender/client/ayon_blender/plugins/load/load_camera_fbx.py similarity index 97% rename from client/ayon_core/hosts/blender/plugins/load/load_camera_fbx.py rename to server_addon/blender/client/ayon_blender/plugins/load/load_camera_fbx.py index a510d42850..d2900c6c3f 100644 --- a/client/ayon_core/hosts/blender/plugins/load/load_camera_fbx.py +++ b/server_addon/blender/client/ayon_blender/plugins/load/load_camera_fbx.py @@ -10,14 +10,14 @@ from ayon_core.pipeline import ( get_representation_path, AVALON_CONTAINER_ID, ) -from ayon_core.hosts.blender.api import plugin, lib -from ayon_core.hosts.blender.api.pipeline import ( +from ayon_blender.api import plugin, lib +from ayon_blender.api.pipeline import ( AVALON_CONTAINERS, AVALON_PROPERTY, ) -class FbxCameraLoader(plugin.AssetLoader): +class FbxCameraLoader(plugin.BlenderLoader): """Load a camera from FBX. Stores the imported asset in an empty named after the asset. diff --git a/client/ayon_core/hosts/blender/plugins/load/load_fbx.py b/server_addon/blender/client/ayon_blender/plugins/load/load_fbx.py similarity index 98% rename from client/ayon_core/hosts/blender/plugins/load/load_fbx.py rename to server_addon/blender/client/ayon_blender/plugins/load/load_fbx.py index e323d49dea..fe3d747dab 100644 --- a/client/ayon_core/hosts/blender/plugins/load/load_fbx.py +++ b/server_addon/blender/client/ayon_blender/plugins/load/load_fbx.py @@ -10,14 +10,14 @@ from ayon_core.pipeline import ( get_representation_path, AVALON_CONTAINER_ID, ) -from ayon_core.hosts.blender.api import plugin, lib -from ayon_core.hosts.blender.api.pipeline import ( +from ayon_blender.api import plugin, lib +from ayon_blender.api.pipeline import ( AVALON_CONTAINERS, AVALON_PROPERTY, ) -class FbxModelLoader(plugin.AssetLoader): +class FbxModelLoader(plugin.BlenderLoader): """Load FBX models. Stores the imported asset in an empty named after the asset. diff --git a/client/ayon_core/hosts/blender/plugins/load/load_layout_json.py b/server_addon/blender/client/ayon_blender/plugins/load/load_layout_json.py similarity index 98% rename from client/ayon_core/hosts/blender/plugins/load/load_layout_json.py rename to server_addon/blender/client/ayon_blender/plugins/load/load_layout_json.py index d20eaad9fc..9a2d17b4fc 100644 --- a/client/ayon_core/hosts/blender/plugins/load/load_layout_json.py +++ b/server_addon/blender/client/ayon_blender/plugins/load/load_layout_json.py @@ -15,15 +15,15 @@ from ayon_core.pipeline import ( loaders_from_representation, AVALON_CONTAINER_ID, ) -from ayon_core.hosts.blender.api.pipeline import ( +from ayon_blender.api.pipeline import ( AVALON_INSTANCES, AVALON_CONTAINERS, AVALON_PROPERTY, ) -from ayon_core.hosts.blender.api import plugin +from ayon_blender.api import plugin -class JsonLayoutLoader(plugin.AssetLoader): +class JsonLayoutLoader(plugin.BlenderLoader): """Load layout published from Unreal.""" product_types = {"layout"} diff --git a/client/ayon_core/hosts/blender/plugins/load/load_look.py b/server_addon/blender/client/ayon_blender/plugins/load/load_look.py similarity index 98% rename from client/ayon_core/hosts/blender/plugins/load/load_look.py rename to server_addon/blender/client/ayon_blender/plugins/load/load_look.py index 75401f94ec..d214917d3e 100644 --- a/client/ayon_core/hosts/blender/plugins/load/load_look.py +++ b/server_addon/blender/client/ayon_blender/plugins/load/load_look.py @@ -9,14 +9,14 @@ import json import bpy from ayon_core.pipeline import get_representation_path -from ayon_core.hosts.blender.api import plugin -from ayon_core.hosts.blender.api.pipeline import ( +from ayon_blender.api import plugin +from ayon_blender.api.pipeline import ( containerise_existing, AVALON_PROPERTY ) -class BlendLookLoader(plugin.AssetLoader): +class BlendLookLoader(plugin.BlenderLoader): """Load models from a .blend file. Because they come from a .blend file we can simply link the collection that diff --git a/client/ayon_core/hosts/blender/plugins/publish/collect_current_file.py b/server_addon/blender/client/ayon_blender/plugins/publish/collect_current_file.py similarity index 76% rename from client/ayon_core/hosts/blender/plugins/publish/collect_current_file.py rename to server_addon/blender/client/ayon_blender/plugins/publish/collect_current_file.py index 7370f6cbe8..6568372169 100644 --- a/client/ayon_core/hosts/blender/plugins/publish/collect_current_file.py +++ b/server_addon/blender/client/ayon_blender/plugins/publish/collect_current_file.py @@ -1,8 +1,8 @@ import pyblish.api -from ayon_core.hosts.blender.api import workio +from ayon_blender.api import workio, plugin -class CollectBlenderCurrentFile(pyblish.api.ContextPlugin): +class CollectBlenderCurrentFile(plugin.BlenderContextPlugin): """Inject the current working file into context""" order = pyblish.api.CollectorOrder - 0.5 diff --git a/client/ayon_core/hosts/blender/plugins/publish/collect_instance.py b/server_addon/blender/client/ayon_blender/plugins/publish/collect_instance.py similarity index 90% rename from client/ayon_core/hosts/blender/plugins/publish/collect_instance.py rename to server_addon/blender/client/ayon_blender/plugins/publish/collect_instance.py index 314ffd368a..7d6f841ba3 100644 --- a/client/ayon_core/hosts/blender/plugins/publish/collect_instance.py +++ b/server_addon/blender/client/ayon_blender/plugins/publish/collect_instance.py @@ -3,10 +3,11 @@ import bpy import pyblish.api from ayon_core.pipeline.publish import KnownPublishError -from ayon_core.hosts.blender.api.pipeline import AVALON_PROPERTY +from ayon_blender.api import plugin +from ayon_blender.api.pipeline import AVALON_PROPERTY -class CollectBlenderInstanceData(pyblish.api.InstancePlugin): +class CollectBlenderInstanceData(plugin.BlenderInstancePlugin): """Validator to verify that the instance is not empty""" order = pyblish.api.CollectorOrder diff --git a/client/ayon_core/hosts/blender/plugins/publish/collect_render.py b/server_addon/blender/client/ayon_blender/plugins/publish/collect_render.py similarity index 97% rename from client/ayon_core/hosts/blender/plugins/publish/collect_render.py rename to server_addon/blender/client/ayon_blender/plugins/publish/collect_render.py index 1ad2de2b7d..ac5dc5bf6f 100644 --- a/client/ayon_core/hosts/blender/plugins/publish/collect_render.py +++ b/server_addon/blender/client/ayon_blender/plugins/publish/collect_render.py @@ -5,12 +5,12 @@ import os import re import bpy - -from ayon_core.hosts.blender.api import colorspace import pyblish.api +from ayon_blender.api import colorspace, plugin -class CollectBlenderRender(pyblish.api.InstancePlugin): + +class CollectBlenderRender(plugin.BlenderInstancePlugin): """Gather all publishable render instances.""" order = pyblish.api.CollectorOrder + 0.01 diff --git a/client/ayon_core/hosts/blender/plugins/publish/collect_review.py b/server_addon/blender/client/ayon_blender/plugins/publish/collect_review.py similarity index 95% rename from client/ayon_core/hosts/blender/plugins/publish/collect_review.py rename to server_addon/blender/client/ayon_blender/plugins/publish/collect_review.py index 2c077398da..c013910b5a 100644 --- a/client/ayon_core/hosts/blender/plugins/publish/collect_review.py +++ b/server_addon/blender/client/ayon_blender/plugins/publish/collect_review.py @@ -1,9 +1,9 @@ import bpy - import pyblish.api +from ayon_blender.api import plugin -class CollectReview(pyblish.api.InstancePlugin): +class CollectReview(plugin.BlenderInstancePlugin): """Collect Review data """ diff --git a/client/ayon_core/hosts/blender/plugins/publish/collect_workfile.py b/server_addon/blender/client/ayon_blender/plugins/publish/collect_workfile.py similarity index 89% rename from client/ayon_core/hosts/blender/plugins/publish/collect_workfile.py rename to server_addon/blender/client/ayon_blender/plugins/publish/collect_workfile.py index 6561c89605..347a5caf01 100644 --- a/client/ayon_core/hosts/blender/plugins/publish/collect_workfile.py +++ b/server_addon/blender/client/ayon_blender/plugins/publish/collect_workfile.py @@ -1,9 +1,10 @@ from pathlib import Path -from pyblish.api import InstancePlugin, CollectorOrder +from pyblish.api import CollectorOrder +from ayon_blender.api import plugin -class CollectWorkfile(InstancePlugin): +class CollectWorkfile(plugin.BlenderInstancePlugin): """Inject workfile data into its instance.""" order = CollectorOrder diff --git a/client/ayon_core/hosts/blender/plugins/publish/extract_abc.py b/server_addon/blender/client/ayon_blender/plugins/publish/extract_abc.py similarity index 95% rename from client/ayon_core/hosts/blender/plugins/publish/extract_abc.py rename to server_addon/blender/client/ayon_blender/plugins/publish/extract_abc.py index 6590be515c..5da0258586 100644 --- a/client/ayon_core/hosts/blender/plugins/publish/extract_abc.py +++ b/server_addon/blender/client/ayon_blender/plugins/publish/extract_abc.py @@ -4,10 +4,10 @@ import bpy from ayon_core.lib import BoolDef from ayon_core.pipeline import publish -from ayon_core.hosts.blender.api import plugin +from ayon_blender.api import plugin -class ExtractABC(publish.Extractor, publish.OptionalPyblishPluginMixin): +class ExtractABC(plugin.BlenderExtractor, publish.OptionalPyblishPluginMixin): """Extract as ABC.""" label = "Extract ABC" diff --git a/client/ayon_core/hosts/blender/plugins/publish/extract_abc_animation.py b/server_addon/blender/client/ayon_blender/plugins/publish/extract_abc_animation.py similarity index 94% rename from client/ayon_core/hosts/blender/plugins/publish/extract_abc_animation.py rename to server_addon/blender/client/ayon_blender/plugins/publish/extract_abc_animation.py index f33af13282..503593c8d3 100644 --- a/client/ayon_core/hosts/blender/plugins/publish/extract_abc_animation.py +++ b/server_addon/blender/client/ayon_blender/plugins/publish/extract_abc_animation.py @@ -3,12 +3,12 @@ import os import bpy from ayon_core.pipeline import publish -from ayon_core.hosts.blender.api import plugin +from ayon_blender.api import plugin class ExtractAnimationABC( - publish.Extractor, - publish.OptionalPyblishPluginMixin, + plugin.BlenderExtractor, + publish.OptionalPyblishPluginMixin, ): """Extract as ABC.""" diff --git a/client/ayon_core/hosts/blender/plugins/publish/extract_blend.py b/server_addon/blender/client/ayon_blender/plugins/publish/extract_blend.py similarity index 94% rename from client/ayon_core/hosts/blender/plugins/publish/extract_blend.py rename to server_addon/blender/client/ayon_blender/plugins/publish/extract_blend.py index 19fe9c6271..520bc274a1 100644 --- a/client/ayon_core/hosts/blender/plugins/publish/extract_blend.py +++ b/server_addon/blender/client/ayon_blender/plugins/publish/extract_blend.py @@ -3,9 +3,12 @@ import os import bpy from ayon_core.pipeline import publish +from ayon_blender.api import plugin -class ExtractBlend(publish.Extractor, publish.OptionalPyblishPluginMixin): +class ExtractBlend( + plugin.BlenderExtractor, publish.OptionalPyblishPluginMixin +): """Extract a blend file.""" label = "Extract Blend" diff --git a/client/ayon_core/hosts/blender/plugins/publish/extract_blend_animation.py b/server_addon/blender/client/ayon_blender/plugins/publish/extract_blend_animation.py similarity index 94% rename from client/ayon_core/hosts/blender/plugins/publish/extract_blend_animation.py rename to server_addon/blender/client/ayon_blender/plugins/publish/extract_blend_animation.py index 315fbb19af..cca8ab2dd6 100644 --- a/client/ayon_core/hosts/blender/plugins/publish/extract_blend_animation.py +++ b/server_addon/blender/client/ayon_blender/plugins/publish/extract_blend_animation.py @@ -3,11 +3,12 @@ import os import bpy from ayon_core.pipeline import publish +from ayon_blender.api import plugin class ExtractBlendAnimation( - publish.Extractor, - publish.OptionalPyblishPluginMixin, + plugin.BlenderExtractor, + publish.OptionalPyblishPluginMixin, ): """Extract a blend file.""" diff --git a/client/ayon_core/hosts/blender/plugins/publish/extract_camera_abc.py b/server_addon/blender/client/ayon_blender/plugins/publish/extract_camera_abc.py similarity index 93% rename from client/ayon_core/hosts/blender/plugins/publish/extract_camera_abc.py rename to server_addon/blender/client/ayon_blender/plugins/publish/extract_camera_abc.py index c60c92dee1..278cd293c5 100644 --- a/client/ayon_core/hosts/blender/plugins/publish/extract_camera_abc.py +++ b/server_addon/blender/client/ayon_blender/plugins/publish/extract_camera_abc.py @@ -3,10 +3,12 @@ import os import bpy from ayon_core.pipeline import publish -from ayon_core.hosts.blender.api import plugin +from ayon_blender.api import plugin -class ExtractCameraABC(publish.Extractor, publish.OptionalPyblishPluginMixin): +class ExtractCameraABC( + plugin.BlenderExtractor, publish.OptionalPyblishPluginMixin +): """Extract camera as ABC.""" label = "Extract Camera (ABC)" diff --git a/client/ayon_core/hosts/blender/plugins/publish/extract_camera_fbx.py b/server_addon/blender/client/ayon_blender/plugins/publish/extract_camera_fbx.py similarity index 94% rename from client/ayon_core/hosts/blender/plugins/publish/extract_camera_fbx.py rename to server_addon/blender/client/ayon_blender/plugins/publish/extract_camera_fbx.py index bcaf9ebc44..9094355a72 100644 --- a/client/ayon_core/hosts/blender/plugins/publish/extract_camera_fbx.py +++ b/server_addon/blender/client/ayon_blender/plugins/publish/extract_camera_fbx.py @@ -3,10 +3,12 @@ import os import bpy from ayon_core.pipeline import publish -from ayon_core.hosts.blender.api import plugin +from ayon_blender.api import plugin -class ExtractCamera(publish.Extractor, publish.OptionalPyblishPluginMixin): +class ExtractCamera( + plugin.BlenderExtractor, publish.OptionalPyblishPluginMixin +): """Extract as the camera as FBX.""" label = "Extract Camera (FBX)" diff --git a/client/ayon_core/hosts/blender/plugins/publish/extract_fbx.py b/server_addon/blender/client/ayon_blender/plugins/publish/extract_fbx.py similarity index 95% rename from client/ayon_core/hosts/blender/plugins/publish/extract_fbx.py rename to server_addon/blender/client/ayon_blender/plugins/publish/extract_fbx.py index e6367dbc0d..085f7b18c3 100644 --- a/client/ayon_core/hosts/blender/plugins/publish/extract_fbx.py +++ b/server_addon/blender/client/ayon_blender/plugins/publish/extract_fbx.py @@ -3,10 +3,12 @@ import os import bpy from ayon_core.pipeline import publish -from ayon_core.hosts.blender.api import plugin +from ayon_blender.api import plugin -class ExtractFBX(publish.Extractor, publish.OptionalPyblishPluginMixin): +class ExtractFBX( + plugin.BlenderExtractor, publish.OptionalPyblishPluginMixin +): """Extract as FBX.""" label = "Extract FBX" diff --git a/client/ayon_core/hosts/blender/plugins/publish/extract_fbx_animation.py b/server_addon/blender/client/ayon_blender/plugins/publish/extract_fbx_animation.py similarity index 97% rename from client/ayon_core/hosts/blender/plugins/publish/extract_fbx_animation.py rename to server_addon/blender/client/ayon_blender/plugins/publish/extract_fbx_animation.py index ae02909152..7f49e919db 100644 --- a/client/ayon_core/hosts/blender/plugins/publish/extract_fbx_animation.py +++ b/server_addon/blender/client/ayon_blender/plugins/publish/extract_fbx_animation.py @@ -6,8 +6,8 @@ import bpy_extras import bpy_extras.anim_utils from ayon_core.pipeline import publish -from ayon_core.hosts.blender.api import plugin -from ayon_core.hosts.blender.api.pipeline import AVALON_PROPERTY +from ayon_blender.api import plugin +from ayon_blender.api.pipeline import AVALON_PROPERTY def get_all_parents(obj): @@ -42,8 +42,8 @@ def get_highest_root(objects): class ExtractAnimationFBX( - publish.Extractor, - publish.OptionalPyblishPluginMixin, + plugin.BlenderExtractor, + publish.OptionalPyblishPluginMixin, ): """Extract as animation.""" diff --git a/client/ayon_core/hosts/blender/plugins/publish/extract_layout.py b/server_addon/blender/client/ayon_blender/plugins/publish/extract_layout.py similarity index 97% rename from client/ayon_core/hosts/blender/plugins/publish/extract_layout.py rename to server_addon/blender/client/ayon_blender/plugins/publish/extract_layout.py index 0679483dd5..0732d29c9d 100644 --- a/client/ayon_core/hosts/blender/plugins/publish/extract_layout.py +++ b/server_addon/blender/client/ayon_blender/plugins/publish/extract_layout.py @@ -8,11 +8,13 @@ import bpy_extras.anim_utils from ayon_api import get_representations from ayon_core.pipeline import publish -from ayon_core.hosts.blender.api import plugin -from ayon_core.hosts.blender.api.pipeline import AVALON_PROPERTY +from ayon_blender.api import plugin +from ayon_blender.api.pipeline import AVALON_PROPERTY -class ExtractLayout(publish.Extractor, publish.OptionalPyblishPluginMixin): +class ExtractLayout( + plugin.BlenderExtractor, publish.OptionalPyblishPluginMixin +): """Extract a layout.""" label = "Extract Layout (JSON)" diff --git a/client/ayon_core/hosts/blender/plugins/publish/extract_playblast.py b/server_addon/blender/client/ayon_blender/plugins/publish/extract_playblast.py similarity index 94% rename from client/ayon_core/hosts/blender/plugins/publish/extract_playblast.py rename to server_addon/blender/client/ayon_blender/plugins/publish/extract_playblast.py index ce6f40f967..0f769c296d 100644 --- a/client/ayon_core/hosts/blender/plugins/publish/extract_playblast.py +++ b/server_addon/blender/client/ayon_blender/plugins/publish/extract_playblast.py @@ -7,11 +7,13 @@ import pyblish.api import bpy from ayon_core.pipeline import publish -from ayon_core.hosts.blender.api import capture -from ayon_core.hosts.blender.api.lib import maintained_time +from ayon_blender.api import capture, plugin +from ayon_blender.api.lib import maintained_time -class ExtractPlayblast(publish.Extractor, publish.OptionalPyblishPluginMixin): +class ExtractPlayblast( + plugin.BlenderExtractor, publish.OptionalPyblishPluginMixin +): """ Extract viewport playblast. diff --git a/client/ayon_core/hosts/blender/plugins/publish/extract_thumbnail.py b/server_addon/blender/client/ayon_blender/plugins/publish/extract_thumbnail.py similarity index 93% rename from client/ayon_core/hosts/blender/plugins/publish/extract_thumbnail.py rename to server_addon/blender/client/ayon_blender/plugins/publish/extract_thumbnail.py index 4330c57d99..40097aaa89 100644 --- a/client/ayon_core/hosts/blender/plugins/publish/extract_thumbnail.py +++ b/server_addon/blender/client/ayon_blender/plugins/publish/extract_thumbnail.py @@ -3,14 +3,13 @@ import glob import json import pyblish.api -from ayon_core.pipeline import publish -from ayon_core.hosts.blender.api import capture -from ayon_core.hosts.blender.api.lib import maintained_time +from ayon_blender.api import capture, plugin +from ayon_blender.api.lib import maintained_time import bpy -class ExtractThumbnail(publish.Extractor): +class ExtractThumbnail(plugin.BlenderExtractor): """Extract viewport thumbnail. Takes review camera and creates a thumbnail based on viewport diff --git a/client/ayon_core/hosts/blender/plugins/publish/extract_usd.py b/server_addon/blender/client/ayon_blender/plugins/publish/extract_usd.py similarity index 93% rename from client/ayon_core/hosts/blender/plugins/publish/extract_usd.py rename to server_addon/blender/client/ayon_blender/plugins/publish/extract_usd.py index 1d4fa3d7ac..7ea89ae3dc 100644 --- a/client/ayon_core/hosts/blender/plugins/publish/extract_usd.py +++ b/server_addon/blender/client/ayon_blender/plugins/publish/extract_usd.py @@ -2,11 +2,11 @@ import os import bpy -from ayon_core.pipeline import publish -from ayon_core.hosts.blender.api import plugin, lib +from ayon_core.pipeline import KnownPublishError +from ayon_blender.api import plugin, lib -class ExtractUSD(publish.Extractor): +class ExtractUSD(plugin.BlenderExtractor): """Extract as USD.""" label = "Extract USD" @@ -40,7 +40,7 @@ class ExtractUSD(publish.Extractor): root = lib.get_highest_root(objects=instance[:]) if not root: instance_node = instance.data["transientData"]["instance_node"] - raise publish.KnownPublishError( + raise KnownPublishError( f"No root object found in instance: {instance_node.name}" ) self.log.debug(f"Exporting using active root: {root.name}") diff --git a/client/ayon_core/hosts/blender/plugins/publish/increment_workfile_version.py b/server_addon/blender/client/ayon_blender/plugins/publish/increment_workfile_version.py similarity index 86% rename from client/ayon_core/hosts/blender/plugins/publish/increment_workfile_version.py rename to server_addon/blender/client/ayon_blender/plugins/publish/increment_workfile_version.py index b6e0ea3e19..50d16ea54a 100644 --- a/client/ayon_core/hosts/blender/plugins/publish/increment_workfile_version.py +++ b/server_addon/blender/client/ayon_blender/plugins/publish/increment_workfile_version.py @@ -1,11 +1,12 @@ import pyblish.api from ayon_core.pipeline.publish import OptionalPyblishPluginMixin -from ayon_core.hosts.blender.api.workio import save_file +from ayon_blender.api.workio import save_file +from ayon_blender.api import plugin class IncrementWorkfileVersion( - pyblish.api.ContextPlugin, - OptionalPyblishPluginMixin + plugin.BlenderContextPlugin, + OptionalPyblishPluginMixin ): """Increment current workfile version.""" diff --git a/client/ayon_core/hosts/blender/plugins/publish/integrate_animation.py b/server_addon/blender/client/ayon_blender/plugins/publish/integrate_animation.py similarity index 93% rename from client/ayon_core/hosts/blender/plugins/publish/integrate_animation.py rename to server_addon/blender/client/ayon_blender/plugins/publish/integrate_animation.py index 5d3a1dac93..b95c280ab0 100644 --- a/client/ayon_core/hosts/blender/plugins/publish/integrate_animation.py +++ b/server_addon/blender/client/ayon_blender/plugins/publish/integrate_animation.py @@ -2,11 +2,12 @@ import json import pyblish.api from ayon_core.pipeline.publish import OptionalPyblishPluginMixin +from ayon_blender.api import plugin class IntegrateAnimation( - pyblish.api.InstancePlugin, - OptionalPyblishPluginMixin, + plugin.BlenderInstancePlugin, + OptionalPyblishPluginMixin, ): """Generate a JSON file for animation.""" diff --git a/client/ayon_core/hosts/blender/plugins/publish/validate_camera_zero_keyframe.py b/server_addon/blender/client/ayon_blender/plugins/publish/validate_camera_zero_keyframe.py similarity index 85% rename from client/ayon_core/hosts/blender/plugins/publish/validate_camera_zero_keyframe.py rename to server_addon/blender/client/ayon_blender/plugins/publish/validate_camera_zero_keyframe.py index cce95e9cf9..df66f71dc5 100644 --- a/client/ayon_core/hosts/blender/plugins/publish/validate_camera_zero_keyframe.py +++ b/server_addon/blender/client/ayon_blender/plugins/publish/validate_camera_zero_keyframe.py @@ -2,9 +2,8 @@ from typing import List import bpy -import pyblish.api - -import ayon_core.hosts.blender.api.action +import ayon_blender.api.action +from ayon_blender.api import plugin from ayon_core.pipeline.publish import ( ValidateContentsOrder, PublishValidationError, @@ -12,8 +11,10 @@ from ayon_core.pipeline.publish import ( ) -class ValidateCameraZeroKeyframe(pyblish.api.InstancePlugin, - OptionalPyblishPluginMixin): +class ValidateCameraZeroKeyframe( + plugin.BlenderInstancePlugin, + OptionalPyblishPluginMixin +): """Camera must have a keyframe at frame 0. Unreal shifts the first keyframe to frame 0. Forcing the camera to have @@ -25,7 +26,7 @@ class ValidateCameraZeroKeyframe(pyblish.api.InstancePlugin, hosts = ["blender"] families = ["camera"] label = "Zero Keyframe" - actions = [ayon_core.hosts.blender.api.action.SelectInvalidAction] + actions = [ayon_blender.api.action.SelectInvalidAction] @staticmethod def get_invalid(instance) -> List: diff --git a/client/ayon_core/hosts/blender/plugins/publish/validate_deadline_publish.py b/server_addon/blender/client/ayon_blender/plugins/publish/validate_deadline_publish.py similarity index 89% rename from client/ayon_core/hosts/blender/plugins/publish/validate_deadline_publish.py rename to server_addon/blender/client/ayon_blender/plugins/publish/validate_deadline_publish.py index a86e73ba81..fe544ee310 100644 --- a/client/ayon_core/hosts/blender/plugins/publish/validate_deadline_publish.py +++ b/server_addon/blender/client/ayon_blender/plugins/publish/validate_deadline_publish.py @@ -2,18 +2,20 @@ import os import bpy -import pyblish.api from ayon_core.pipeline.publish import ( RepairAction, ValidateContentsOrder, PublishValidationError, OptionalPyblishPluginMixin ) -from ayon_core.hosts.blender.api.render_lib import prepare_rendering +from ayon_blender.api import plugin +from ayon_blender.api.render_lib import prepare_rendering -class ValidateDeadlinePublish(pyblish.api.InstancePlugin, - OptionalPyblishPluginMixin): +class ValidateDeadlinePublish( + plugin.BlenderInstancePlugin, + OptionalPyblishPluginMixin +): """Validates Render File Directory is not the same in every submission """ diff --git a/client/ayon_core/hosts/blender/plugins/publish/validate_file_saved.py b/server_addon/blender/client/ayon_blender/plugins/publish/validate_file_saved.py similarity index 93% rename from client/ayon_core/hosts/blender/plugins/publish/validate_file_saved.py rename to server_addon/blender/client/ayon_blender/plugins/publish/validate_file_saved.py index aa73525555..e6b7b01c71 100644 --- a/client/ayon_core/hosts/blender/plugins/publish/validate_file_saved.py +++ b/server_addon/blender/client/ayon_blender/plugins/publish/validate_file_saved.py @@ -6,6 +6,7 @@ from ayon_core.pipeline.publish import ( OptionalPyblishPluginMixin, PublishValidationError ) +from ayon_blender.api import plugin class SaveWorkfileAction(pyblish.api.Action): @@ -18,8 +19,10 @@ class SaveWorkfileAction(pyblish.api.Action): bpy.ops.wm.avalon_workfiles() -class ValidateFileSaved(pyblish.api.ContextPlugin, - OptionalPyblishPluginMixin): +class ValidateFileSaved( + plugin.BlenderContextPlugin, + OptionalPyblishPluginMixin +): """Validate that the workfile has been saved.""" order = pyblish.api.ValidatorOrder - 0.01 diff --git a/client/ayon_core/hosts/blender/plugins/publish/validate_instance_empty.py b/server_addon/blender/client/ayon_blender/plugins/publish/validate_instance_empty.py similarity index 88% rename from client/ayon_core/hosts/blender/plugins/publish/validate_instance_empty.py rename to server_addon/blender/client/ayon_blender/plugins/publish/validate_instance_empty.py index f0f4106379..9561cc7020 100644 --- a/client/ayon_core/hosts/blender/plugins/publish/validate_instance_empty.py +++ b/server_addon/blender/client/ayon_blender/plugins/publish/validate_instance_empty.py @@ -1,8 +1,9 @@ import pyblish.api from ayon_core.pipeline.publish import PublishValidationError +from ayon_blender.api import plugin -class ValidateInstanceEmpty(pyblish.api.InstancePlugin): +class ValidateInstanceEmpty(plugin.BlenderInstancePlugin): """Validator to verify that the instance is not empty""" order = pyblish.api.ValidatorOrder - 0.01 diff --git a/client/ayon_core/hosts/blender/plugins/publish/validate_mesh_has_uv.py b/server_addon/blender/client/ayon_blender/plugins/publish/validate_mesh_has_uv.py similarity index 89% rename from client/ayon_core/hosts/blender/plugins/publish/validate_mesh_has_uv.py rename to server_addon/blender/client/ayon_blender/plugins/publish/validate_mesh_has_uv.py index 9871dfeb4e..3dd49e0e45 100644 --- a/client/ayon_core/hosts/blender/plugins/publish/validate_mesh_has_uv.py +++ b/server_addon/blender/client/ayon_blender/plugins/publish/validate_mesh_has_uv.py @@ -2,19 +2,18 @@ from typing import List import bpy -import pyblish.api - from ayon_core.pipeline.publish import ( ValidateContentsOrder, OptionalPyblishPluginMixin, PublishValidationError ) -import ayon_core.hosts.blender.api.action +import ayon_blender.api.action +from ayon_blender.api import plugin class ValidateMeshHasUvs( - pyblish.api.InstancePlugin, - OptionalPyblishPluginMixin, + plugin.BlenderInstancePlugin, + OptionalPyblishPluginMixin, ): """Validate that the current mesh has UV's.""" @@ -22,7 +21,7 @@ class ValidateMeshHasUvs( hosts = ["blender"] families = ["model"] label = "Mesh Has UVs" - actions = [ayon_core.hosts.blender.api.action.SelectInvalidAction] + actions = [ayon_blender.api.action.SelectInvalidAction] optional = True @staticmethod diff --git a/client/ayon_core/hosts/blender/plugins/publish/validate_mesh_no_negative_scale.py b/server_addon/blender/client/ayon_blender/plugins/publish/validate_mesh_no_negative_scale.py similarity index 79% rename from client/ayon_core/hosts/blender/plugins/publish/validate_mesh_no_negative_scale.py rename to server_addon/blender/client/ayon_blender/plugins/publish/validate_mesh_no_negative_scale.py index fb16bb7f8d..91de310e46 100644 --- a/client/ayon_core/hosts/blender/plugins/publish/validate_mesh_no_negative_scale.py +++ b/server_addon/blender/client/ayon_blender/plugins/publish/validate_mesh_no_negative_scale.py @@ -2,25 +2,26 @@ from typing import List import bpy -import pyblish.api - from ayon_core.pipeline.publish import ( ValidateContentsOrder, OptionalPyblishPluginMixin, PublishValidationError ) -import ayon_core.hosts.blender.api.action +import ayon_blender.api.action +from ayon_blender.api import plugin -class ValidateMeshNoNegativeScale(pyblish.api.InstancePlugin, - OptionalPyblishPluginMixin): +class ValidateMeshNoNegativeScale( + plugin.BlenderInstancePlugin, + OptionalPyblishPluginMixin +): """Ensure that meshes don't have a negative scale.""" order = ValidateContentsOrder hosts = ["blender"] families = ["model"] label = "Mesh No Negative Scale" - actions = [ayon_core.hosts.blender.api.action.SelectInvalidAction] + actions = [ayon_blender.api.action.SelectInvalidAction] @staticmethod def get_invalid(instance) -> List: diff --git a/client/ayon_core/hosts/blender/plugins/publish/validate_model_uv_map1.py b/server_addon/blender/client/ayon_blender/plugins/publish/validate_model_uv_map1.py similarity index 92% rename from client/ayon_core/hosts/blender/plugins/publish/validate_model_uv_map1.py rename to server_addon/blender/client/ayon_blender/plugins/publish/validate_model_uv_map1.py index 752bc5fa58..74f550b6db 100644 --- a/client/ayon_core/hosts/blender/plugins/publish/validate_model_uv_map1.py +++ b/server_addon/blender/client/ayon_blender/plugins/publish/validate_model_uv_map1.py @@ -3,20 +3,19 @@ from typing import List import bpy -import pyblish.api - from ayon_core.pipeline.publish import ( ValidateContentsOrder, OptionalPyblishPluginMixin, PublishValidationError, RepairAction ) -import ayon_core.hosts.blender.api.action +import ayon_blender.api.action +from ayon_blender.api import plugin class ValidateModelMeshUvMap1( - pyblish.api.InstancePlugin, - OptionalPyblishPluginMixin, + plugin.BlenderInstancePlugin, + OptionalPyblishPluginMixin, ): """Validate model mesh uvs are named `map1`. @@ -27,7 +26,7 @@ class ValidateModelMeshUvMap1( hosts = ["blender"] families = ["model"] label = "Mesh UVs named map1" - actions = [ayon_core.hosts.blender.api.action.SelectInvalidAction, + actions = [ayon_blender.api.action.SelectInvalidAction, RepairAction] optional = True enabled = False diff --git a/client/ayon_core/hosts/blender/plugins/publish/validate_no_colons_in_name.py b/server_addon/blender/client/ayon_blender/plugins/publish/validate_no_colons_in_name.py similarity index 83% rename from client/ayon_core/hosts/blender/plugins/publish/validate_no_colons_in_name.py rename to server_addon/blender/client/ayon_blender/plugins/publish/validate_no_colons_in_name.py index 5620946f1e..dbafb53263 100644 --- a/client/ayon_core/hosts/blender/plugins/publish/validate_no_colons_in_name.py +++ b/server_addon/blender/client/ayon_blender/plugins/publish/validate_no_colons_in_name.py @@ -2,9 +2,8 @@ from typing import List import bpy -import pyblish.api - -import ayon_core.hosts.blender.api.action +import ayon_blender.api.action +from ayon_blender.api import plugin from ayon_core.pipeline.publish import ( ValidateContentsOrder, OptionalPyblishPluginMixin, @@ -12,8 +11,10 @@ from ayon_core.pipeline.publish import ( ) -class ValidateNoColonsInName(pyblish.api.InstancePlugin, - OptionalPyblishPluginMixin): +class ValidateNoColonsInName( + plugin.BlenderInstancePlugin, + OptionalPyblishPluginMixin +): """There cannot be colons in names Object or bone names cannot include colons. Other software do not @@ -25,7 +26,7 @@ class ValidateNoColonsInName(pyblish.api.InstancePlugin, hosts = ["blender"] families = ["model", "rig"] label = "No Colons in names" - actions = [ayon_core.hosts.blender.api.action.SelectInvalidAction] + actions = [ayon_blender.api.action.SelectInvalidAction] @staticmethod def get_invalid(instance) -> List: diff --git a/client/ayon_core/hosts/blender/plugins/publish/validate_object_mode.py b/server_addon/blender/client/ayon_blender/plugins/publish/validate_object_mode.py similarity index 84% rename from client/ayon_core/hosts/blender/plugins/publish/validate_object_mode.py rename to server_addon/blender/client/ayon_blender/plugins/publish/validate_object_mode.py index d215ffc1be..4dc2c39949 100644 --- a/client/ayon_core/hosts/blender/plugins/publish/validate_object_mode.py +++ b/server_addon/blender/client/ayon_blender/plugins/publish/validate_object_mode.py @@ -7,12 +7,13 @@ from ayon_core.pipeline.publish import ( OptionalPyblishPluginMixin, PublishValidationError ) -import ayon_core.hosts.blender.api.action +import ayon_blender.api.action +from ayon_blender.api import plugin class ValidateObjectIsInObjectMode( - pyblish.api.InstancePlugin, - OptionalPyblishPluginMixin, + plugin.BlenderInstancePlugin, + OptionalPyblishPluginMixin, ): """Validate that the objects in the instance are in Object Mode.""" @@ -20,7 +21,7 @@ class ValidateObjectIsInObjectMode( hosts = ["blender"] families = ["model", "rig", "layout"] label = "Validate Object Mode" - actions = [ayon_core.hosts.blender.api.action.SelectInvalidAction] + actions = [ayon_blender.api.action.SelectInvalidAction] optional = False @staticmethod diff --git a/client/ayon_core/hosts/blender/plugins/publish/validate_render_camera_is_set.py b/server_addon/blender/client/ayon_blender/plugins/publish/validate_render_camera_is_set.py similarity index 80% rename from client/ayon_core/hosts/blender/plugins/publish/validate_render_camera_is_set.py rename to server_addon/blender/client/ayon_blender/plugins/publish/validate_render_camera_is_set.py index 46bfe45739..15eb64d2ad 100644 --- a/client/ayon_core/hosts/blender/plugins/publish/validate_render_camera_is_set.py +++ b/server_addon/blender/client/ayon_blender/plugins/publish/validate_render_camera_is_set.py @@ -6,10 +6,13 @@ from ayon_core.pipeline.publish import ( OptionalPyblishPluginMixin, PublishValidationError ) +from ayon_blender.api import plugin -class ValidateRenderCameraIsSet(pyblish.api.InstancePlugin, - OptionalPyblishPluginMixin): +class ValidateRenderCameraIsSet( + plugin.BlenderInstancePlugin, + OptionalPyblishPluginMixin +): """Validate that there is a camera set as active for rendering.""" order = pyblish.api.ValidatorOrder diff --git a/client/ayon_core/hosts/blender/plugins/publish/validate_transform_zero.py b/server_addon/blender/client/ayon_blender/plugins/publish/validate_transform_zero.py similarity index 89% rename from client/ayon_core/hosts/blender/plugins/publish/validate_transform_zero.py rename to server_addon/blender/client/ayon_blender/plugins/publish/validate_transform_zero.py index 465ec15d7b..c7bfc6e8a6 100644 --- a/client/ayon_core/hosts/blender/plugins/publish/validate_transform_zero.py +++ b/server_addon/blender/client/ayon_blender/plugins/publish/validate_transform_zero.py @@ -4,10 +4,8 @@ from typing import List import mathutils import bpy -import pyblish.api - -from ayon_core.hosts.blender.api import plugin, lib -import ayon_core.hosts.blender.api.action +from ayon_blender.api import plugin, lib +import ayon_blender.api.action from ayon_core.pipeline.publish import ( ValidateContentsOrder, OptionalPyblishPluginMixin, @@ -16,15 +14,17 @@ from ayon_core.pipeline.publish import ( ) -class ValidateTransformZero(pyblish.api.InstancePlugin, - OptionalPyblishPluginMixin): +class ValidateTransformZero( + plugin.BlenderInstancePlugin, + OptionalPyblishPluginMixin +): """Transforms can't have any values""" order = ValidateContentsOrder hosts = ["blender"] families = ["model"] label = "Transform Zero" - actions = [ayon_core.hosts.blender.api.action.SelectInvalidAction, + actions = [ayon_blender.api.action.SelectInvalidAction, RepairAction] _identity = mathutils.Matrix() diff --git a/server_addon/blender/client/ayon_blender/version.py b/server_addon/blender/client/ayon_blender/version.py new file mode 100644 index 0000000000..365c44e71b --- /dev/null +++ b/server_addon/blender/client/ayon_blender/version.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- +"""Package declaring AYON addon 'blender' version.""" +__version__ = "0.2.0" diff --git a/server_addon/blender/package.py b/server_addon/blender/package.py index d2c02a4909..4e0ac112e1 100644 --- a/server_addon/blender/package.py +++ b/server_addon/blender/package.py @@ -1,3 +1,11 @@ name = "blender" title = "Blender" -version = "0.1.9" +version = "0.2.0" + +client_dir = "ayon_blender" + +ayon_required_addons = { + "core": ">0.3.2", +} +ayon_compatible_addons = {} + diff --git a/client/ayon_core/hosts/harmony/__init__.py b/server_addon/harmony/client/ayon_harmony/__init__.py similarity index 77% rename from client/ayon_core/hosts/harmony/__init__.py rename to server_addon/harmony/client/ayon_harmony/__init__.py index 6454d6f9d7..425439a603 100644 --- a/client/ayon_core/hosts/harmony/__init__.py +++ b/server_addon/harmony/client/ayon_harmony/__init__.py @@ -1,3 +1,4 @@ +from .version import __version__ from .addon import ( HARMONY_ADDON_ROOT, HarmonyAddon, @@ -6,6 +7,8 @@ from .addon import ( __all__ = ( + "__version__", + "HARMONY_ADDON_ROOT", "HarmonyAddon", "get_launch_script_path", diff --git a/client/ayon_core/hosts/harmony/addon.py b/server_addon/harmony/client/ayon_harmony/addon.py similarity index 94% rename from client/ayon_core/hosts/harmony/addon.py rename to server_addon/harmony/client/ayon_harmony/addon.py index 1915a7eb6f..ef96cf03f7 100644 --- a/client/ayon_core/hosts/harmony/addon.py +++ b/server_addon/harmony/client/ayon_harmony/addon.py @@ -1,11 +1,14 @@ import os from ayon_core.addon import AYONAddon, IHostAddon +from .version import __version__ + HARMONY_ADDON_ROOT = os.path.dirname(os.path.abspath(__file__)) class HarmonyAddon(AYONAddon, IHostAddon): name = "harmony" + version = __version__ host_name = "harmony" def add_implementation_envs(self, env, _app): diff --git a/client/ayon_core/hosts/harmony/api/README.md b/server_addon/harmony/client/ayon_harmony/api/README.md similarity index 97% rename from client/ayon_core/hosts/harmony/api/README.md rename to server_addon/harmony/client/ayon_harmony/api/README.md index b8d1dbc100..6666ede83c 100644 --- a/client/ayon_core/hosts/harmony/api/README.md +++ b/server_addon/harmony/client/ayon_harmony/api/README.md @@ -5,7 +5,7 @@ The easiest way to setup for using Toon Boom Harmony is to use the built-in launch: ``` -python -c "import ayon_core.hosts.harmony.api as harmony;harmony.launch("path/to/harmony/executable")" +python -c "import ayon_harmony.api as harmony;harmony.launch("path/to/harmony/executable")" ``` Communication with Harmony happens with a server/client relationship where the server is in the Python process and the client is in the Harmony process. Messages between Python and Harmony are required to be dictionaries, which are serialized to strings: @@ -59,7 +59,7 @@ You can show the Workfiles app when Harmony launches by setting environment vari ### Low level messaging To send from Python to Harmony you can use the exposed method: ```python -import ayon_core.hosts.harmony.api as harmony +import ayon_harmony.api as harmony from uuid import uuid4 @@ -75,7 +75,7 @@ print(harmony.send({"function": func, "args": ["Python"]})["result"]) To send a function with multiple arguments its best to declare the arguments within the function: ```python -import ayon_core.hosts.harmony.api as harmony +import ayon_harmony.api as harmony from uuid import uuid4 signature = str(uuid4()).replace("-", "_") @@ -114,7 +114,7 @@ PypeHarmony.myAwesomeFunction = function() { Then you can call that javascript code from your Python like: ```Python -import ayon_core.hosts.harmony.api as harmony +import ayon_harmony.api as harmony harmony.send({"function": "PypeHarmony.myAwesomeFunction"}); @@ -159,7 +159,7 @@ Now in python, just read all those files and send them to Harmony. ```python from pathlib import Path -import ayon_core.hosts.harmony.api as harmony +import ayon_harmony.api as harmony path_to_js = Path('/path/to/my/js') script_to_send = "" @@ -178,7 +178,7 @@ harmony.send({"function": "Master.Boo.B"}) ### Scene Save Instead of sending a request to Harmony with `scene.saveAll` please use: ```python -import ayon_core.hosts.harmony.api as harmony +import ayon_harmony.api as harmony harmony.save_scene() ``` @@ -195,7 +195,7 @@ These plugins were made with the [polly config](https://github.com/mindbender-st #### Creator Plugin ```python -import ayon_core.hosts.harmony.api as harmony +import ayon_harmony.api as harmony from uuid import uuid4 @@ -213,7 +213,7 @@ class CreateComposite(harmony.Creator): The creator plugin can be configured to use other node types. For example here is a write node creator: ```python from uuid import uuid4 -import ayon_core.hosts.harmony.api as harmony +import ayon_harmony.api as harmony class CreateRender(harmony.Creator): @@ -244,7 +244,7 @@ class CreateRender(harmony.Creator): ```python import pyblish.api from ayon_core.pipeline import AYON_INSTANCE_ID, AVALON_INSTANCE_ID -import ayon_core.hosts.harmony.api as harmony +import ayon_harmony.api as harmony class CollectInstances(pyblish.api.ContextPlugin): @@ -292,7 +292,7 @@ import os from uuid import uuid4 import pyblish.api -import ayon_core.hosts.harmony.api as harmony +import ayon_harmony.api as harmony import clique @@ -423,7 +423,7 @@ class ExtractImage(pyblish.api.InstancePlugin): import os from uuid import uuid4 -import ayon_core.hosts.harmony.api as harmony +import ayon_harmony.api as harmony signature = str(uuid4()).replace("-", "_") copy_files = """function copyFile(srcFilename, dstFilename) diff --git a/client/ayon_core/hosts/harmony/api/TB_sceneOpened.js b/server_addon/harmony/client/ayon_harmony/api/TB_sceneOpened.js similarity index 97% rename from client/ayon_core/hosts/harmony/api/TB_sceneOpened.js rename to server_addon/harmony/client/ayon_harmony/api/TB_sceneOpened.js index cdf60c1aa8..00858b6de1 100644 --- a/client/ayon_core/hosts/harmony/api/TB_sceneOpened.js +++ b/server_addon/harmony/client/ayon_harmony/api/TB_sceneOpened.js @@ -387,7 +387,7 @@ function start() { */ self.onCreator = function() { app.avalonClient.send({ - 'module': 'ayon_core.hosts.harmony.api.lib', + 'module': 'ayon_harmony.api.lib', 'method': 'show', 'args': ['creator'] }, false); @@ -402,7 +402,7 @@ function start() { */ self.onWorkfiles = function() { app.avalonClient.send({ - 'module': 'ayon_core.hosts.harmony.api.lib', + 'module': 'ayon_harmony.api.lib', 'method': 'show', 'args': ['workfiles'] }, false); @@ -417,7 +417,7 @@ function start() { */ self.onLoad = function() { app.avalonClient.send({ - 'module': 'ayon_core.hosts.harmony.api.lib', + 'module': 'ayon_harmony.api.lib', 'method': 'show', 'args': ['loader'] }, false); @@ -433,7 +433,7 @@ function start() { */ self.onPublish = function() { app.avalonClient.send({ - 'module': 'ayon_core.hosts.harmony.api.lib', + 'module': 'ayon_harmony.api.lib', 'method': 'show', 'args': ['publish'] }, false); @@ -449,7 +449,7 @@ function start() { */ self.onManage = function() { app.avalonClient.send({ - 'module': 'ayon_core.hosts.harmony.api.lib', + 'module': 'ayon_harmony.api.lib', 'method': 'show', 'args': ['sceneinventory'] }, false); @@ -465,7 +465,7 @@ function start() { */ self.onSubsetManage = function() { app.avalonClient.send({ - 'module': 'ayon_core.hosts.harmony.api.lib', + 'module': 'ayon_harmony.api.lib', 'method': 'show', 'args': ['subsetmanager'] }, false); @@ -482,7 +482,7 @@ function start() { self.onSetSceneSettings = function() { app.avalonClient.send( { - "module": "ayon_core.hosts.harmony.api", + "module": "ayon_harmony.api", "method": "ensure_scene_settings", "args": [] }, @@ -500,7 +500,7 @@ function start() { */ self.onExperimentalTools = function() { app.avalonClient.send({ - 'module': 'ayon_core.hosts.harmony.api.lib', + 'module': 'ayon_harmony.api.lib', 'method': 'show', 'args': ['experimental_tools'] }, false); @@ -550,7 +550,7 @@ function ensureSceneSettings() { var app = QCoreApplication.instance(); app.avalonClient.send( { - "module": "ayon_core.hosts.harmony.api", + "module": "ayon_harmony.api", "method": "ensure_scene_settings", "args": [] }, diff --git a/client/ayon_core/hosts/harmony/api/__init__.py b/server_addon/harmony/client/ayon_harmony/api/__init__.py similarity index 100% rename from client/ayon_core/hosts/harmony/api/__init__.py rename to server_addon/harmony/client/ayon_harmony/api/__init__.py diff --git a/client/ayon_core/hosts/harmony/api/js/.eslintrc.json b/server_addon/harmony/client/ayon_harmony/api/js/.eslintrc.json similarity index 100% rename from client/ayon_core/hosts/harmony/api/js/.eslintrc.json rename to server_addon/harmony/client/ayon_harmony/api/js/.eslintrc.json diff --git a/client/ayon_core/hosts/harmony/api/js/AvalonHarmony.js b/server_addon/harmony/client/ayon_harmony/api/js/AvalonHarmony.js similarity index 100% rename from client/ayon_core/hosts/harmony/api/js/AvalonHarmony.js rename to server_addon/harmony/client/ayon_harmony/api/js/AvalonHarmony.js diff --git a/client/ayon_core/hosts/harmony/api/js/package.json b/server_addon/harmony/client/ayon_harmony/api/js/package.json similarity index 100% rename from client/ayon_core/hosts/harmony/api/js/package.json rename to server_addon/harmony/client/ayon_harmony/api/js/package.json diff --git a/client/ayon_core/hosts/harmony/api/launch_script.py b/server_addon/harmony/client/ayon_harmony/api/launch_script.py similarity index 97% rename from client/ayon_core/hosts/harmony/api/launch_script.py rename to server_addon/harmony/client/ayon_harmony/api/launch_script.py index 3c809e210f..6327682a43 100644 --- a/client/ayon_core/hosts/harmony/api/launch_script.py +++ b/server_addon/harmony/client/ayon_harmony/api/launch_script.py @@ -8,7 +8,7 @@ workfile or others. import os import sys -from ayon_core.hosts.harmony.api.lib import main as host_main +from ayon_harmony.api.lib import main as host_main # Get current file to locate start point of sys.argv CURRENT_FILE = os.path.abspath(__file__) diff --git a/client/ayon_core/hosts/harmony/api/lib.py b/server_addon/harmony/client/ayon_harmony/api/lib.py similarity index 99% rename from client/ayon_core/hosts/harmony/api/lib.py rename to server_addon/harmony/client/ayon_harmony/api/lib.py index f9980cb65e..46a5318430 100644 --- a/client/ayon_core/hosts/harmony/api/lib.py +++ b/server_addon/harmony/client/ayon_harmony/api/lib.py @@ -20,7 +20,7 @@ import collections from qtpy import QtWidgets, QtCore, QtGui from ayon_core.lib import is_using_ayon_console -from ayon_core.tools.stdout_broker.app import StdOutBroker +from ayon_core.tools.stdout_broker import StdOutBroker from ayon_core.tools.utils import host_tools from ayon_core import style @@ -186,7 +186,7 @@ def launch(application_path, *args): """ from ayon_core.pipeline import install_host - from ayon_core.hosts.harmony import api as harmony + from ayon_harmony import api as harmony install_host(harmony) @@ -486,7 +486,7 @@ def imprint(node_id, data, remove=False): remove (bool): Removes the data from the scene. Example: - >>> from ayon_core.hosts.harmony.api import lib + >>> from ayon_harmony.api import lib >>> node = "Top/Display" >>> data = {"str": "something", "int": 1, "float": 0.32, "bool": True} >>> lib.imprint(layer, data) diff --git a/client/ayon_core/hosts/harmony/api/pipeline.py b/server_addon/harmony/client/ayon_harmony/api/pipeline.py similarity index 98% rename from client/ayon_core/hosts/harmony/api/pipeline.py rename to server_addon/harmony/client/ayon_harmony/api/pipeline.py index 1e3ea0ba21..229dcf307e 100644 --- a/client/ayon_core/hosts/harmony/api/pipeline.py +++ b/server_addon/harmony/client/ayon_harmony/api/pipeline.py @@ -15,11 +15,11 @@ from ayon_core.pipeline import ( from ayon_core.pipeline.load import get_outdated_containers from ayon_core.pipeline.context_tools import get_current_folder_entity -from ayon_core.hosts.harmony import HARMONY_ADDON_ROOT -import ayon_core.hosts.harmony.api as harmony +from ayon_harmony import HARMONY_ADDON_ROOT +import ayon_harmony.api as harmony -log = logging.getLogger("ayon_core.hosts.harmony") +log = logging.getLogger("ayon_harmony") PLUGINS_DIR = os.path.join(HARMONY_ADDON_ROOT, "plugins") PUBLISH_PATH = os.path.join(PLUGINS_DIR, "publish") diff --git a/client/ayon_core/hosts/harmony/api/plugin.py b/server_addon/harmony/client/ayon_harmony/api/plugin.py similarity index 97% rename from client/ayon_core/hosts/harmony/api/plugin.py rename to server_addon/harmony/client/ayon_harmony/api/plugin.py index 29ebdb2b8d..6ec876af62 100644 --- a/client/ayon_core/hosts/harmony/api/plugin.py +++ b/server_addon/harmony/client/ayon_harmony/api/plugin.py @@ -1,5 +1,5 @@ from ayon_core.pipeline import LegacyCreator -import ayon_core.hosts.harmony.api as harmony +import ayon_harmony.api as harmony class Creator(LegacyCreator): diff --git a/client/ayon_core/hosts/harmony/api/server.py b/server_addon/harmony/client/ayon_harmony/api/server.py similarity index 98% rename from client/ayon_core/hosts/harmony/api/server.py rename to server_addon/harmony/client/ayon_harmony/api/server.py index 04048e5c84..7e1e36c2ed 100644 --- a/client/ayon_core/hosts/harmony/api/server.py +++ b/server_addon/harmony/client/ayon_harmony/api/server.py @@ -69,6 +69,8 @@ class Server(threading.Thread): self.log.debug( f"[{self.timestamp()}] Processing request:\n{pretty}") + # TODO javascript should not define which module is imported and + # which function is called. It should send predefined requests. try: module = importlib.import_module(request["module"]) method = getattr(module, request["method"]) diff --git a/client/ayon_core/hosts/harmony/api/temp.zip b/server_addon/harmony/client/ayon_harmony/api/temp.zip similarity index 100% rename from client/ayon_core/hosts/harmony/api/temp.zip rename to server_addon/harmony/client/ayon_harmony/api/temp.zip diff --git a/client/ayon_core/hosts/harmony/api/workio.py b/server_addon/harmony/client/ayon_harmony/api/workio.py similarity index 100% rename from client/ayon_core/hosts/harmony/api/workio.py rename to server_addon/harmony/client/ayon_harmony/api/workio.py diff --git a/client/ayon_core/hosts/harmony/hooks/pre_launch_args.py b/server_addon/harmony/client/ayon_harmony/hooks/pre_launch_args.py similarity index 97% rename from client/ayon_core/hosts/harmony/hooks/pre_launch_args.py rename to server_addon/harmony/client/ayon_harmony/hooks/pre_launch_args.py index 4d38cd09b3..2fdb5ae620 100644 --- a/client/ayon_core/hosts/harmony/hooks/pre_launch_args.py +++ b/server_addon/harmony/client/ayon_harmony/hooks/pre_launch_args.py @@ -7,7 +7,7 @@ from ayon_core.lib import ( is_using_ayon_console, ) from ayon_applications import PreLaunchHook, LaunchTypes -from ayon_core.hosts.harmony import get_launch_script_path +from ayon_harmony import get_launch_script_path def get_launch_kwargs(kwargs): diff --git a/client/ayon_core/hosts/harmony/js/.eslintrc.json b/server_addon/harmony/client/ayon_harmony/js/.eslintrc.json similarity index 100% rename from client/ayon_core/hosts/harmony/js/.eslintrc.json rename to server_addon/harmony/client/ayon_harmony/js/.eslintrc.json diff --git a/client/ayon_core/hosts/harmony/js/PypeHarmony.js b/server_addon/harmony/client/ayon_harmony/js/PypeHarmony.js similarity index 100% rename from client/ayon_core/hosts/harmony/js/PypeHarmony.js rename to server_addon/harmony/client/ayon_harmony/js/PypeHarmony.js diff --git a/client/ayon_core/hosts/harmony/js/README.md b/server_addon/harmony/client/ayon_harmony/js/README.md similarity index 100% rename from client/ayon_core/hosts/harmony/js/README.md rename to server_addon/harmony/client/ayon_harmony/js/README.md diff --git a/client/ayon_core/hosts/harmony/js/creators/CreateRender.js b/server_addon/harmony/client/ayon_harmony/js/creators/CreateRender.js similarity index 100% rename from client/ayon_core/hosts/harmony/js/creators/CreateRender.js rename to server_addon/harmony/client/ayon_harmony/js/creators/CreateRender.js diff --git a/client/ayon_core/hosts/harmony/js/loaders/ImageSequenceLoader.js b/server_addon/harmony/client/ayon_harmony/js/loaders/ImageSequenceLoader.js similarity index 100% rename from client/ayon_core/hosts/harmony/js/loaders/ImageSequenceLoader.js rename to server_addon/harmony/client/ayon_harmony/js/loaders/ImageSequenceLoader.js diff --git a/client/ayon_core/hosts/harmony/js/loaders/TemplateLoader.js b/server_addon/harmony/client/ayon_harmony/js/loaders/TemplateLoader.js similarity index 100% rename from client/ayon_core/hosts/harmony/js/loaders/TemplateLoader.js rename to server_addon/harmony/client/ayon_harmony/js/loaders/TemplateLoader.js diff --git a/client/ayon_core/hosts/harmony/js/package.json b/server_addon/harmony/client/ayon_harmony/js/package.json similarity index 100% rename from client/ayon_core/hosts/harmony/js/package.json rename to server_addon/harmony/client/ayon_harmony/js/package.json diff --git a/client/ayon_core/hosts/harmony/js/publish/CollectCurrentFile.js b/server_addon/harmony/client/ayon_harmony/js/publish/CollectCurrentFile.js similarity index 100% rename from client/ayon_core/hosts/harmony/js/publish/CollectCurrentFile.js rename to server_addon/harmony/client/ayon_harmony/js/publish/CollectCurrentFile.js diff --git a/client/ayon_core/hosts/harmony/js/publish/CollectFarmRender.js b/server_addon/harmony/client/ayon_harmony/js/publish/CollectFarmRender.js similarity index 100% rename from client/ayon_core/hosts/harmony/js/publish/CollectFarmRender.js rename to server_addon/harmony/client/ayon_harmony/js/publish/CollectFarmRender.js diff --git a/client/ayon_core/hosts/harmony/js/publish/CollectPalettes.js b/server_addon/harmony/client/ayon_harmony/js/publish/CollectPalettes.js similarity index 100% rename from client/ayon_core/hosts/harmony/js/publish/CollectPalettes.js rename to server_addon/harmony/client/ayon_harmony/js/publish/CollectPalettes.js diff --git a/client/ayon_core/hosts/harmony/js/publish/ExtractPalette.js b/server_addon/harmony/client/ayon_harmony/js/publish/ExtractPalette.js similarity index 100% rename from client/ayon_core/hosts/harmony/js/publish/ExtractPalette.js rename to server_addon/harmony/client/ayon_harmony/js/publish/ExtractPalette.js diff --git a/client/ayon_core/hosts/harmony/js/publish/ExtractTemplate.js b/server_addon/harmony/client/ayon_harmony/js/publish/ExtractTemplate.js similarity index 100% rename from client/ayon_core/hosts/harmony/js/publish/ExtractTemplate.js rename to server_addon/harmony/client/ayon_harmony/js/publish/ExtractTemplate.js diff --git a/client/ayon_core/hosts/harmony/plugins/__init__.py b/server_addon/harmony/client/ayon_harmony/plugins/__init__.py similarity index 100% rename from client/ayon_core/hosts/harmony/plugins/__init__.py rename to server_addon/harmony/client/ayon_harmony/plugins/__init__.py diff --git a/client/ayon_core/hosts/harmony/plugins/create/create_farm_render.py b/server_addon/harmony/client/ayon_harmony/plugins/create/create_farm_render.py similarity index 90% rename from client/ayon_core/hosts/harmony/plugins/create/create_farm_render.py rename to server_addon/harmony/client/ayon_harmony/plugins/create/create_farm_render.py index 3039d56ead..270acdd199 100644 --- a/client/ayon_core/hosts/harmony/plugins/create/create_farm_render.py +++ b/server_addon/harmony/client/ayon_harmony/plugins/create/create_farm_render.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Create Composite node for render on farm.""" -import ayon_core.hosts.harmony.api as harmony -from ayon_core.hosts.harmony.api import plugin +import ayon_harmony.api as harmony +from ayon_harmony.api import plugin class CreateFarmRender(plugin.Creator): diff --git a/client/ayon_core/hosts/harmony/plugins/create/create_render.py b/server_addon/harmony/client/ayon_harmony/plugins/create/create_render.py similarity index 88% rename from client/ayon_core/hosts/harmony/plugins/create/create_render.py rename to server_addon/harmony/client/ayon_harmony/plugins/create/create_render.py index 23e02bd8a5..d4622a3202 100644 --- a/client/ayon_core/hosts/harmony/plugins/create/create_render.py +++ b/server_addon/harmony/client/ayon_harmony/plugins/create/create_render.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Create render node.""" -import ayon_core.hosts.harmony.api as harmony -from ayon_core.hosts.harmony.api import plugin +import ayon_harmony.api as harmony +from ayon_harmony.api import plugin class CreateRender(plugin.Creator): diff --git a/client/ayon_core/hosts/harmony/plugins/create/create_template.py b/server_addon/harmony/client/ayon_harmony/plugins/create/create_template.py similarity index 86% rename from client/ayon_core/hosts/harmony/plugins/create/create_template.py rename to server_addon/harmony/client/ayon_harmony/plugins/create/create_template.py index c16e429436..79fd315998 100644 --- a/client/ayon_core/hosts/harmony/plugins/create/create_template.py +++ b/server_addon/harmony/client/ayon_harmony/plugins/create/create_template.py @@ -1,4 +1,4 @@ -from ayon_core.hosts.harmony.api import plugin +from ayon_harmony.api import plugin class CreateTemplate(plugin.Creator): diff --git a/client/ayon_core/hosts/harmony/plugins/load/load_audio.py b/server_addon/harmony/client/ayon_harmony/plugins/load/load_audio.py similarity index 96% rename from client/ayon_core/hosts/harmony/plugins/load/load_audio.py rename to server_addon/harmony/client/ayon_harmony/plugins/load/load_audio.py index d23f3ed034..3ba27d005f 100644 --- a/client/ayon_core/hosts/harmony/plugins/load/load_audio.py +++ b/server_addon/harmony/client/ayon_harmony/plugins/load/load_audio.py @@ -2,7 +2,7 @@ from ayon_core.pipeline import ( load, get_representation_path, ) -import ayon_core.hosts.harmony.api as harmony +import ayon_harmony.api as harmony sig = harmony.signature() func = """ diff --git a/client/ayon_core/hosts/harmony/plugins/load/load_background.py b/server_addon/harmony/client/ayon_harmony/plugins/load/load_background.py similarity index 99% rename from client/ayon_core/hosts/harmony/plugins/load/load_background.py rename to server_addon/harmony/client/ayon_harmony/plugins/load/load_background.py index dad6ac2f22..7f0e5c5563 100644 --- a/client/ayon_core/hosts/harmony/plugins/load/load_background.py +++ b/server_addon/harmony/client/ayon_harmony/plugins/load/load_background.py @@ -6,7 +6,7 @@ from ayon_core.pipeline import ( get_representation_path, ) from ayon_core.pipeline.context_tools import is_representation_from_latest -import ayon_core.hosts.harmony.api as harmony +import ayon_harmony.api as harmony copy_files = """function copyFile(srcFilename, dstFilename) diff --git a/client/ayon_core/hosts/harmony/plugins/load/load_imagesequence.py b/server_addon/harmony/client/ayon_harmony/plugins/load/load_imagesequence.py similarity index 98% rename from client/ayon_core/hosts/harmony/plugins/load/load_imagesequence.py rename to server_addon/harmony/client/ayon_harmony/plugins/load/load_imagesequence.py index f81ebca9af..cc588a3442 100644 --- a/client/ayon_core/hosts/harmony/plugins/load/load_imagesequence.py +++ b/server_addon/harmony/client/ayon_harmony/plugins/load/load_imagesequence.py @@ -11,7 +11,7 @@ from ayon_core.pipeline import ( get_representation_path, ) from ayon_core.pipeline.context_tools import is_representation_from_latest -import ayon_core.hosts.harmony.api as harmony +import ayon_harmony.api as harmony class ImageSequenceLoader(load.LoaderPlugin): @@ -30,6 +30,7 @@ class ImageSequenceLoader(load.LoaderPlugin): } representations = {"*"} extensions = {"jpeg", "png", "jpg"} + settings_category = "harmony" def load(self, context, name=None, namespace=None, data=None): """Plugin entry point. diff --git a/client/ayon_core/hosts/harmony/plugins/load/load_palette.py b/server_addon/harmony/client/ayon_harmony/plugins/load/load_palette.py similarity index 97% rename from client/ayon_core/hosts/harmony/plugins/load/load_palette.py rename to server_addon/harmony/client/ayon_harmony/plugins/load/load_palette.py index 24f4b4e8d4..930792aacf 100644 --- a/client/ayon_core/hosts/harmony/plugins/load/load_palette.py +++ b/server_addon/harmony/client/ayon_harmony/plugins/load/load_palette.py @@ -5,7 +5,7 @@ from ayon_core.pipeline import ( load, get_representation_path, ) -import ayon_core.hosts.harmony.api as harmony +import ayon_harmony.api as harmony class ImportPaletteLoader(load.LoaderPlugin): diff --git a/client/ayon_core/hosts/harmony/plugins/load/load_template.py b/server_addon/harmony/client/ayon_harmony/plugins/load/load_template.py similarity index 98% rename from client/ayon_core/hosts/harmony/plugins/load/load_template.py rename to server_addon/harmony/client/ayon_harmony/plugins/load/load_template.py index 96dadb0375..1d183ed156 100644 --- a/client/ayon_core/hosts/harmony/plugins/load/load_template.py +++ b/server_addon/harmony/client/ayon_harmony/plugins/load/load_template.py @@ -11,7 +11,7 @@ from ayon_core.pipeline import ( get_representation_path, ) from ayon_core.pipeline.context_tools import is_representation_from_latest -import ayon_core.hosts.harmony.api as harmony +import ayon_harmony.api as harmony class TemplateLoader(load.LoaderPlugin): diff --git a/client/ayon_core/hosts/harmony/plugins/load/load_template_workfile.py b/server_addon/harmony/client/ayon_harmony/plugins/load/load_template_workfile.py similarity index 97% rename from client/ayon_core/hosts/harmony/plugins/load/load_template_workfile.py rename to server_addon/harmony/client/ayon_harmony/plugins/load/load_template_workfile.py index fa5ffe5105..0967eb9a30 100644 --- a/client/ayon_core/hosts/harmony/plugins/load/load_template_workfile.py +++ b/server_addon/harmony/client/ayon_harmony/plugins/load/load_template_workfile.py @@ -7,7 +7,7 @@ from ayon_core.pipeline import ( load, get_representation_path, ) -import ayon_core.hosts.harmony.api as harmony +import ayon_harmony.api as harmony class ImportTemplateLoader(load.LoaderPlugin): diff --git a/client/ayon_core/hosts/harmony/plugins/publish/collect_audio.py b/server_addon/harmony/client/ayon_harmony/plugins/publish/collect_audio.py similarity index 100% rename from client/ayon_core/hosts/harmony/plugins/publish/collect_audio.py rename to server_addon/harmony/client/ayon_harmony/plugins/publish/collect_audio.py diff --git a/client/ayon_core/hosts/harmony/plugins/publish/collect_current_file.py b/server_addon/harmony/client/ayon_harmony/plugins/publish/collect_current_file.py similarity index 93% rename from client/ayon_core/hosts/harmony/plugins/publish/collect_current_file.py rename to server_addon/harmony/client/ayon_harmony/plugins/publish/collect_current_file.py index ebe123eacc..cfa14aaa05 100644 --- a/client/ayon_core/hosts/harmony/plugins/publish/collect_current_file.py +++ b/server_addon/harmony/client/ayon_harmony/plugins/publish/collect_current_file.py @@ -3,7 +3,7 @@ import os import pyblish.api -import ayon_core.hosts.harmony.api as harmony +import ayon_harmony.api as harmony class CollectCurrentFile(pyblish.api.ContextPlugin): diff --git a/client/ayon_core/hosts/harmony/plugins/publish/collect_farm_render.py b/server_addon/harmony/client/ayon_harmony/plugins/publish/collect_farm_render.py similarity index 99% rename from client/ayon_core/hosts/harmony/plugins/publish/collect_farm_render.py rename to server_addon/harmony/client/ayon_harmony/plugins/publish/collect_farm_render.py index c63eb114e5..4730821dd8 100644 --- a/client/ayon_core/hosts/harmony/plugins/publish/collect_farm_render.py +++ b/server_addon/harmony/client/ayon_harmony/plugins/publish/collect_farm_render.py @@ -7,7 +7,7 @@ import attr from ayon_core.lib import get_formatted_current_time from ayon_core.pipeline import publish from ayon_core.pipeline.publish import RenderInstance -import ayon_core.hosts.harmony.api as harmony +import ayon_harmony.api as harmony @attr.s diff --git a/client/ayon_core/hosts/harmony/plugins/publish/collect_instances.py b/server_addon/harmony/client/ayon_harmony/plugins/publish/collect_instances.py similarity index 98% rename from client/ayon_core/hosts/harmony/plugins/publish/collect_instances.py rename to server_addon/harmony/client/ayon_harmony/plugins/publish/collect_instances.py index 5aad7d4751..a98ee3e98b 100644 --- a/client/ayon_core/hosts/harmony/plugins/publish/collect_instances.py +++ b/server_addon/harmony/client/ayon_harmony/plugins/publish/collect_instances.py @@ -3,7 +3,7 @@ import json import pyblish.api -import ayon_core.hosts.harmony.api as harmony +import ayon_harmony.api as harmony class CollectInstances(pyblish.api.ContextPlugin): diff --git a/client/ayon_core/hosts/harmony/plugins/publish/collect_palettes.py b/server_addon/harmony/client/ayon_harmony/plugins/publish/collect_palettes.py similarity index 95% rename from client/ayon_core/hosts/harmony/plugins/publish/collect_palettes.py rename to server_addon/harmony/client/ayon_harmony/plugins/publish/collect_palettes.py index 9e0b500663..fb40196510 100644 --- a/client/ayon_core/hosts/harmony/plugins/publish/collect_palettes.py +++ b/server_addon/harmony/client/ayon_harmony/plugins/publish/collect_palettes.py @@ -4,7 +4,7 @@ import json import re import pyblish.api -import ayon_core.hosts.harmony.api as harmony +import ayon_harmony.api as harmony class CollectPalettes(pyblish.api.ContextPlugin): @@ -14,6 +14,8 @@ class CollectPalettes(pyblish.api.ContextPlugin): order = pyblish.api.CollectorOrder + 0.003 hosts = ["harmony"] + settings_category = "harmony" + # list of regexes for task names where collecting should happen allowed_tasks = [] diff --git a/client/ayon_core/hosts/harmony/plugins/publish/collect_scene.py b/server_addon/harmony/client/ayon_harmony/plugins/publish/collect_scene.py similarity index 98% rename from client/ayon_core/hosts/harmony/plugins/publish/collect_scene.py rename to server_addon/harmony/client/ayon_harmony/plugins/publish/collect_scene.py index bc2ccca1be..48f8aa0d3b 100644 --- a/client/ayon_core/hosts/harmony/plugins/publish/collect_scene.py +++ b/server_addon/harmony/client/ayon_harmony/plugins/publish/collect_scene.py @@ -3,7 +3,7 @@ import os import pyblish.api -import ayon_core.hosts.harmony.api as harmony +import ayon_harmony.api as harmony class CollectScene(pyblish.api.ContextPlugin): diff --git a/client/ayon_core/hosts/harmony/plugins/publish/collect_workfile.py b/server_addon/harmony/client/ayon_harmony/plugins/publish/collect_workfile.py similarity index 100% rename from client/ayon_core/hosts/harmony/plugins/publish/collect_workfile.py rename to server_addon/harmony/client/ayon_harmony/plugins/publish/collect_workfile.py diff --git a/client/ayon_core/hosts/harmony/plugins/publish/extract_palette.py b/server_addon/harmony/client/ayon_harmony/plugins/publish/extract_palette.py similarity index 99% rename from client/ayon_core/hosts/harmony/plugins/publish/extract_palette.py rename to server_addon/harmony/client/ayon_harmony/plugins/publish/extract_palette.py index 9f12c78d9f..ad1d38e862 100644 --- a/client/ayon_core/hosts/harmony/plugins/publish/extract_palette.py +++ b/server_addon/harmony/client/ayon_harmony/plugins/publish/extract_palette.py @@ -5,7 +5,7 @@ import csv from PIL import Image, ImageDraw, ImageFont -import ayon_core.hosts.harmony.api as harmony +import ayon_harmony.api as harmony from ayon_core.pipeline import publish diff --git a/client/ayon_core/hosts/harmony/plugins/publish/extract_render.py b/server_addon/harmony/client/ayon_harmony/plugins/publish/extract_render.py similarity index 99% rename from client/ayon_core/hosts/harmony/plugins/publish/extract_render.py rename to server_addon/harmony/client/ayon_harmony/plugins/publish/extract_render.py index 391661a118..407a44c81a 100644 --- a/client/ayon_core/hosts/harmony/plugins/publish/extract_render.py +++ b/server_addon/harmony/client/ayon_harmony/plugins/publish/extract_render.py @@ -3,7 +3,7 @@ import tempfile import subprocess import pyblish.api -import ayon_core.hosts.harmony.api as harmony +import ayon_harmony.api as harmony import ayon_core.lib import clique diff --git a/client/ayon_core/hosts/harmony/plugins/publish/extract_save_scene.py b/server_addon/harmony/client/ayon_harmony/plugins/publish/extract_save_scene.py similarity index 85% rename from client/ayon_core/hosts/harmony/plugins/publish/extract_save_scene.py rename to server_addon/harmony/client/ayon_harmony/plugins/publish/extract_save_scene.py index 1be74ba3a4..77ebc5b5a6 100644 --- a/client/ayon_core/hosts/harmony/plugins/publish/extract_save_scene.py +++ b/server_addon/harmony/client/ayon_harmony/plugins/publish/extract_save_scene.py @@ -1,5 +1,5 @@ import pyblish.api -import ayon_core.hosts.harmony.api as harmony +import ayon_harmony.api as harmony class ExtractSaveScene(pyblish.api.ContextPlugin): diff --git a/client/ayon_core/hosts/harmony/plugins/publish/extract_template.py b/server_addon/harmony/client/ayon_harmony/plugins/publish/extract_template.py similarity index 98% rename from client/ayon_core/hosts/harmony/plugins/publish/extract_template.py rename to server_addon/harmony/client/ayon_harmony/plugins/publish/extract_template.py index b2c7fa8174..650765771c 100644 --- a/client/ayon_core/hosts/harmony/plugins/publish/extract_template.py +++ b/server_addon/harmony/client/ayon_harmony/plugins/publish/extract_template.py @@ -4,7 +4,7 @@ import os import shutil from ayon_core.pipeline import publish -import ayon_core.hosts.harmony.api as harmony +import ayon_harmony.api as harmony class ExtractTemplate(publish.Extractor): diff --git a/client/ayon_core/hosts/harmony/plugins/publish/extract_workfile.py b/server_addon/harmony/client/ayon_harmony/plugins/publish/extract_workfile.py similarity index 100% rename from client/ayon_core/hosts/harmony/plugins/publish/extract_workfile.py rename to server_addon/harmony/client/ayon_harmony/plugins/publish/extract_workfile.py diff --git a/client/ayon_core/hosts/harmony/plugins/publish/help/validate_audio.xml b/server_addon/harmony/client/ayon_harmony/plugins/publish/help/validate_audio.xml similarity index 100% rename from client/ayon_core/hosts/harmony/plugins/publish/help/validate_audio.xml rename to server_addon/harmony/client/ayon_harmony/plugins/publish/help/validate_audio.xml diff --git a/client/ayon_core/hosts/harmony/plugins/publish/help/validate_instances.xml b/server_addon/harmony/client/ayon_harmony/plugins/publish/help/validate_instances.xml similarity index 100% rename from client/ayon_core/hosts/harmony/plugins/publish/help/validate_instances.xml rename to server_addon/harmony/client/ayon_harmony/plugins/publish/help/validate_instances.xml diff --git a/client/ayon_core/hosts/harmony/plugins/publish/help/validate_scene_settings.xml b/server_addon/harmony/client/ayon_harmony/plugins/publish/help/validate_scene_settings.xml similarity index 100% rename from client/ayon_core/hosts/harmony/plugins/publish/help/validate_scene_settings.xml rename to server_addon/harmony/client/ayon_harmony/plugins/publish/help/validate_scene_settings.xml diff --git a/client/ayon_core/hosts/harmony/plugins/publish/increment_workfile.py b/server_addon/harmony/client/ayon_harmony/plugins/publish/increment_workfile.py similarity index 95% rename from client/ayon_core/hosts/harmony/plugins/publish/increment_workfile.py rename to server_addon/harmony/client/ayon_harmony/plugins/publish/increment_workfile.py index 16332a5283..fa43455b0d 100644 --- a/client/ayon_core/hosts/harmony/plugins/publish/increment_workfile.py +++ b/server_addon/harmony/client/ayon_harmony/plugins/publish/increment_workfile.py @@ -3,7 +3,7 @@ import os import pyblish.api from ayon_core.pipeline.publish import get_errored_plugins_from_context from ayon_core.lib import version_up -import ayon_core.hosts.harmony.api as harmony +import ayon_harmony.api as harmony class IncrementWorkfile(pyblish.api.InstancePlugin): diff --git a/client/ayon_core/hosts/harmony/plugins/publish/validate_audio.py b/server_addon/harmony/client/ayon_harmony/plugins/publish/validate_audio.py similarity index 95% rename from client/ayon_core/hosts/harmony/plugins/publish/validate_audio.py rename to server_addon/harmony/client/ayon_harmony/plugins/publish/validate_audio.py index 808734a061..6caa12c1e1 100644 --- a/client/ayon_core/hosts/harmony/plugins/publish/validate_audio.py +++ b/server_addon/harmony/client/ayon_harmony/plugins/publish/validate_audio.py @@ -2,7 +2,7 @@ import os import pyblish.api -import ayon_core.hosts.harmony.api as harmony +import ayon_harmony.api as harmony from ayon_core.pipeline import PublishXmlValidationError @@ -18,6 +18,7 @@ class ValidateAudio(pyblish.api.InstancePlugin): label = "Validate Audio" families = ["render"] hosts = ["harmony"] + settings_category = "harmony" optional = True def process(self, instance): diff --git a/client/ayon_core/hosts/harmony/plugins/publish/validate_instances.py b/server_addon/harmony/client/ayon_harmony/plugins/publish/validate_instances.py similarity index 97% rename from client/ayon_core/hosts/harmony/plugins/publish/validate_instances.py rename to server_addon/harmony/client/ayon_harmony/plugins/publish/validate_instances.py index 1200f6266b..8152aeeadf 100644 --- a/client/ayon_core/hosts/harmony/plugins/publish/validate_instances.py +++ b/server_addon/harmony/client/ayon_harmony/plugins/publish/validate_instances.py @@ -1,6 +1,6 @@ import pyblish.api -import ayon_core.hosts.harmony.api as harmony +import ayon_harmony.api as harmony from ayon_core.pipeline import get_current_folder_path from ayon_core.pipeline.publish import ( ValidateContentsOrder, diff --git a/client/ayon_core/hosts/harmony/plugins/publish/validate_scene_settings.py b/server_addon/harmony/client/ayon_harmony/plugins/publish/validate_scene_settings.py similarity index 99% rename from client/ayon_core/hosts/harmony/plugins/publish/validate_scene_settings.py rename to server_addon/harmony/client/ayon_harmony/plugins/publish/validate_scene_settings.py index dc3db3b544..082eb4f1dd 100644 --- a/client/ayon_core/hosts/harmony/plugins/publish/validate_scene_settings.py +++ b/server_addon/harmony/client/ayon_harmony/plugins/publish/validate_scene_settings.py @@ -6,7 +6,7 @@ import re import pyblish.api -import ayon_core.hosts.harmony.api as harmony +import ayon_harmony.api as harmony from ayon_core.pipeline import PublishXmlValidationError @@ -42,6 +42,7 @@ class ValidateSceneSettings(pyblish.api.InstancePlugin): families = ["workfile"] hosts = ["harmony"] actions = [ValidateSceneSettingsRepair] + settings_category = "harmony" optional = True # skip frameEnd check if asset contains any of: diff --git a/client/ayon_core/hosts/harmony/vendor/.eslintrc.json b/server_addon/harmony/client/ayon_harmony/vendor/.eslintrc.json similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/.eslintrc.json rename to server_addon/harmony/client/ayon_harmony/vendor/.eslintrc.json diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/.gitattributes b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/.gitattributes similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/.gitattributes rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/.gitattributes diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/.gitignore b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/.gitignore similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/.gitignore rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/.gitignore diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/Install.bat b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/Install.bat similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/Install.bat rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/Install.bat diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/LICENSE b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/LICENSE similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/LICENSE rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/LICENSE diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/README.md b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/README.md similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/README.md rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/README.md diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/build_doc.bat b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/build_doc.bat similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/build_doc.bat rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/build_doc.bat diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/documentation.json b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/documentation.json similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/documentation.json rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/documentation.json diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/install.sh b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/install.sh similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/install.sh rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/install.sh diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/oH_DOM.jpg b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/oH_DOM.jpg similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/oH_DOM.jpg rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/oH_DOM.jpg diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony.js b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony.js similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony.js rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony.js diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_actions.js b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_actions.js similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_actions.js rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_actions.js diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_application.js b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_application.js similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_application.js rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_application.js diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_attribute.js b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_attribute.js similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_attribute.js rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_attribute.js diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_backdrop.js b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_backdrop.js similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_backdrop.js rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_backdrop.js diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_color.js b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_color.js similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_color.js rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_color.js diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_column.js b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_column.js similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_column.js rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_column.js diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_database.js b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_database.js similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_database.js rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_database.js diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_dialog.js b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_dialog.js similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_dialog.js rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_dialog.js diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_drawing.js b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_drawing.js similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_drawing.js rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_drawing.js diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_element.js b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_element.js similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_element.js rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_element.js diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_file.js b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_file.js similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_file.js rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_file.js diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_frame.js b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_frame.js similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_frame.js rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_frame.js diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_list.js b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_list.js similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_list.js rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_list.js diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_math.js b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_math.js similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_math.js rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_math.js diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_metadata.js b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_metadata.js similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_metadata.js rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_metadata.js diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_misc.js b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_misc.js similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_misc.js rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_misc.js diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_network.js b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_network.js similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_network.js rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_network.js diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_node.js b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_node.js similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_node.js rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_node.js diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_nodeAttributes.js b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_nodeAttributes.js similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_nodeAttributes.js rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_nodeAttributes.js diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_nodeLink.js b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_nodeLink.js similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_nodeLink.js rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_nodeLink.js diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_palette.js b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_palette.js similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_palette.js rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_palette.js diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_path.js b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_path.js similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_path.js rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_path.js diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_preferencedoc.js b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_preferencedoc.js similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_preferencedoc.js rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_preferencedoc.js diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_preferences.js b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_preferences.js similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_preferences.js rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_preferences.js diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_scene.js b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_scene.js similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_scene.js rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_scene.js diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_threading.js b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_threading.js similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_threading.js rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_threading.js diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_timeline.js b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_timeline.js similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_timeline.js rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_timeline.js diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_tool.js b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_tool.js similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_tool.js rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_tool.js diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_toolInstall.ui b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_toolInstall.ui similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony/openHarmony_toolInstall.ui rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony/openHarmony_toolInstall.ui diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony_install.js b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony_install.js similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony_install.js rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony_install.js diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony_tools.js b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony_tools.js similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/openHarmony_tools.js rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/openHarmony_tools.js diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/package.json b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/package.json similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/package.json rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/package.json diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/reference/Reference_view_currentToolManager().txt b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/reference/Reference_view_currentToolManager().txt similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/reference/Reference_view_currentToolManager().txt rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/reference/Reference_view_currentToolManager().txt diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/tbpackage.json b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/tbpackage.json similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/tbpackage.json rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/tbpackage.json diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/tools/OpenHarmony_basic/INSTALL b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/tools/OpenHarmony_basic/INSTALL similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/tools/OpenHarmony_basic/INSTALL rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/tools/OpenHarmony_basic/INSTALL diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/tools/OpenHarmony_basic/README b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/tools/OpenHarmony_basic/README similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/tools/OpenHarmony_basic/README rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/tools/OpenHarmony_basic/README diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/tools/OpenHarmony_basic/openHarmony_anim_tools.js b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/tools/OpenHarmony_basic/openHarmony_anim_tools.js similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/tools/OpenHarmony_basic/openHarmony_anim_tools.js rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/tools/OpenHarmony_basic/openHarmony_anim_tools.js diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/tools/OpenHarmony_basic/openHarmony_basic_backdropPicker.ui b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/tools/OpenHarmony_basic/openHarmony_basic_backdropPicker.ui similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/tools/OpenHarmony_basic/openHarmony_basic_backdropPicker.ui rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/tools/OpenHarmony_basic/openHarmony_basic_backdropPicker.ui diff --git a/client/ayon_core/hosts/harmony/vendor/OpenHarmony/tools/OpenHarmony_basic/openHarmony_rigging_tools.js b/server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/tools/OpenHarmony_basic/openHarmony_rigging_tools.js similarity index 100% rename from client/ayon_core/hosts/harmony/vendor/OpenHarmony/tools/OpenHarmony_basic/openHarmony_rigging_tools.js rename to server_addon/harmony/client/ayon_harmony/vendor/OpenHarmony/tools/OpenHarmony_basic/openHarmony_rigging_tools.js diff --git a/server_addon/harmony/client/ayon_harmony/version.py b/server_addon/harmony/client/ayon_harmony/version.py new file mode 100644 index 0000000000..e2a19655e2 --- /dev/null +++ b/server_addon/harmony/client/ayon_harmony/version.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- +"""Package declaring AYON addon 'harmony' version.""" +__version__ = "0.2.0" diff --git a/server_addon/harmony/package.py b/server_addon/harmony/package.py index 00824cedef..af0006ec3b 100644 --- a/server_addon/harmony/package.py +++ b/server_addon/harmony/package.py @@ -1,3 +1,9 @@ name = "harmony" title = "Harmony" -version = "0.1.3" +version = "0.2.0" +client_dir = "ayon_harmony" + +ayon_required_addons = { + "core": ">0.3.2", +} +ayon_compatible_addons = {} diff --git a/server_addon/hiero/client/ayon_hiero/__init__.py b/server_addon/hiero/client/ayon_hiero/__init__.py new file mode 100644 index 0000000000..2dc490c1e9 --- /dev/null +++ b/server_addon/hiero/client/ayon_hiero/__init__.py @@ -0,0 +1,13 @@ +from .version import __version__ +from .addon import ( + HIERO_ADDON_ROOT, + HieroAddon, +) + + +__all__ = ( + "__version__", + + "HIERO_ADDON_ROOT", + "HieroAddon", +) diff --git a/client/ayon_core/hosts/hiero/addon.py b/server_addon/hiero/client/ayon_hiero/addon.py similarity index 89% rename from client/ayon_core/hosts/hiero/addon.py rename to server_addon/hiero/client/ayon_hiero/addon.py index f612493ca1..671e29151b 100644 --- a/client/ayon_core/hosts/hiero/addon.py +++ b/server_addon/hiero/client/ayon_hiero/addon.py @@ -2,17 +2,20 @@ import os import platform from ayon_core.addon import AYONAddon, IHostAddon -HIERO_ROOT_DIR = os.path.dirname(os.path.abspath(__file__)) +from .version import __version__ + +HIERO_ADDON_ROOT = os.path.dirname(os.path.abspath(__file__)) class HieroAddon(AYONAddon, IHostAddon): name = "hiero" + version = __version__ host_name = "hiero" def add_implementation_envs(self, env, _app): # Add requirements to HIERO_PLUGIN_PATH new_hiero_paths = [ - os.path.join(HIERO_ROOT_DIR, "api", "startup") + os.path.join(HIERO_ADDON_ROOT, "api", "startup") ] old_hiero_path = env.get("HIERO_PLUGIN_PATH") or "" for path in old_hiero_path.split(os.pathsep): @@ -36,7 +39,7 @@ class HieroAddon(AYONAddon, IHostAddon): python_path_parts = [] if python_path: python_path_parts = python_path.split(os.pathsep) - vendor_path = os.path.join(HIERO_ROOT_DIR, "vendor") + vendor_path = os.path.join(HIERO_ADDON_ROOT, "vendor") python_path_parts.insert(0, vendor_path) env["PYTHONPATH"] = os.pathsep.join(python_path_parts) diff --git a/client/ayon_core/hosts/hiero/api/__init__.py b/server_addon/hiero/client/ayon_hiero/api/__init__.py similarity index 100% rename from client/ayon_core/hosts/hiero/api/__init__.py rename to server_addon/hiero/client/ayon_hiero/api/__init__.py diff --git a/client/ayon_core/hosts/hiero/api/constants.py b/server_addon/hiero/client/ayon_hiero/api/constants.py similarity index 100% rename from client/ayon_core/hosts/hiero/api/constants.py rename to server_addon/hiero/client/ayon_hiero/api/constants.py diff --git a/client/ayon_core/hosts/hiero/api/events.py b/server_addon/hiero/client/ayon_hiero/api/events.py similarity index 100% rename from client/ayon_core/hosts/hiero/api/events.py rename to server_addon/hiero/client/ayon_hiero/api/events.py diff --git a/client/ayon_core/hosts/hiero/api/launchforhiero.py b/server_addon/hiero/client/ayon_hiero/api/launchforhiero.py similarity index 100% rename from client/ayon_core/hosts/hiero/api/launchforhiero.py rename to server_addon/hiero/client/ayon_hiero/api/launchforhiero.py diff --git a/client/ayon_core/hosts/hiero/api/lib.py b/server_addon/hiero/client/ayon_hiero/api/lib.py similarity index 99% rename from client/ayon_core/hosts/hiero/api/lib.py rename to server_addon/hiero/client/ayon_hiero/api/lib.py index 456a68f125..2a6038fb98 100644 --- a/client/ayon_core/hosts/hiero/api/lib.py +++ b/server_addon/hiero/client/ayon_hiero/api/lib.py @@ -453,19 +453,19 @@ def get_track_openpype_data(track, container_name=None): ) -@deprecated("ayon_core.hosts.hiero.api.lib.get_trackitem_openpype_tag") +@deprecated("ayon_hiero.api.lib.get_trackitem_openpype_tag") def get_track_item_pype_tag(track_item): # backward compatibility alias return get_trackitem_openpype_tag(track_item) -@deprecated("ayon_core.hosts.hiero.api.lib.set_trackitem_openpype_tag") +@deprecated("ayon_hiero.api.lib.set_trackitem_openpype_tag") def set_track_item_pype_tag(track_item, data=None): # backward compatibility alias return set_trackitem_openpype_tag(track_item, data) -@deprecated("ayon_core.hosts.hiero.api.lib.get_trackitem_openpype_data") +@deprecated("ayon_hiero.api.lib.get_trackitem_openpype_data") def get_track_item_pype_data(track_item): # backward compatibility alias return get_trackitem_openpype_data(track_item) @@ -802,7 +802,7 @@ class PublishAction(QtWidgets.QAction): # # ''' # import hiero.core -# from ayon_core.hosts.nuke.api.lib import ( +# from ayon_nuke.api.lib import ( # BuildWorkfile, # imprint # ) diff --git a/client/ayon_core/hosts/hiero/api/menu.py b/server_addon/hiero/client/ayon_hiero/api/menu.py similarity index 100% rename from client/ayon_core/hosts/hiero/api/menu.py rename to server_addon/hiero/client/ayon_hiero/api/menu.py diff --git a/client/ayon_core/hosts/hiero/api/otio/__init__.py b/server_addon/hiero/client/ayon_hiero/api/otio/__init__.py similarity index 100% rename from client/ayon_core/hosts/hiero/api/otio/__init__.py rename to server_addon/hiero/client/ayon_hiero/api/otio/__init__.py diff --git a/client/ayon_core/hosts/hiero/api/otio/hiero_export.py b/server_addon/hiero/client/ayon_hiero/api/otio/hiero_export.py similarity index 100% rename from client/ayon_core/hosts/hiero/api/otio/hiero_export.py rename to server_addon/hiero/client/ayon_hiero/api/otio/hiero_export.py diff --git a/client/ayon_core/hosts/hiero/api/otio/hiero_import.py b/server_addon/hiero/client/ayon_hiero/api/otio/hiero_import.py similarity index 100% rename from client/ayon_core/hosts/hiero/api/otio/hiero_import.py rename to server_addon/hiero/client/ayon_hiero/api/otio/hiero_import.py diff --git a/client/ayon_core/hosts/hiero/api/otio/utils.py b/server_addon/hiero/client/ayon_hiero/api/otio/utils.py similarity index 100% rename from client/ayon_core/hosts/hiero/api/otio/utils.py rename to server_addon/hiero/client/ayon_hiero/api/otio/utils.py diff --git a/client/ayon_core/hosts/hiero/api/pipeline.py b/server_addon/hiero/client/ayon_hiero/api/pipeline.py similarity index 96% rename from client/ayon_core/hosts/hiero/api/pipeline.py rename to server_addon/hiero/client/ayon_hiero/api/pipeline.py index 327a4ae29c..d14d255a87 100644 --- a/client/ayon_core/hosts/hiero/api/pipeline.py +++ b/server_addon/hiero/client/ayon_hiero/api/pipeline.py @@ -6,7 +6,9 @@ import os import contextlib from collections import OrderedDict +import hiero from pyblish import api as pyblish + from ayon_core.lib import Logger from ayon_core.pipeline import ( schema, @@ -18,15 +20,14 @@ from ayon_core.pipeline import ( AYON_CONTAINER_ID, ) from ayon_core.tools.utils import host_tools +from ayon_hiero import HIERO_ADDON_ROOT + from . import lib, menu, events -import hiero log = Logger.get_logger(__name__) # plugin paths -API_DIR = os.path.dirname(os.path.abspath(__file__)) -HOST_DIR = os.path.dirname(API_DIR) -PLUGINS_DIR = os.path.join(HOST_DIR, "plugins") +PLUGINS_DIR = os.path.join(HIERO_ADDON_ROOT, "plugins") PUBLISH_PATH = os.path.join(PLUGINS_DIR, "publish").replace("\\", "/") LOAD_PATH = os.path.join(PLUGINS_DIR, "load").replace("\\", "/") CREATE_PATH = os.path.join(PLUGINS_DIR, "create").replace("\\", "/") @@ -129,7 +130,7 @@ def ls(): all_items = lib.get_track_items() # append all video tracks - for track in lib.get_current_sequence(): + for track in (lib.get_current_sequence() or []): if type(track) != hiero.core.VideoTrack: continue all_items.append(track) @@ -308,9 +309,9 @@ def reload_config(): import importlib for module in ( - "ayon_core.hosts.hiero.lib", - "ayon_core.hosts.hiero.menu", - "ayon_core.hosts.hiero.tags" + "ayon_hiero.lib", + "ayon_hiero.menu", + "ayon_hiero.tags" ): log.info("Reloading module: {}...".format(module)) try: @@ -328,7 +329,7 @@ def on_pyblish_instance_toggled(instance, old_value, new_value): log.info("instance toggle: {}, old_value: {}, new_value:{} ".format( instance, old_value, new_value)) - from ayon_core.hosts.hiero.api import ( + from ayon_hiero.api import ( get_trackitem_openpype_tag, set_publish_attribute ) diff --git a/client/ayon_core/hosts/hiero/api/plugin.py b/server_addon/hiero/client/ayon_hiero/api/plugin.py similarity index 99% rename from client/ayon_core/hosts/hiero/api/plugin.py rename to server_addon/hiero/client/ayon_hiero/api/plugin.py index 1353673b31..16eb1d55f3 100644 --- a/client/ayon_core/hosts/hiero/api/plugin.py +++ b/server_addon/hiero/client/ayon_hiero/api/plugin.py @@ -550,7 +550,8 @@ class ClipLoader: log.debug("__ self.timeline_out: {}".format(self.timeline_out)) # check if slate is included - slate_on = "slate" in self.context["version"]["data"]["families"] + slate_on = "slate" in self.context["version"]["data"].get( + "families", []) log.debug("__ slate_on: {}".format(slate_on)) # if slate is on then remove the slate frame from beginning @@ -600,7 +601,7 @@ class Creator(LegacyCreator): def __init__(self, *args, **kwargs): super(Creator, self).__init__(*args, **kwargs) - import ayon_core.hosts.hiero.api as phiero + import ayon_hiero.api as phiero self.presets = get_current_project_settings()[ "hiero"]["create"].get(self.__class__.__name__, {}) diff --git a/client/ayon_core/hosts/hiero/api/startup/HieroPlayer/PlayerPresets.hrox b/server_addon/hiero/client/ayon_hiero/api/startup/HieroPlayer/PlayerPresets.hrox similarity index 100% rename from client/ayon_core/hosts/hiero/api/startup/HieroPlayer/PlayerPresets.hrox rename to server_addon/hiero/client/ayon_hiero/api/startup/HieroPlayer/PlayerPresets.hrox diff --git a/client/ayon_core/hosts/hiero/api/startup/Icons/1_add_handles_end.png b/server_addon/hiero/client/ayon_hiero/api/startup/Icons/1_add_handles_end.png similarity index 100% rename from client/ayon_core/hosts/hiero/api/startup/Icons/1_add_handles_end.png rename to server_addon/hiero/client/ayon_hiero/api/startup/Icons/1_add_handles_end.png diff --git a/client/ayon_core/hosts/hiero/api/startup/Icons/2_add_handles.png b/server_addon/hiero/client/ayon_hiero/api/startup/Icons/2_add_handles.png similarity index 100% rename from client/ayon_core/hosts/hiero/api/startup/Icons/2_add_handles.png rename to server_addon/hiero/client/ayon_hiero/api/startup/Icons/2_add_handles.png diff --git a/client/ayon_core/hosts/hiero/api/startup/Icons/3D.png b/server_addon/hiero/client/ayon_hiero/api/startup/Icons/3D.png similarity index 100% rename from client/ayon_core/hosts/hiero/api/startup/Icons/3D.png rename to server_addon/hiero/client/ayon_hiero/api/startup/Icons/3D.png diff --git a/client/ayon_core/hosts/hiero/api/startup/Icons/3_add_handles_start.png b/server_addon/hiero/client/ayon_hiero/api/startup/Icons/3_add_handles_start.png similarity index 100% rename from client/ayon_core/hosts/hiero/api/startup/Icons/3_add_handles_start.png rename to server_addon/hiero/client/ayon_hiero/api/startup/Icons/3_add_handles_start.png diff --git a/client/ayon_core/hosts/hiero/api/startup/Icons/4_2D.png b/server_addon/hiero/client/ayon_hiero/api/startup/Icons/4_2D.png similarity index 100% rename from client/ayon_core/hosts/hiero/api/startup/Icons/4_2D.png rename to server_addon/hiero/client/ayon_hiero/api/startup/Icons/4_2D.png diff --git a/client/ayon_core/hosts/hiero/api/startup/Icons/edit.png b/server_addon/hiero/client/ayon_hiero/api/startup/Icons/edit.png similarity index 100% rename from client/ayon_core/hosts/hiero/api/startup/Icons/edit.png rename to server_addon/hiero/client/ayon_hiero/api/startup/Icons/edit.png diff --git a/client/ayon_core/hosts/hiero/api/startup/Icons/fusion.png b/server_addon/hiero/client/ayon_hiero/api/startup/Icons/fusion.png similarity index 100% rename from client/ayon_core/hosts/hiero/api/startup/Icons/fusion.png rename to server_addon/hiero/client/ayon_hiero/api/startup/Icons/fusion.png diff --git a/client/ayon_core/hosts/hiero/api/startup/Icons/hierarchy.png b/server_addon/hiero/client/ayon_hiero/api/startup/Icons/hierarchy.png similarity index 100% rename from client/ayon_core/hosts/hiero/api/startup/Icons/hierarchy.png rename to server_addon/hiero/client/ayon_hiero/api/startup/Icons/hierarchy.png diff --git a/client/ayon_core/hosts/hiero/api/startup/Icons/houdini.png b/server_addon/hiero/client/ayon_hiero/api/startup/Icons/houdini.png similarity index 100% rename from client/ayon_core/hosts/hiero/api/startup/Icons/houdini.png rename to server_addon/hiero/client/ayon_hiero/api/startup/Icons/houdini.png diff --git a/client/ayon_core/hosts/hiero/api/startup/Icons/layers.psd b/server_addon/hiero/client/ayon_hiero/api/startup/Icons/layers.psd similarity index 100% rename from client/ayon_core/hosts/hiero/api/startup/Icons/layers.psd rename to server_addon/hiero/client/ayon_hiero/api/startup/Icons/layers.psd diff --git a/client/ayon_core/hosts/hiero/api/startup/Icons/lense.png b/server_addon/hiero/client/ayon_hiero/api/startup/Icons/lense.png similarity index 100% rename from client/ayon_core/hosts/hiero/api/startup/Icons/lense.png rename to server_addon/hiero/client/ayon_hiero/api/startup/Icons/lense.png diff --git a/client/ayon_core/hosts/hiero/api/startup/Icons/lense1.png b/server_addon/hiero/client/ayon_hiero/api/startup/Icons/lense1.png similarity index 100% rename from client/ayon_core/hosts/hiero/api/startup/Icons/lense1.png rename to server_addon/hiero/client/ayon_hiero/api/startup/Icons/lense1.png diff --git a/client/ayon_core/hosts/hiero/api/startup/Icons/maya.png b/server_addon/hiero/client/ayon_hiero/api/startup/Icons/maya.png similarity index 100% rename from client/ayon_core/hosts/hiero/api/startup/Icons/maya.png rename to server_addon/hiero/client/ayon_hiero/api/startup/Icons/maya.png diff --git a/client/ayon_core/hosts/hiero/api/startup/Icons/nuke.png b/server_addon/hiero/client/ayon_hiero/api/startup/Icons/nuke.png similarity index 100% rename from client/ayon_core/hosts/hiero/api/startup/Icons/nuke.png rename to server_addon/hiero/client/ayon_hiero/api/startup/Icons/nuke.png diff --git a/client/ayon_core/hosts/hiero/api/startup/Icons/pype_icon.png b/server_addon/hiero/client/ayon_hiero/api/startup/Icons/pype_icon.png similarity index 100% rename from client/ayon_core/hosts/hiero/api/startup/Icons/pype_icon.png rename to server_addon/hiero/client/ayon_hiero/api/startup/Icons/pype_icon.png diff --git a/client/ayon_core/hosts/hiero/api/startup/Icons/resolution.png b/server_addon/hiero/client/ayon_hiero/api/startup/Icons/resolution.png similarity index 100% rename from client/ayon_core/hosts/hiero/api/startup/Icons/resolution.png rename to server_addon/hiero/client/ayon_hiero/api/startup/Icons/resolution.png diff --git a/client/ayon_core/hosts/hiero/api/startup/Icons/resolution.psd b/server_addon/hiero/client/ayon_hiero/api/startup/Icons/resolution.psd similarity index 100% rename from client/ayon_core/hosts/hiero/api/startup/Icons/resolution.psd rename to server_addon/hiero/client/ayon_hiero/api/startup/Icons/resolution.psd diff --git a/client/ayon_core/hosts/hiero/api/startup/Icons/retiming.png b/server_addon/hiero/client/ayon_hiero/api/startup/Icons/retiming.png similarity index 100% rename from client/ayon_core/hosts/hiero/api/startup/Icons/retiming.png rename to server_addon/hiero/client/ayon_hiero/api/startup/Icons/retiming.png diff --git a/client/ayon_core/hosts/hiero/api/startup/Icons/retiming.psd b/server_addon/hiero/client/ayon_hiero/api/startup/Icons/retiming.psd similarity index 100% rename from client/ayon_core/hosts/hiero/api/startup/Icons/retiming.psd rename to server_addon/hiero/client/ayon_hiero/api/startup/Icons/retiming.psd diff --git a/client/ayon_core/hosts/hiero/api/startup/Icons/review.png b/server_addon/hiero/client/ayon_hiero/api/startup/Icons/review.png similarity index 100% rename from client/ayon_core/hosts/hiero/api/startup/Icons/review.png rename to server_addon/hiero/client/ayon_hiero/api/startup/Icons/review.png diff --git a/client/ayon_core/hosts/hiero/api/startup/Icons/review.psd b/server_addon/hiero/client/ayon_hiero/api/startup/Icons/review.psd similarity index 100% rename from client/ayon_core/hosts/hiero/api/startup/Icons/review.psd rename to server_addon/hiero/client/ayon_hiero/api/startup/Icons/review.psd diff --git a/client/ayon_core/hosts/hiero/api/startup/Icons/volume.png b/server_addon/hiero/client/ayon_hiero/api/startup/Icons/volume.png similarity index 100% rename from client/ayon_core/hosts/hiero/api/startup/Icons/volume.png rename to server_addon/hiero/client/ayon_hiero/api/startup/Icons/volume.png diff --git a/client/ayon_core/hosts/hiero/api/startup/Icons/z_layer_bg.png b/server_addon/hiero/client/ayon_hiero/api/startup/Icons/z_layer_bg.png similarity index 100% rename from client/ayon_core/hosts/hiero/api/startup/Icons/z_layer_bg.png rename to server_addon/hiero/client/ayon_hiero/api/startup/Icons/z_layer_bg.png diff --git a/client/ayon_core/hosts/hiero/api/startup/Icons/z_layer_fg.png b/server_addon/hiero/client/ayon_hiero/api/startup/Icons/z_layer_fg.png similarity index 100% rename from client/ayon_core/hosts/hiero/api/startup/Icons/z_layer_fg.png rename to server_addon/hiero/client/ayon_hiero/api/startup/Icons/z_layer_fg.png diff --git a/client/ayon_core/hosts/hiero/api/startup/Icons/z_layer_main.png b/server_addon/hiero/client/ayon_hiero/api/startup/Icons/z_layer_main.png similarity index 100% rename from client/ayon_core/hosts/hiero/api/startup/Icons/z_layer_main.png rename to server_addon/hiero/client/ayon_hiero/api/startup/Icons/z_layer_main.png diff --git a/client/ayon_core/hosts/hiero/api/startup/Python/Startup/SpreadsheetExport.py b/server_addon/hiero/client/ayon_hiero/api/startup/Python/Startup/SpreadsheetExport.py similarity index 100% rename from client/ayon_core/hosts/hiero/api/startup/Python/Startup/SpreadsheetExport.py rename to server_addon/hiero/client/ayon_hiero/api/startup/Python/Startup/SpreadsheetExport.py diff --git a/client/ayon_core/hosts/hiero/api/startup/Python/Startup/Startup.py b/server_addon/hiero/client/ayon_hiero/api/startup/Python/Startup/Startup.py similarity index 70% rename from client/ayon_core/hosts/hiero/api/startup/Python/Startup/Startup.py rename to server_addon/hiero/client/ayon_hiero/api/startup/Python/Startup/Startup.py index cffab8067c..c916bf37e9 100644 --- a/client/ayon_core/hosts/hiero/api/startup/Python/Startup/Startup.py +++ b/server_addon/hiero/client/ayon_hiero/api/startup/Python/Startup/Startup.py @@ -2,11 +2,11 @@ import traceback # activate hiero from pype from ayon_core.pipeline import install_host -import ayon_core.hosts.hiero.api as phiero +import ayon_hiero.api as phiero install_host(phiero) try: - __import__("ayon_core.hosts.hiero.api") + __import__("ayon_hiero.api") __import__("pyblish") except ImportError as e: @@ -15,5 +15,5 @@ except ImportError as e: else: # Setup integration - import ayon_core.hosts.hiero.api as phiero + import ayon_hiero.api as phiero phiero.lib.setup() diff --git a/client/ayon_core/hosts/hiero/api/startup/Python/Startup/otioexporter/OTIOExportTask.py b/server_addon/hiero/client/ayon_hiero/api/startup/Python/Startup/otioexporter/OTIOExportTask.py similarity index 97% rename from client/ayon_core/hosts/hiero/api/startup/Python/Startup/otioexporter/OTIOExportTask.py rename to server_addon/hiero/client/ayon_hiero/api/startup/Python/Startup/otioexporter/OTIOExportTask.py index bd5048a832..d4cb342c72 100644 --- a/client/ayon_core/hosts/hiero/api/startup/Python/Startup/otioexporter/OTIOExportTask.py +++ b/server_addon/hiero/client/ayon_hiero/api/startup/Python/Startup/otioexporter/OTIOExportTask.py @@ -8,7 +8,7 @@ import hiero.core from hiero.core import util import opentimelineio as otio -from ayon_core.hosts.hiero.api.otio import hiero_export +from ayon_hiero.api.otio import hiero_export class OTIOExportTask(hiero.core.TaskBase): diff --git a/client/ayon_core/hosts/hiero/api/startup/Python/Startup/otioexporter/OTIOExportUI.py b/server_addon/hiero/client/ayon_hiero/api/startup/Python/Startup/otioexporter/OTIOExportUI.py similarity index 97% rename from client/ayon_core/hosts/hiero/api/startup/Python/Startup/otioexporter/OTIOExportUI.py rename to server_addon/hiero/client/ayon_hiero/api/startup/Python/Startup/otioexporter/OTIOExportUI.py index 25aa8bb0cf..131b385f53 100644 --- a/client/ayon_core/hosts/hiero/api/startup/Python/Startup/otioexporter/OTIOExportUI.py +++ b/server_addon/hiero/client/ayon_hiero/api/startup/Python/Startup/otioexporter/OTIOExportUI.py @@ -22,7 +22,7 @@ except ImportError: FormLayout = QFormLayout # lint:ok -from ayon_core.hosts.hiero.api.otio import hiero_export +from ayon_hiero.api.otio import hiero_export class OTIOExportUI(hiero.ui.TaskUIBase): def __init__(self, preset): diff --git a/client/ayon_core/hosts/hiero/api/startup/Python/Startup/otioexporter/__init__.py b/server_addon/hiero/client/ayon_hiero/api/startup/Python/Startup/otioexporter/__init__.py similarity index 100% rename from client/ayon_core/hosts/hiero/api/startup/Python/Startup/otioexporter/__init__.py rename to server_addon/hiero/client/ayon_hiero/api/startup/Python/Startup/otioexporter/__init__.py diff --git a/client/ayon_core/hosts/hiero/api/startup/Python/Startup/project_helpers.py b/server_addon/hiero/client/ayon_hiero/api/startup/Python/Startup/project_helpers.py similarity index 100% rename from client/ayon_core/hosts/hiero/api/startup/Python/Startup/project_helpers.py rename to server_addon/hiero/client/ayon_hiero/api/startup/Python/Startup/project_helpers.py diff --git a/client/ayon_core/hosts/hiero/api/startup/Python/Startup/selection_tracker.py b/server_addon/hiero/client/ayon_hiero/api/startup/Python/Startup/selection_tracker.py similarity index 100% rename from client/ayon_core/hosts/hiero/api/startup/Python/Startup/selection_tracker.py rename to server_addon/hiero/client/ayon_hiero/api/startup/Python/Startup/selection_tracker.py diff --git a/client/ayon_core/hosts/hiero/api/startup/Python/Startup/setFrameRate.py b/server_addon/hiero/client/ayon_hiero/api/startup/Python/Startup/setFrameRate.py similarity index 100% rename from client/ayon_core/hosts/hiero/api/startup/Python/Startup/setFrameRate.py rename to server_addon/hiero/client/ayon_hiero/api/startup/Python/Startup/setFrameRate.py diff --git a/client/ayon_core/hosts/hiero/api/startup/Python/StartupUI/PimpMySpreadsheet.py b/server_addon/hiero/client/ayon_hiero/api/startup/Python/StartupUI/PimpMySpreadsheet.py similarity index 100% rename from client/ayon_core/hosts/hiero/api/startup/Python/StartupUI/PimpMySpreadsheet.py rename to server_addon/hiero/client/ayon_hiero/api/startup/Python/StartupUI/PimpMySpreadsheet.py diff --git a/client/ayon_core/hosts/hiero/api/startup/Python/StartupUI/Purge.py b/server_addon/hiero/client/ayon_hiero/api/startup/Python/StartupUI/Purge.py similarity index 100% rename from client/ayon_core/hosts/hiero/api/startup/Python/StartupUI/Purge.py rename to server_addon/hiero/client/ayon_hiero/api/startup/Python/StartupUI/Purge.py diff --git a/client/ayon_core/hosts/hiero/api/startup/Python/StartupUI/nukeStyleKeyboardShortcuts.py b/server_addon/hiero/client/ayon_hiero/api/startup/Python/StartupUI/nukeStyleKeyboardShortcuts.py similarity index 100% rename from client/ayon_core/hosts/hiero/api/startup/Python/StartupUI/nukeStyleKeyboardShortcuts.py rename to server_addon/hiero/client/ayon_hiero/api/startup/Python/StartupUI/nukeStyleKeyboardShortcuts.py diff --git a/client/ayon_core/hosts/hiero/api/startup/Python/StartupUI/otioimporter/OTIOImport.py b/server_addon/hiero/client/ayon_hiero/api/startup/Python/StartupUI/otioimporter/OTIOImport.py similarity index 100% rename from client/ayon_core/hosts/hiero/api/startup/Python/StartupUI/otioimporter/OTIOImport.py rename to server_addon/hiero/client/ayon_hiero/api/startup/Python/StartupUI/otioimporter/OTIOImport.py diff --git a/client/ayon_core/hosts/hiero/api/startup/Python/StartupUI/otioimporter/__init__.py b/server_addon/hiero/client/ayon_hiero/api/startup/Python/StartupUI/otioimporter/__init__.py similarity index 98% rename from client/ayon_core/hosts/hiero/api/startup/Python/StartupUI/otioimporter/__init__.py rename to server_addon/hiero/client/ayon_hiero/api/startup/Python/StartupUI/otioimporter/__init__.py index 29507db975..c0f1cc9c67 100644 --- a/client/ayon_core/hosts/hiero/api/startup/Python/StartupUI/otioimporter/__init__.py +++ b/server_addon/hiero/client/ayon_hiero/api/startup/Python/StartupUI/otioimporter/__init__.py @@ -9,7 +9,7 @@ import hiero.core import PySide2.QtWidgets as qw -from ayon_core.hosts.hiero.api.otio.hiero_import import load_otio +from ayon_hiero.api.otio.hiero_import import load_otio class OTIOProjectSelect(qw.QDialog): diff --git a/client/ayon_core/hosts/hiero/api/startup/Python/StartupUI/setPosterFrame.py b/server_addon/hiero/client/ayon_hiero/api/startup/Python/StartupUI/setPosterFrame.py similarity index 100% rename from client/ayon_core/hosts/hiero/api/startup/Python/StartupUI/setPosterFrame.py rename to server_addon/hiero/client/ayon_hiero/api/startup/Python/StartupUI/setPosterFrame.py diff --git a/client/ayon_core/hosts/hiero/api/startup/TaskPresets/10.5/Processors/hiero.exporters.FnShotProcessor.ShotProcessor/pipeline.xml b/server_addon/hiero/client/ayon_hiero/api/startup/TaskPresets/10.5/Processors/hiero.exporters.FnShotProcessor.ShotProcessor/pipeline.xml similarity index 100% rename from client/ayon_core/hosts/hiero/api/startup/TaskPresets/10.5/Processors/hiero.exporters.FnShotProcessor.ShotProcessor/pipeline.xml rename to server_addon/hiero/client/ayon_hiero/api/startup/TaskPresets/10.5/Processors/hiero.exporters.FnShotProcessor.ShotProcessor/pipeline.xml diff --git a/client/ayon_core/hosts/hiero/api/startup/TaskPresets/11.1/Processors/hiero.exporters.FnShotProcessor.ShotProcessor/pipeline.xml b/server_addon/hiero/client/ayon_hiero/api/startup/TaskPresets/11.1/Processors/hiero.exporters.FnShotProcessor.ShotProcessor/pipeline.xml similarity index 100% rename from client/ayon_core/hosts/hiero/api/startup/TaskPresets/11.1/Processors/hiero.exporters.FnShotProcessor.ShotProcessor/pipeline.xml rename to server_addon/hiero/client/ayon_hiero/api/startup/TaskPresets/11.1/Processors/hiero.exporters.FnShotProcessor.ShotProcessor/pipeline.xml diff --git a/client/ayon_core/hosts/hiero/api/startup/TaskPresets/11.2/hiero.exporters.FnShotProcessor.ShotProcessor/pipeline.xml b/server_addon/hiero/client/ayon_hiero/api/startup/TaskPresets/11.2/hiero.exporters.FnShotProcessor.ShotProcessor/pipeline.xml similarity index 100% rename from client/ayon_core/hosts/hiero/api/startup/TaskPresets/11.2/hiero.exporters.FnShotProcessor.ShotProcessor/pipeline.xml rename to server_addon/hiero/client/ayon_hiero/api/startup/TaskPresets/11.2/hiero.exporters.FnShotProcessor.ShotProcessor/pipeline.xml diff --git a/client/ayon_core/hosts/hiero/api/style.css b/server_addon/hiero/client/ayon_hiero/api/style.css similarity index 100% rename from client/ayon_core/hosts/hiero/api/style.css rename to server_addon/hiero/client/ayon_hiero/api/style.css diff --git a/client/ayon_core/hosts/hiero/api/tags.py b/server_addon/hiero/client/ayon_hiero/api/tags.py similarity index 100% rename from client/ayon_core/hosts/hiero/api/tags.py rename to server_addon/hiero/client/ayon_hiero/api/tags.py diff --git a/client/ayon_core/hosts/hiero/api/workio.py b/server_addon/hiero/client/ayon_hiero/api/workio.py similarity index 100% rename from client/ayon_core/hosts/hiero/api/workio.py rename to server_addon/hiero/client/ayon_hiero/api/workio.py diff --git a/client/ayon_core/hosts/hiero/plugins/create/create_shot_clip.py b/server_addon/hiero/client/ayon_hiero/plugins/create/create_shot_clip.py similarity index 99% rename from client/ayon_core/hosts/hiero/plugins/create/create_shot_clip.py rename to server_addon/hiero/client/ayon_hiero/plugins/create/create_shot_clip.py index 1fc808fdd1..201cf382e2 100644 --- a/client/ayon_core/hosts/hiero/plugins/create/create_shot_clip.py +++ b/server_addon/hiero/client/ayon_hiero/plugins/create/create_shot_clip.py @@ -1,6 +1,6 @@ from copy import deepcopy -import ayon_core.hosts.hiero.api as phiero -# from ayon_core.hosts.hiero.api import plugin, lib +import ayon_hiero.api as phiero +# from ayon_hiero.api import plugin, lib # reload(lib) # reload(plugin) # reload(phiero) diff --git a/client/ayon_core/hosts/hiero/plugins/load/load_clip.py b/server_addon/hiero/client/ayon_hiero/plugins/load/load_clip.py similarity index 99% rename from client/ayon_core/hosts/hiero/plugins/load/load_clip.py rename to server_addon/hiero/client/ayon_hiero/plugins/load/load_clip.py index 715e8c508e..d93730c735 100644 --- a/client/ayon_core/hosts/hiero/plugins/load/load_clip.py +++ b/server_addon/hiero/client/ayon_hiero/plugins/load/load_clip.py @@ -5,7 +5,7 @@ from ayon_core.lib.transcoding import ( VIDEO_EXTENSIONS, IMAGE_EXTENSIONS ) -import ayon_core.hosts.hiero.api as phiero +import ayon_hiero.api as phiero class LoadClip(phiero.SequenceLoader): diff --git a/client/ayon_core/hosts/hiero/plugins/load/load_effects.py b/server_addon/hiero/client/ayon_hiero/plugins/load/load_effects.py similarity index 99% rename from client/ayon_core/hosts/hiero/plugins/load/load_effects.py rename to server_addon/hiero/client/ayon_hiero/plugins/load/load_effects.py index 92aa2de325..24130f7485 100644 --- a/client/ayon_core/hosts/hiero/plugins/load/load_effects.py +++ b/server_addon/hiero/client/ayon_hiero/plugins/load/load_effects.py @@ -7,7 +7,7 @@ from ayon_core.pipeline import ( load, get_representation_path, ) -from ayon_core.hosts.hiero import api as phiero +from ayon_hiero import api as phiero from ayon_core.lib import Logger diff --git a/client/ayon_core/hosts/hiero/plugins/publish/collect_clip_effects.py b/server_addon/hiero/client/ayon_hiero/plugins/publish/collect_clip_effects.py similarity index 99% rename from client/ayon_core/hosts/hiero/plugins/publish/collect_clip_effects.py rename to server_addon/hiero/client/ayon_hiero/plugins/publish/collect_clip_effects.py index bfc63f2551..bd8af3b51a 100644 --- a/client/ayon_core/hosts/hiero/plugins/publish/collect_clip_effects.py +++ b/server_addon/hiero/client/ayon_hiero/plugins/publish/collect_clip_effects.py @@ -9,6 +9,7 @@ class CollectClipEffects(pyblish.api.InstancePlugin): order = pyblish.api.CollectorOrder - 0.078 label = "Collect Clip Effects Instances" families = ["clip"] + settings_category = "hiero" effect_categories = [] diff --git a/client/ayon_core/hosts/hiero/plugins/publish/collect_frame_tag_instances.py b/server_addon/hiero/client/ayon_hiero/plugins/publish/collect_frame_tag_instances.py similarity index 100% rename from client/ayon_core/hosts/hiero/plugins/publish/collect_frame_tag_instances.py rename to server_addon/hiero/client/ayon_hiero/plugins/publish/collect_frame_tag_instances.py diff --git a/client/ayon_core/hosts/hiero/plugins/publish/collect_tag_tasks.py b/server_addon/hiero/client/ayon_hiero/plugins/publish/collect_tag_tasks.py similarity index 100% rename from client/ayon_core/hosts/hiero/plugins/publish/collect_tag_tasks.py rename to server_addon/hiero/client/ayon_hiero/plugins/publish/collect_tag_tasks.py diff --git a/client/ayon_core/hosts/hiero/plugins/publish/extract_clip_effects.py b/server_addon/hiero/client/ayon_hiero/plugins/publish/extract_clip_effects.py similarity index 99% rename from client/ayon_core/hosts/hiero/plugins/publish/extract_clip_effects.py rename to server_addon/hiero/client/ayon_hiero/plugins/publish/extract_clip_effects.py index 25b52968fa..7ee979c37a 100644 --- a/client/ayon_core/hosts/hiero/plugins/publish/extract_clip_effects.py +++ b/server_addon/hiero/client/ayon_hiero/plugins/publish/extract_clip_effects.py @@ -1,4 +1,3 @@ -# from ayon_core import plugins import os import json import pyblish.api diff --git a/client/ayon_core/hosts/hiero/plugins/publish/extract_frames.py b/server_addon/hiero/client/ayon_hiero/plugins/publish/extract_frames.py similarity index 100% rename from client/ayon_core/hosts/hiero/plugins/publish/extract_frames.py rename to server_addon/hiero/client/ayon_hiero/plugins/publish/extract_frames.py diff --git a/client/ayon_core/hosts/hiero/plugins/publish/extract_thumbnail.py b/server_addon/hiero/client/ayon_hiero/plugins/publish/extract_thumbnail.py similarity index 100% rename from client/ayon_core/hosts/hiero/plugins/publish/extract_thumbnail.py rename to server_addon/hiero/client/ayon_hiero/plugins/publish/extract_thumbnail.py diff --git a/client/ayon_core/hosts/hiero/plugins/publish/integrate_version_up_workfile.py b/server_addon/hiero/client/ayon_hiero/plugins/publish/integrate_version_up_workfile.py similarity index 100% rename from client/ayon_core/hosts/hiero/plugins/publish/integrate_version_up_workfile.py rename to server_addon/hiero/client/ayon_hiero/plugins/publish/integrate_version_up_workfile.py diff --git a/client/ayon_core/hosts/hiero/plugins/publish/precollect_instances.py b/server_addon/hiero/client/ayon_hiero/plugins/publish/precollect_instances.py similarity index 99% rename from client/ayon_core/hosts/hiero/plugins/publish/precollect_instances.py rename to server_addon/hiero/client/ayon_hiero/plugins/publish/precollect_instances.py index b7a508f0b5..fa2c56182e 100644 --- a/client/ayon_core/hosts/hiero/plugins/publish/precollect_instances.py +++ b/server_addon/hiero/client/ayon_hiero/plugins/publish/precollect_instances.py @@ -3,8 +3,8 @@ import pyblish from ayon_core.pipeline import AYON_INSTANCE_ID, AVALON_INSTANCE_ID from ayon_core.pipeline.editorial import is_overlapping_otio_ranges -from ayon_core.hosts.hiero import api as phiero -from ayon_core.hosts.hiero.api.otio import hiero_export +from ayon_hiero import api as phiero +from ayon_hiero.api.otio import hiero_export import hiero # # developer reload modules diff --git a/client/ayon_core/hosts/hiero/plugins/publish/precollect_workfile.py b/server_addon/hiero/client/ayon_hiero/plugins/publish/precollect_workfile.py similarity index 98% rename from client/ayon_core/hosts/hiero/plugins/publish/precollect_workfile.py rename to server_addon/hiero/client/ayon_hiero/plugins/publish/precollect_workfile.py index 0b6b34ea6c..1dd21b3f21 100644 --- a/client/ayon_core/hosts/hiero/plugins/publish/precollect_workfile.py +++ b/server_addon/hiero/client/ayon_hiero/plugins/publish/precollect_workfile.py @@ -7,7 +7,7 @@ from qtpy.QtGui import QPixmap import hiero.ui -from ayon_core.hosts.hiero.api.otio import hiero_export +from ayon_hiero.api.otio import hiero_export class PrecollectWorkfile(pyblish.api.ContextPlugin): diff --git a/client/ayon_core/hosts/hiero/plugins/publish_old_workflow/collect_tag_comments.py b/server_addon/hiero/client/ayon_hiero/plugins/publish_old_workflow/collect_tag_comments.py similarity index 100% rename from client/ayon_core/hosts/hiero/plugins/publish_old_workflow/collect_tag_comments.py rename to server_addon/hiero/client/ayon_hiero/plugins/publish_old_workflow/collect_tag_comments.py diff --git a/client/ayon_core/hosts/hiero/plugins/publish_old_workflow/precollect_retime.py b/server_addon/hiero/client/ayon_hiero/plugins/publish_old_workflow/precollect_retime.py similarity index 98% rename from client/ayon_core/hosts/hiero/plugins/publish_old_workflow/precollect_retime.py rename to server_addon/hiero/client/ayon_hiero/plugins/publish_old_workflow/precollect_retime.py index 8503a0b6a7..c511b40abc 100644 --- a/client/ayon_core/hosts/hiero/plugins/publish_old_workflow/precollect_retime.py +++ b/server_addon/hiero/client/ayon_hiero/plugins/publish_old_workflow/precollect_retime.py @@ -1,7 +1,7 @@ from pyblish import api import hiero import math -from ayon_core.hosts.hiero.api.otio.hiero_export import create_otio_time_range +from ayon_hiero.api.otio.hiero_export import create_otio_time_range class PrecollectRetime(api.InstancePlugin): """Calculate Retiming of selected track items.""" diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/__init__.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/__init__.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/__init__.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/__init__.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/any_pb2.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/any_pb2.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/any_pb2.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/any_pb2.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/api_pb2.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/api_pb2.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/api_pb2.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/api_pb2.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/compiler/__init__.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/compiler/__init__.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/compiler/__init__.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/compiler/__init__.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/compiler/plugin_pb2.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/compiler/plugin_pb2.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/compiler/plugin_pb2.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/compiler/plugin_pb2.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/descriptor.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/descriptor.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/descriptor.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/descriptor.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/descriptor_database.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/descriptor_database.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/descriptor_database.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/descriptor_database.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/descriptor_pb2.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/descriptor_pb2.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/descriptor_pb2.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/descriptor_pb2.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/descriptor_pool.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/descriptor_pool.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/descriptor_pool.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/descriptor_pool.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/duration_pb2.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/duration_pb2.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/duration_pb2.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/duration_pb2.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/empty_pb2.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/empty_pb2.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/empty_pb2.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/empty_pb2.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/field_mask_pb2.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/field_mask_pb2.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/field_mask_pb2.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/field_mask_pb2.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/internal/__init__.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/internal/__init__.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/internal/__init__.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/internal/__init__.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/internal/_parameterized.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/internal/_parameterized.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/internal/_parameterized.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/internal/_parameterized.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/internal/api_implementation.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/internal/api_implementation.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/internal/api_implementation.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/internal/api_implementation.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/internal/builder.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/internal/builder.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/internal/builder.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/internal/builder.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/internal/containers.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/internal/containers.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/internal/containers.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/internal/containers.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/internal/decoder.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/internal/decoder.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/internal/decoder.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/internal/decoder.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/internal/encoder.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/internal/encoder.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/internal/encoder.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/internal/encoder.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/internal/enum_type_wrapper.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/internal/enum_type_wrapper.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/internal/enum_type_wrapper.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/internal/enum_type_wrapper.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/internal/extension_dict.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/internal/extension_dict.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/internal/extension_dict.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/internal/extension_dict.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/internal/message_listener.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/internal/message_listener.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/internal/message_listener.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/internal/message_listener.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/internal/message_set_extensions_pb2.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/internal/message_set_extensions_pb2.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/internal/message_set_extensions_pb2.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/internal/message_set_extensions_pb2.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/internal/missing_enum_values_pb2.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/internal/missing_enum_values_pb2.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/internal/missing_enum_values_pb2.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/internal/missing_enum_values_pb2.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/internal/more_extensions_dynamic_pb2.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/internal/more_extensions_dynamic_pb2.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/internal/more_extensions_dynamic_pb2.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/internal/more_extensions_dynamic_pb2.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/internal/more_extensions_pb2.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/internal/more_extensions_pb2.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/internal/more_extensions_pb2.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/internal/more_extensions_pb2.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/internal/more_messages_pb2.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/internal/more_messages_pb2.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/internal/more_messages_pb2.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/internal/more_messages_pb2.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/internal/no_package_pb2.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/internal/no_package_pb2.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/internal/no_package_pb2.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/internal/no_package_pb2.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/internal/python_message.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/internal/python_message.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/internal/python_message.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/internal/python_message.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/internal/type_checkers.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/internal/type_checkers.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/internal/type_checkers.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/internal/type_checkers.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/internal/well_known_types.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/internal/well_known_types.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/internal/well_known_types.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/internal/well_known_types.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/internal/wire_format.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/internal/wire_format.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/internal/wire_format.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/internal/wire_format.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/json_format.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/json_format.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/json_format.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/json_format.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/message.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/message.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/message.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/message.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/message_factory.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/message_factory.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/message_factory.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/message_factory.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/proto_builder.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/proto_builder.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/proto_builder.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/proto_builder.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/pyext/__init__.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/pyext/__init__.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/pyext/__init__.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/pyext/__init__.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/pyext/cpp_message.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/pyext/cpp_message.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/pyext/cpp_message.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/pyext/cpp_message.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/pyext/python_pb2.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/pyext/python_pb2.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/pyext/python_pb2.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/pyext/python_pb2.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/reflection.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/reflection.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/reflection.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/reflection.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/service.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/service.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/service.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/service.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/service_reflection.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/service_reflection.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/service_reflection.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/service_reflection.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/source_context_pb2.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/source_context_pb2.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/source_context_pb2.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/source_context_pb2.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/struct_pb2.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/struct_pb2.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/struct_pb2.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/struct_pb2.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/symbol_database.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/symbol_database.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/symbol_database.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/symbol_database.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/text_encoding.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/text_encoding.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/text_encoding.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/text_encoding.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/text_format.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/text_format.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/text_format.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/text_format.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/timestamp_pb2.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/timestamp_pb2.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/timestamp_pb2.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/timestamp_pb2.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/type_pb2.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/type_pb2.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/type_pb2.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/type_pb2.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/util/__init__.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/util/__init__.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/util/__init__.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/util/__init__.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/util/json_format_pb2.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/util/json_format_pb2.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/util/json_format_pb2.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/util/json_format_pb2.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/util/json_format_proto3_pb2.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/util/json_format_proto3_pb2.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/util/json_format_proto3_pb2.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/util/json_format_proto3_pb2.py diff --git a/client/ayon_core/hosts/hiero/vendor/google/protobuf/wrappers_pb2.py b/server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/wrappers_pb2.py similarity index 100% rename from client/ayon_core/hosts/hiero/vendor/google/protobuf/wrappers_pb2.py rename to server_addon/hiero/client/ayon_hiero/vendor/google/protobuf/wrappers_pb2.py diff --git a/server_addon/hiero/client/ayon_hiero/version.py b/server_addon/hiero/client/ayon_hiero/version.py new file mode 100644 index 0000000000..6a2d180afb --- /dev/null +++ b/server_addon/hiero/client/ayon_hiero/version.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- +"""Package declaring AYON addon 'hiero' version.""" +__version__ = "0.2.0" diff --git a/server_addon/hiero/package.py b/server_addon/hiero/package.py index 54c2f74fa7..1948d50e6d 100644 --- a/server_addon/hiero/package.py +++ b/server_addon/hiero/package.py @@ -1,3 +1,9 @@ name = "hiero" title = "Hiero" -version = "0.1.3" +version = "0.2.0" +client_dir = "ayon_hiero" + +ayon_required_addons = { + "core": ">0.3.2", +} +ayon_compatible_addons = {} diff --git a/server_addon/hiero/server/settings/publish_plugins.py b/server_addon/hiero/server/settings/publish_plugins.py index 0e43d4ce3a..632bb15241 100644 --- a/server_addon/hiero/server/settings/publish_plugins.py +++ b/server_addon/hiero/server/settings/publish_plugins.py @@ -7,13 +7,6 @@ from ayon_server.settings import ( ) -class CollectInstanceVersionModel(BaseSettingsModel): - enabled: bool = SettingsField( - True, - title="Enabled" - ) - - class CollectClipEffectsDefModel(BaseSettingsModel): _layout = "expanded" name: str = SettingsField("", title="Name") @@ -38,46 +31,14 @@ class CollectClipEffectsModel(BaseSettingsModel): return value -class ExtractReviewCutUpVideoModel(BaseSettingsModel): - enabled: bool = SettingsField( - True, - title="Enabled" - ) - tags_addition: list[str] = SettingsField( - default_factory=list, - title="Additional tags" - ) - - class PublishPluginsModel(BaseSettingsModel): - CollectInstanceVersion: CollectInstanceVersionModel = SettingsField( - default_factory=CollectInstanceVersionModel, - title="Collect Instance Version" - ) CollectClipEffects: CollectClipEffectsModel = SettingsField( default_factory=CollectClipEffectsModel, title="Collect Clip Effects" ) - """# TODO: enhance settings with host api: - Rename class name and plugin name - to match title (it makes more sense) - """ - ExtractReviewCutUpVideo: ExtractReviewCutUpVideoModel = SettingsField( - default_factory=ExtractReviewCutUpVideoModel, - title="Exctract Review Trim" - ) DEFAULT_PUBLISH_PLUGIN_SETTINGS = { - "CollectInstanceVersion": { - "enabled": False, - }, - "ExtractReviewCutUpVideo": { - "enabled": True, - "tags_addition": [ - "review" - ] - }, "CollectClipEffectsModel": { "effect_categories": [] } diff --git a/server_addon/maya/client/ayon_maya/api/menu.py b/server_addon/maya/client/ayon_maya/api/menu.py index 153aff07c3..a6f8ae2db0 100644 --- a/server_addon/maya/client/ayon_maya/api/menu.py +++ b/server_addon/maya/client/ayon_maya/api/menu.py @@ -25,6 +25,7 @@ from .workfile_template_builder import ( build_workfile_template, update_workfile_template ) +from ayon_core.pipeline.context_tools import version_up_current_workfile from ayon_core.tools.workfile_template_build import open_template_ui from .workfile_template_builder import MayaTemplateBuilder @@ -74,6 +75,14 @@ def install(project_settings): cmds.setParent("..", menu=True) + if project_settings["core"]["tools"]["ayon_menu"].get( + "version_up_current_workfile"): + cmds.menuItem(divider=True) + cmds.menuItem( + "Version Up Workfile", + command=lambda *args: version_up_current_workfile() + ) + cmds.menuItem(divider=True) cmds.menuItem( diff --git a/server_addon/maya/client/ayon_maya/plugins/load/load_reference.py b/server_addon/maya/client/ayon_maya/plugins/load/load_reference.py index f8e1062e38..92cee414fd 100644 --- a/server_addon/maya/client/ayon_maya/plugins/load/load_reference.py +++ b/server_addon/maya/client/ayon_maya/plugins/load/load_reference.py @@ -13,6 +13,26 @@ from ayon_maya.api.lib import ( from maya import cmds +@contextlib.contextmanager +def preserve_time_units(): + """Preserve current frame, frame range and fps""" + frame = cmds.currentTime(query=True) + fps = cmds.currentUnit(query=True, time=True) + start = cmds.playbackOptions(query=True, minTime=True) + end = cmds.playbackOptions(query=True, maxTime=True) + anim_start = cmds.playbackOptions(query=True, animationStartTime=True) + anim_end = cmds.playbackOptions(query=True, animationEndTime=True) + try: + yield + finally: + cmds.currentUnit(time=fps, updateAnimation=False) + cmds.currentTime(frame) + cmds.playbackOptions(minTime=start, + maxTime=end, + animationStartTime=anim_start, + animationEndTime=anim_end) + + @contextlib.contextmanager def preserve_modelpanel_cameras(container, log=None): """Preserve camera members of container in the modelPanels. @@ -348,6 +368,15 @@ class MayaUSDReferenceLoader(ReferenceLoader): ]) options["file_type"] = self.file_type - return super(MayaUSDReferenceLoader, self).process_reference( - context, name, namespace, options - ) + # Maya USD import reference has the tendency to change the time slider + # range and current frame, so we force revert it after + with preserve_time_units(): + return super(MayaUSDReferenceLoader, self).process_reference( + context, name, namespace, options + ) + + def update(self, container, context): + # Maya USD import reference has the tendency to change the time slider + # range and current frame, so we force revert it after + with preserve_time_units(): + super(MayaUSDReferenceLoader, self).update(container, context) diff --git a/server_addon/maya/client/ayon_maya/plugins/workfile_build/assign_look_placeholder.py b/server_addon/maya/client/ayon_maya/plugins/workfile_build/assign_look_placeholder.py new file mode 100644 index 0000000000..aaecdd78b9 --- /dev/null +++ b/server_addon/maya/client/ayon_maya/plugins/workfile_build/assign_look_placeholder.py @@ -0,0 +1,128 @@ +from maya import cmds + +from ayon_core.lib import ( + UISeparatorDef, + UILabelDef, + TextDef, + BoolDef +) +from ayon_core.lib.events import weakref_partial +from ayon_maya.api.workfile_template_builder import MayaPlaceholderPlugin +from ayon_maya.api.lib import ( + get_all_children, + assign_look, +) + + +class AssignLookPlaceholderPlugin(MayaPlaceholderPlugin): + """Assign a look product to members of the placeholder set. + + Creates an objectSet. Any members will get the look assigned with the given + product name if it exists. + + Any containers loaded from other template placeholders will get the look + assigned to their loaded containers. + + """ + + identifier = "maya.assignlook" + label = "Assign Look" + + def get_placeholder_options(self, options=None): + options = options or {} + return [ + UISeparatorDef(), + UILabelDef(label="Description"), + UISeparatorDef(), + UILabelDef( + label=( + "Creates an objectSet. Any members will get the look\n" + "assigned with the given product name if it exists.\n\n" + "Any containers loaded from other template placeholders\n" + "will get the look assigned to their loaded containers." + "" + ) + ), + UISeparatorDef(), + UILabelDef(label="Settings"), + UISeparatorDef(), + TextDef( + "product_name", + label="Product Name", + tooltip="Look product to assign to containers loaded by " + "contained placeholders", + multiline=False, + default=options.get("product_name", "lookMain") + ), + BoolDef( + "recurse", + label="Recursive", + tooltip="Assign look also to potential sub containers / " + "placeholders loaded from the load placeholder.\n" + "This will make sure that any placeholder contained " + "that itself loaded new geometry will recursively " + "also get the look assignment triggered.", + default=options.get("recurse", False) + ), + ] + + def create_placeholder(self, placeholder_data): + placeholder_data["plugin_identifier"] = self.identifier + + # Create maya objectSet on selection + selection = cmds.ls(selection=True, long=True) + product_name = placeholder_data["product_name"] + name = "AssignLook_{}".format(product_name) + node = cmds.sets(selection, name=name) + + self.imprint(node, placeholder_data) + + def populate_placeholder(self, placeholder): + callback = weakref_partial(self.assign_look, placeholder) + self.builder.add_on_depth_processed_callback( + callback, order=placeholder.order) + + # If placeholder should be deleted, delete it after finish + if not placeholder.data.get("keep_placeholder", True): + delete_callback = weakref_partial(self.delete_placeholder, + placeholder) + self.builder.add_on_finished_callback( + delete_callback, order=placeholder.order) + + def assign_look(self, placeholder): + if placeholder.data.get("finished", False): + # If not recursive we mark it finished after the first depth + # iteration - otherwise run it again to find any new members + return + + product_name = placeholder.data["product_name"] + assert product_name, "Must have defined look product name to assign" + + members = cmds.ls( + cmds.sets(placeholder.scene_identifier, query=True), long=True + ) + if not members: + return + + # Allow any children of members in the set to get assignments, + # e.g. when a group is included there. Whenever a load placeholder + # finishes it also adds loaded content into the object set the + # placeholder was in, so this will also assign to loaded content + # during this build. + assign_nodes = set(members) + assign_nodes.update(get_all_children(members)) + + processed = placeholder.data.setdefault("processed", set()) + assign_nodes.difference_update(processed) + processed.update(assign_nodes) + + if assign_nodes: + self.log.info( + "Assigning look {} for placeholder: {}".format(product_name, + placeholder) + ) + assign_nodes = list(assign_nodes) + assign_look(assign_nodes, product_name=product_name) + + if not placeholder.data.get("recurse", False): + placeholder.data["finished"] = True diff --git a/server_addon/maya/package.py b/server_addon/maya/package.py index 274f74869b..0331fb2fb6 100644 --- a/server_addon/maya/package.py +++ b/server_addon/maya/package.py @@ -1,6 +1,6 @@ name = "maya" title = "Maya" -version = "0.2.0" +version = "0.2.1" ayon_required_addons = { "core": ">0.3.2",