mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Merge branch 'develop' into chore/AY-4908_move-maya-code
This commit is contained in:
commit
24008df64f
20 changed files with 33 additions and 22 deletions
|
|
@ -54,10 +54,12 @@ MOVED_ADDON_MILESTONE_VERSIONS = {
|
|||
"celaction": VersionInfo(0, 2, 0),
|
||||
"clockify": VersionInfo(0, 2, 0),
|
||||
"flame": VersionInfo(0, 2, 0),
|
||||
"max": VersionInfo(0, 2, 0),
|
||||
"traypublisher": VersionInfo(0, 2, 0),
|
||||
"tvpaint": VersionInfo(0, 2, 0),
|
||||
"maya": VersionInfo(0, 2, 0),
|
||||
"nuke": VersionInfo(0, 2, 0),
|
||||
"substancepainter": VersionInfo(0, 2, 0),
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -27,11 +27,11 @@ from ayon_core.lib import (
|
|||
emit_event,
|
||||
)
|
||||
from ayon_core.pipeline.load import any_outdated_containers
|
||||
from ayon_core.hosts.substancepainter import SUBSTANCE_HOST_DIR
|
||||
from ayon_substancepainter import SUBSTANCE_HOST_DIR
|
||||
|
||||
from . import lib
|
||||
|
||||
log = logging.getLogger("ayon_core.hosts.substance")
|
||||
log = logging.getLogger("ayon_substancepainter")
|
||||
|
||||
PLUGINS_DIR = os.path.join(SUBSTANCE_HOST_DIR, "plugins")
|
||||
PUBLISH_PATH = os.path.join(PLUGINS_DIR, "publish")
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
|
||||
def cleanup_openpype_qt_widgets():
|
||||
def cleanup_ayon_qt_widgets():
|
||||
"""
|
||||
Workaround for Substance failing to shut down correctly
|
||||
when a Qt window was still open at the time of shutting down.
|
||||
|
|
@ -8,27 +8,27 @@ def cleanup_openpype_qt_widgets():
|
|||
This seems to work sometimes, but not all the time.
|
||||
|
||||
"""
|
||||
# TODO: Create a more reliable method to close down all OpenPype Qt widgets
|
||||
# TODO: Create a more reliable method to close down all AYON Qt widgets
|
||||
from PySide2 import QtWidgets
|
||||
import substance_painter.ui
|
||||
|
||||
# Kill OpenPype Qt widgets
|
||||
print("Killing OpenPype Qt widgets..")
|
||||
# Kill AYON Qt widgets
|
||||
print("Killing AYON Qt widgets..")
|
||||
for widget in QtWidgets.QApplication.topLevelWidgets():
|
||||
if widget.__module__.startswith("openpype."):
|
||||
if widget.__module__.startswith("ayon_"):
|
||||
print(f"Deleting widget: {widget.__class__.__name__}")
|
||||
substance_painter.ui.delete_ui_element(widget)
|
||||
|
||||
|
||||
def start_plugin():
|
||||
from ayon_core.pipeline import install_host
|
||||
from ayon_core.hosts.substancepainter.api import SubstanceHost
|
||||
from ayon_substancepainter.api import SubstanceHost
|
||||
install_host(SubstanceHost())
|
||||
|
||||
|
||||
def close_plugin():
|
||||
from ayon_core.pipeline import uninstall_host
|
||||
cleanup_openpype_qt_widgets()
|
||||
cleanup_ayon_qt_widgets()
|
||||
uninstall_host()
|
||||
|
||||
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
"""Ease the OpenPype on-boarding process by loading the plug-in on first run"""
|
||||
"""Ease the AYON on-boarding process by loading the plug-in on first run"""
|
||||
|
||||
OPENPYPE_PLUGIN_NAME = "openpype_plugin"
|
||||
AYON_PLUGIN_NAME = "ayon_plugin"
|
||||
|
||||
|
||||
def start_plugin():
|
||||
|
|
@ -19,9 +19,9 @@ def start_plugin():
|
|||
# later than this startup script, we check whether its menu initialized
|
||||
is_before_plugins_menu = PLUGINS_MENU is None
|
||||
|
||||
settings = get_settings(OPENPYPE_PLUGIN_NAME)
|
||||
settings = get_settings(AYON_PLUGIN_NAME)
|
||||
if settings.value(LAUNCH_AT_START_KEY, None) is None:
|
||||
print("Initializing OpenPype plug-in on first run...")
|
||||
print("Initializing AYON plug-in on first run...")
|
||||
if is_before_plugins_menu:
|
||||
print("- running before 'painter_plugins_ui'")
|
||||
# Delay the launch to the painter_plugins_ui initialization
|
||||
|
|
@ -29,11 +29,11 @@ def start_plugin():
|
|||
else:
|
||||
# Launch now
|
||||
print("- running after 'painter_plugins_ui'")
|
||||
plugin_manager(OPENPYPE_PLUGIN_NAME)(True)
|
||||
plugin_manager(AYON_PLUGIN_NAME)(True)
|
||||
|
||||
# Set the checked state in the menu to avoid confusion
|
||||
action = next(action for action in PLUGINS_MENU._menu.actions()
|
||||
if action.text() == OPENPYPE_PLUGIN_NAME)
|
||||
if action.text() == AYON_PLUGIN_NAME)
|
||||
if action is not None:
|
||||
action.blockSignals(True)
|
||||
action.setChecked(True)
|
||||
|
|
@ -8,13 +8,13 @@ from ayon_core.lib import (
|
|||
BoolDef
|
||||
)
|
||||
|
||||
from ayon_core.hosts.substancepainter.api.pipeline import (
|
||||
from ayon_substancepainter.api.pipeline import (
|
||||
get_instances,
|
||||
set_instance,
|
||||
set_instances,
|
||||
remove_instance
|
||||
)
|
||||
from ayon_core.hosts.substancepainter.api.lib import get_export_presets
|
||||
from ayon_substancepainter.api.lib import get_export_presets
|
||||
|
||||
import substance_painter
|
||||
import substance_painter.project
|
||||
|
|
@ -28,6 +28,7 @@ class CreateTextures(Creator):
|
|||
icon = "picture-o"
|
||||
|
||||
default_variant = "Main"
|
||||
settings_category = "substancepainter"
|
||||
channel_mapping = []
|
||||
|
||||
def apply_settings(self, project_settings):
|
||||
|
|
@ -5,7 +5,7 @@ import ayon_api
|
|||
|
||||
from ayon_core.pipeline import CreatedInstance, AutoCreator
|
||||
|
||||
from ayon_core.hosts.substancepainter.api.pipeline import (
|
||||
from ayon_substancepainter.api.pipeline import (
|
||||
set_instances,
|
||||
set_instance,
|
||||
get_instances
|
||||
|
|
@ -22,6 +22,7 @@ class CreateWorkfile(AutoCreator):
|
|||
icon = "document"
|
||||
|
||||
default_variant = "Main"
|
||||
settings_category = "substancepainter"
|
||||
|
||||
def create(self):
|
||||
|
||||
|
|
@ -5,7 +5,7 @@ from ayon_core.pipeline import (
|
|||
get_representation_path,
|
||||
)
|
||||
from ayon_core.pipeline.load import LoadError
|
||||
from ayon_core.hosts.substancepainter.api.pipeline import (
|
||||
from ayon_substancepainter.api.pipeline import (
|
||||
imprint_container,
|
||||
set_container_metadata,
|
||||
remove_container_metadata
|
||||
|
|
@ -6,7 +6,7 @@ import ayon_api
|
|||
|
||||
import substance_painter.textureset
|
||||
from ayon_core.pipeline import publish
|
||||
from ayon_core.hosts.substancepainter.api.lib import (
|
||||
from ayon_substancepainter.api.lib import (
|
||||
get_parsed_export_maps,
|
||||
get_filtered_export_preset,
|
||||
strip_template
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import substance_painter.export
|
||||
from ayon_core.pipeline import KnownPublishError, publish
|
||||
from ayon_core.hosts.substancepainter.api.lib import set_layer_stack_opacity
|
||||
from ayon_substancepainter.api.lib import set_layer_stack_opacity
|
||||
|
||||
|
||||
class ExtractTextures(publish.Extractor,
|
||||
|
|
@ -1,3 +1,10 @@
|
|||
name = "substancepainter"
|
||||
title = "Substance Painter"
|
||||
version = "0.1.2"
|
||||
version = "0.2.0"
|
||||
|
||||
client_dir = "ayon_substancepainter"
|
||||
|
||||
ayon_required_addons = {
|
||||
"core": ">0.3.2",
|
||||
}
|
||||
ayon_compatible_addons = {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue