Merge branch 'develop' into enhancement/AY-4913_Move-Fusion-client-code

This commit is contained in:
Jakub Trllo 2024-05-31 16:33:58 +02:00 committed by GitHub
commit fac0961696
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
101 changed files with 362 additions and 82 deletions

View file

@ -56,10 +56,12 @@ MOVED_ADDON_MILESTONE_VERSIONS = {
"flame": VersionInfo(0, 2, 0),
"fusion": VersionInfo(0, 2, 0),
"max": VersionInfo(0, 2, 0),
"photoshop": VersionInfo(0, 2, 0),
"traypublisher": VersionInfo(0, 2, 0),
"tvpaint": VersionInfo(0, 2, 0),
"maya": VersionInfo(0, 2, 0),
"nuke": VersionInfo(0, 2, 0),
"resolve": VersionInfo(0, 2, 0),
"substancepainter": VersionInfo(0, 2, 0),
}

View file

@ -1,6 +0,0 @@
from .addon import ResolveAddon
__all__ = (
"ResolveAddon",
)

View file

@ -3,9 +3,9 @@ import pyblish.api
from ayon_core.lib import filter_profiles
from ayon_core.pipeline.publish import (
PublishValidationError,
OptionalPyblishPluginMixin,
get_current_host_name,
OptionalPyblishPluginMixin
)
from ayon_core.pipeline import get_current_host_name
class ValidateVersion(pyblish.api.InstancePlugin, OptionalPyblishPluginMixin):

View file

@ -1,3 +1,4 @@
from .version import __version__
from .addon import (
PHOTOSHOP_ADDON_ROOT,
PhotoshopAddon,
@ -6,6 +7,8 @@ from .addon import (
__all__ = (
"__version__",
"PHOTOSHOP_ADDON_ROOT",
"PhotoshopAddon",
"get_launch_script_path",

View file

@ -1,11 +1,14 @@
import os
from ayon_core.addon import AYONAddon, IHostAddon
from .version import __version__
PHOTOSHOP_ADDON_ROOT = os.path.dirname(os.path.abspath(__file__))
class PhotoshopAddon(AYONAddon, IHostAddon):
name = "photoshop"
version = __version__
host_name = "photoshop"
def add_implementation_envs(self, env, _app):
@ -33,4 +36,3 @@ def get_launch_script_path():
return os.path.join(
PHOTOSHOP_ADDON_ROOT, "api", "launch_script.py"
)

View file

@ -17,7 +17,7 @@ ExManCmd /install {path to addon}/api/extension.zxp
The easiest way to get the server and Photoshop launch is with:
```
python -c ^"import ayon_core.hosts.photoshop;ayon_core.hosts.photoshop.launch(""C:\Program Files\Adobe\Adobe Photoshop 2020\Photoshop.exe"")^"
python -c ^"import ayon_photoshop;ayon_photoshop.launch(""C:\Program Files\Adobe\Adobe Photoshop 2020\Photoshop.exe"")^"
```
`avalon.photoshop.launch` launches the application and server, and also closes the server when Photoshop exists.
@ -128,7 +128,7 @@ class CollectInstances(pyblish.api.ContextPlugin):
import os
from ayon_core.pipeline import publish
from ayon_core.hosts.photoshop import api as photoshop
from ayon_photoshop import api as photoshop
class ExtractImage(publish.Extractor):

View file

@ -22,9 +22,9 @@ from ayon_core.pipeline.workfile import (
)
from ayon_core.pipeline.template_data import get_template_data_with_names
from ayon_core.tools.utils import host_tools
from ayon_core.tools.adobe_webserver.app import WebServerTool
from ayon_core.pipeline.context_tools import change_current_context
from .webserver import WebServerTool
from .ws_stub import PhotoshopServerStub
log = Logger.get_logger(__name__)

View file

@ -8,7 +8,7 @@ workfile or others.
import os
import sys
from ayon_core.hosts.photoshop.api.lib import main as host_main
from ayon_photoshop.api.lib import main as host_main
# Get current file to locate start point of sys.argv
CURRENT_FILE = os.path.abspath(__file__)

View file

@ -19,7 +19,7 @@ def safe_excepthook(*args):
def main(*subprocess_args):
from ayon_core.hosts.photoshop.api import PhotoshopHost
from ayon_photoshop.api import PhotoshopHost
host = PhotoshopHost()
install_host(host)

View file

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Before After
Before After

View file

@ -21,8 +21,8 @@ from ayon_core.host import (
)
from ayon_core.pipeline.load import any_outdated_containers
from ayon_core.hosts.photoshop import PHOTOSHOP_ADDON_ROOT
from ayon_core.tools.utils import get_ayon_qt_app
from ayon_photoshop import PHOTOSHOP_ADDON_ROOT
from . import lib

View file

@ -0,0 +1,241 @@
"""Webserver for communication with photoshop.
Aiohttp (Asyncio) based websocket server used for communication with host
application.
This webserver is started in spawned Python process that opens DCC during
its launch, waits for connection from DCC and handles communication going
forward. Server is closed before Python process is killed.
"""
import os
import logging
import urllib
import threading
import asyncio
import socket
from aiohttp import web
from wsrpc_aiohttp import WSRPCClient
from ayon_core.pipeline import get_global_context
log = logging.getLogger(__name__)
class WebServerTool:
"""
Basic POC implementation of asychronic websocket RPC server.
Uses class in external_app_1.py to mimic implementation for single
external application.
'test_client' folder contains two test implementations of client
"""
_instance = None
def __init__(self):
WebServerTool._instance = self
self.client = None
self.handlers = {}
self.on_stop_callbacks = []
port = None
host_name = "localhost"
websocket_url = os.getenv("WEBSOCKET_URL")
if websocket_url:
parsed = urllib.parse.urlparse(websocket_url)
port = parsed.port
host_name = parsed.netloc.split(":")[0]
if not port:
port = 8098 # fallback
self.port = port
self.host_name = host_name
self.app = web.Application()
# add route with multiple methods for single "external app"
self.webserver_thread = WebServerThread(self, self.port)
def add_route(self, *args, **kwargs):
self.app.router.add_route(*args, **kwargs)
def add_static(self, *args, **kwargs):
self.app.router.add_static(*args, **kwargs)
def start_server(self):
if self.webserver_thread and not self.webserver_thread.is_alive():
self.webserver_thread.start()
def stop_server(self):
self.stop()
async def send_context_change(self, host):
"""
Calls running webserver to inform about context change
Used when new PS/AE should be triggered,
but one already running, without
this publish would point to old context.
"""
client = WSRPCClient(os.getenv("WEBSOCKET_URL"),
loop=asyncio.get_event_loop())
await client.connect()
context = get_global_context()
project_name = context["project_name"]
folder_path = context["folder_path"]
task_name = context["task_name"]
log.info("Sending context change to {}{}/{}".format(
project_name, folder_path, task_name
))
await client.call(
'{}.set_context'.format(host),
project=project_name,
folder=folder_path,
task=task_name
)
await client.close()
def port_occupied(self, host_name, port):
"""
Check if 'url' is already occupied.
This could mean, that app is already running and we are trying open it
again. In that case, use existing running webserver.
Check here is easier than capturing exception from thread.
"""
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as con:
result = con.connect_ex((host_name, port)) == 0
if result:
print(f"Port {port} is already in use")
return result
def call(self, func):
log.debug("websocket.call {}".format(func))
future = asyncio.run_coroutine_threadsafe(
func,
self.webserver_thread.loop
)
result = future.result()
return result
@staticmethod
def get_instance():
if WebServerTool._instance is None:
WebServerTool()
return WebServerTool._instance
@property
def is_running(self):
if not self.webserver_thread:
return False
return self.webserver_thread.is_running
def stop(self):
if not self.is_running:
return
try:
log.debug("Stopping websocket server")
self.webserver_thread.is_running = False
self.webserver_thread.stop()
except Exception:
log.warning(
"Error has happened during Killing websocket server",
exc_info=True
)
def thread_stopped(self):
for callback in self.on_stop_callbacks:
callback()
class WebServerThread(threading.Thread):
""" Listener for websocket rpc requests.
It would be probably better to "attach" this to main thread (as for
example Harmony needs to run something on main thread), but currently
it creates separate thread and separate asyncio event loop
"""
def __init__(self, module, port):
super(WebServerThread, self).__init__()
self.is_running = False
self.port = port
self.module = module
self.loop = None
self.runner = None
self.site = None
self.tasks = []
def run(self):
self.is_running = True
try:
log.info("Starting web server")
self.loop = asyncio.new_event_loop() # create new loop for thread
asyncio.set_event_loop(self.loop)
self.loop.run_until_complete(self.start_server())
websocket_url = "ws://localhost:{}/ws".format(self.port)
log.debug(
"Running Websocket server on URL: \"{}\"".format(websocket_url)
)
asyncio.ensure_future(self.check_shutdown(), loop=self.loop)
self.loop.run_forever()
except Exception:
self.is_running = False
log.warning(
"Websocket Server service has failed", exc_info=True
)
raise
finally:
self.loop.close() # optional
self.is_running = False
self.module.thread_stopped()
log.info("Websocket server stopped")
async def start_server(self):
""" Starts runner and TCPsite """
self.runner = web.AppRunner(self.module.app)
await self.runner.setup()
self.site = web.TCPSite(self.runner, 'localhost', self.port)
await self.site.start()
def stop(self):
"""Sets is_running flag to false, 'check_shutdown' shuts server down"""
self.is_running = False
async def check_shutdown(self):
""" Future that is running and checks if server should be running
periodically.
"""
while self.is_running:
while self.tasks:
task = self.tasks.pop(0)
log.debug("waiting for task {}".format(task))
await task
log.debug("returned value {}".format(task.result))
await asyncio.sleep(0.5)
log.debug("Starting shutdown")
await self.site.stop()
log.debug("Site stopped")
await self.runner.cleanup()
log.debug("Runner stopped")
tasks = [task for task in asyncio.all_tasks() if
task is not asyncio.current_task()]
list(map(lambda task: task.cancel(), tasks)) # cancel all the tasks
results = await asyncio.gather(*tasks, return_exceptions=True)
log.debug(f'Finished awaiting cancelled tasks, results: {results}...')
await self.loop.shutdown_asyncgens()
# to really make sure everything else has time to stop
await asyncio.sleep(0.07)
self.loop.stop()

View file

@ -6,7 +6,7 @@ import json
import attr
from wsrpc_aiohttp import WebSocketAsync
from ayon_core.tools.adobe_webserver.app import WebServerTool
from .webserver import WebServerTool
@attr.s

View file

@ -7,7 +7,7 @@ from ayon_core.lib import (
is_using_ayon_console,
)
from ayon_applications import PreLaunchHook, LaunchTypes
from ayon_core.hosts.photoshop import get_launch_script_path
from ayon_photoshop import get_launch_script_path
def get_launch_kwargs(kwargs):

View file

@ -2,13 +2,13 @@ import re
import ayon_api
import ayon_core.hosts.photoshop.api as api
from ayon_core.lib import prepare_template_data
from ayon_core.pipeline import (
AutoCreator,
CreatedInstance
)
from ayon_core.hosts.photoshop.api.pipeline import cache_and_get_instances
from ayon_photoshop import api
from ayon_photoshop.api.pipeline import cache_and_get_instances
class PSAutoCreator(AutoCreator):

View file

@ -1,7 +1,7 @@
import ayon_api
import ayon_core.hosts.photoshop.api as api
from ayon_core.hosts.photoshop.lib import PSAutoCreator, clean_product_name
from ayon_photoshop import api
from ayon_photoshop.lib import PSAutoCreator, clean_product_name
from ayon_core.lib import BoolDef, prepare_template_data
from ayon_core.pipeline.create import get_product_name, CreatedInstance

View file

@ -1,6 +1,5 @@
import re
from ayon_core.hosts.photoshop import api
from ayon_core.lib import BoolDef
from ayon_core.pipeline import (
Creator,
@ -9,8 +8,9 @@ from ayon_core.pipeline import (
)
from ayon_core.lib import prepare_template_data
from ayon_core.pipeline.create import PRODUCT_NAME_ALLOWED_SYMBOLS
from ayon_core.hosts.photoshop.api.pipeline import cache_and_get_instances
from ayon_core.hosts.photoshop.lib import clean_product_name
from ayon_photoshop import api
from ayon_photoshop.api.pipeline import cache_and_get_instances
from ayon_photoshop.lib import clean_product_name
class ImageCreator(Creator):

View file

@ -1,4 +1,4 @@
from ayon_core.hosts.photoshop.lib import PSAutoCreator
from ayon_photoshop.lib import PSAutoCreator
class ReviewCreator(PSAutoCreator):

View file

@ -1,4 +1,4 @@
from ayon_core.hosts.photoshop.lib import PSAutoCreator
from ayon_photoshop.lib import PSAutoCreator
class WorkfileCreator(PSAutoCreator):

View file

@ -1,8 +1,8 @@
import re
from ayon_core.pipeline import get_representation_path
from ayon_core.hosts.photoshop import api as photoshop
from ayon_core.hosts.photoshop.api import get_unique_layer_name
from ayon_photoshop import api as photoshop
from ayon_photoshop.api import get_unique_layer_name
class ImageLoader(photoshop.PhotoshopLoader):

View file

@ -2,8 +2,8 @@ import os
import qargparse
from ayon_core.hosts.photoshop import api as photoshop
from ayon_core.hosts.photoshop.api import get_unique_layer_name
from ayon_photoshop import api as photoshop
from ayon_photoshop.api import get_unique_layer_name
class ImageFromSequenceLoader(photoshop.PhotoshopLoader):

View file

@ -1,8 +1,8 @@
import re
from ayon_core.pipeline import get_representation_path
from ayon_core.hosts.photoshop import api as photoshop
from ayon_core.hosts.photoshop.api import get_unique_layer_name
from ayon_photoshop import api as photoshop
from ayon_photoshop.api import get_unique_layer_name
class ReferenceLoader(photoshop.PhotoshopLoader):

View file

@ -2,7 +2,7 @@
"""Close PS after publish. For Webpublishing only."""
import pyblish.api
from ayon_core.hosts.photoshop import api as photoshop
from ayon_photoshop import api as photoshop
class ClosePS(pyblish.api.ContextPlugin):

View file

@ -1,6 +1,6 @@
import pyblish.api
from ayon_core.hosts.photoshop import api as photoshop
from ayon_photoshop import api as photoshop
from ayon_core.pipeline.create import get_product_name

View file

@ -1,6 +1,6 @@
import pyblish.api
from ayon_core.hosts.photoshop import api as photoshop
from ayon_photoshop import api as photoshop
class CollectAutoImageRefresh(pyblish.api.ContextPlugin):

View file

@ -7,7 +7,7 @@ Provides:
"""
import pyblish.api
from ayon_core.hosts.photoshop import api as photoshop
from ayon_photoshop import api as photoshop
from ayon_core.pipeline.create import get_product_name

View file

@ -1,7 +1,7 @@
import os
import pyblish.api
from ayon_core.hosts.photoshop import api as photoshop
from ayon_photoshop import api as photoshop
from ayon_core.pipeline.create import get_product_name

View file

@ -4,8 +4,8 @@ import re
import pyblish.api
from ayon_core.lib import prepare_template_data, is_in_tests
from ayon_core.hosts.photoshop import api as photoshop
from ayon_core.settings import get_project_settings
from ayon_photoshop import api as photoshop
class CollectColorCodedInstances(pyblish.api.ContextPlugin):

View file

@ -2,7 +2,7 @@ import os
import pyblish.api
from ayon_core.hosts.photoshop import api as photoshop
from ayon_photoshop import api as photoshop
class CollectCurrentFile(pyblish.api.ContextPlugin):

View file

@ -2,7 +2,7 @@ import os
import re
import pyblish.api
from ayon_core.hosts.photoshop import api as photoshop
from ayon_photoshop import api as photoshop
class CollectExtensionVersion(pyblish.api.ContextPlugin):

View file

@ -1,6 +1,6 @@
import pyblish.api
from ayon_core.hosts.photoshop import api
from ayon_photoshop import api
class CollectImage(pyblish.api.InstancePlugin):

View file

@ -2,7 +2,7 @@ import os
import pyblish.api
from ayon_core.pipeline import publish
from ayon_core.hosts.photoshop import api as photoshop
from ayon_photoshop import api as photoshop
class ExtractImage(pyblish.api.ContextPlugin):

View file

@ -7,7 +7,7 @@ from ayon_core.lib import (
get_ffmpeg_tool_args,
)
from ayon_core.pipeline import publish
from ayon_core.hosts.photoshop import api as photoshop
from ayon_photoshop import api as photoshop
class ExtractReview(publish.Extractor):

View file

@ -1,5 +1,5 @@
from ayon_core.pipeline import publish
from ayon_core.hosts.photoshop import api as photoshop
from ayon_photoshop import api as photoshop
class ExtractSaveScene(publish.Extractor):

View file

@ -3,7 +3,7 @@ import pyblish.api
from ayon_core.pipeline.publish import get_errored_plugins_from_context
from ayon_core.lib import version_up
from ayon_core.hosts.photoshop import api as photoshop
from ayon_photoshop import api as photoshop
class IncrementWorkfile(pyblish.api.InstancePlugin):

View file

@ -6,7 +6,7 @@ from ayon_core.pipeline.publish import (
PublishXmlValidationError,
OptionalPyblishPluginMixin
)
from ayon_core.hosts.photoshop import api as photoshop
from ayon_photoshop import api as photoshop
class ValidateInstanceFolderRepair(pyblish.api.Action):

View file

@ -2,7 +2,7 @@ import re
import pyblish.api
from ayon_core.hosts.photoshop import api as photoshop
from ayon_photoshop import api as photoshop
from ayon_core.pipeline.create import PRODUCT_NAME_ALLOWED_SYMBOLS
from ayon_core.pipeline.publish import (
ValidateContentsOrder,

View file

@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
"""Package declaring AYON addon 'photoshop' version."""
__version__ = "0.2.0"

View file

@ -0,0 +1,6 @@
[project]
name="photoshop"
description="AYON Phostoshop addon."
[ayon.runtimeDependencies]
wsrpc_aiohttp = "^3.1.1" # websocket server

View file

@ -1,3 +1,10 @@
name = "photoshop"
title = "Photoshop"
version = "0.1.3"
version = "0.2.0"
client_dir = "ayon_photoshop"
ayon_required_addons = {
"core": ">0.3.2",
}
ayon_compatible_addons = {}

View file

@ -0,0 +1,13 @@
from .version import __version__
from .addon import (
RESOLVE_ADDON_ROOT,
ResolveAddon,
)
__all__ = (
"__version__",
"RESOLVE_ADDON_ROOT",
"ResolveAddon",
)

View file

@ -2,18 +2,20 @@ import os
from ayon_core.addon import AYONAddon, IHostAddon
from .utils import RESOLVE_ROOT_DIR
from .version import __version__
from .utils import RESOLVE_ADDON_ROOT
class ResolveAddon(AYONAddon, IHostAddon):
name = "resolve"
version = __version__
host_name = "resolve"
def get_launch_hook_paths(self, app):
if app.host_name != self.host_name:
return []
return [
os.path.join(RESOLVE_ROOT_DIR, "hooks")
os.path.join(RESOLVE_ADDON_ROOT, "hooks")
]
def get_workfile_extensions(self):

View file

@ -57,7 +57,7 @@ class ResolveHost(HostBase, IWorkfileHost, ILoadHost):
"""
log.info("ayon_core.hosts.resolve installed")
log.info("ayon_resolve installed")
pyblish.register_host(self.name)
pyblish.register_plugin_path(PUBLISH_PATH)
@ -246,9 +246,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.resolve.api import (
set_publish_attribute
)
from ayon_resolve.api import set_publish_attribute
# Whether instances should be passthrough based on new value
timeline_item = instance.data["item"]

View file

@ -13,11 +13,11 @@ log = Logger.get_logger(__name__)
def get_resolve_module():
from ayon_core.hosts.resolve import api
from ayon_resolve import api
# dont run if already loaded
if api.bmdvr:
log.info(("resolve module is assigned to "
f"`ayon_core.hosts.resolve.api.bmdvr`: {api.bmdvr}"))
f"`ayon_resolve.api.bmdvr`: {api.bmdvr}"))
return api.bmdvr
try:
"""
@ -78,6 +78,6 @@ def get_resolve_module():
api.bmdvr = bmdvr
api.bmdvf = bmdvf
log.info(("Assigning resolve module to "
f"`ayon_core.hosts.resolve.api.bmdvr`: {api.bmdvr}"))
f"`ayon_resolve.api.bmdvr`: {api.bmdvr}"))
log.info(("Assigning resolve module to "
f"`ayon_core.hosts.resolve.api.bmdvf`: {api.bmdvf}"))
f"`ayon_resolve.api.bmdvf`: {api.bmdvf}"))

View file

@ -2,7 +2,7 @@ import os
from pathlib import Path
import platform
from ayon_applications import PreLaunchHook, LaunchTypes
from ayon_core.hosts.resolve.utils import setup
from ayon_resolve.utils import setup
class PreLaunchResolveSetup(PreLaunchHook):

View file

@ -1,7 +1,7 @@
import os
from ayon_applications import PreLaunchHook, LaunchTypes
import ayon_core.hosts.resolve
from ayon_resolve import RESOLVE_ADDON_ROOT
class PreLaunchResolveStartup(PreLaunchHook):
@ -15,8 +15,7 @@ class PreLaunchResolveStartup(PreLaunchHook):
def execute(self):
# Set the openpype prelaunch startup script path for easy access
# in the LUA .scriptlib code
op_resolve_root = os.path.dirname(ayon_core.hosts.resolve.__file__)
script_path = os.path.join(op_resolve_root, "startup.py")
script_path = os.path.join(RESOLVE_ADDON_ROOT, "startup.py")
key = "AYON_RESOLVE_STARTUP_SCRIPT"
self.launch_context.env[key] = script_path

View file

@ -1,6 +1,6 @@
# from pprint import pformat
from ayon_core.hosts.resolve.api import plugin, lib
from ayon_core.hosts.resolve.api.lib import (
from ayon_resolve.api import plugin, lib
from ayon_resolve.api.lib import (
get_video_track_names,
create_bin,
)

View file

@ -1,7 +1,7 @@
import ayon_api
from ayon_core.hosts.resolve.api import lib, plugin
from ayon_core.hosts.resolve.api.pipeline import (
from ayon_resolve.api import lib, plugin
from ayon_resolve.api.pipeline import (
containerise,
update_container,
)

View file

@ -5,7 +5,7 @@ from ayon_core.pipeline import (
get_representation_path,
)
from ayon_core.hosts.resolve.api import lib
from ayon_resolve.api import lib
class LoadEditorialPackage(load.LoaderPlugin):

View file

@ -2,7 +2,7 @@ import os
import pyblish.api
from ayon_core.pipeline import publish
from ayon_core.hosts.resolve.api.lib import get_project_manager
from ayon_resolve.api.lib import get_project_manager
class ExtractWorkfile(publish.Extractor):

View file

@ -3,7 +3,7 @@ from pprint import pformat
import pyblish
from ayon_core.pipeline import AYON_INSTANCE_ID, AVALON_INSTANCE_ID
from ayon_core.hosts.resolve.api.lib import (
from ayon_resolve.api.lib import (
get_current_timeline_items,
get_timeline_item_pype_tag,
publish_clip_color,

View file

@ -3,8 +3,8 @@ from pprint import pformat
from ayon_core.pipeline import get_current_folder_path
from ayon_core.hosts.resolve import api as rapi
from ayon_core.hosts.resolve.otio import davinci_export
from ayon_resolve import api as rapi
from ayon_resolve.otio import davinci_export
class PrecollectWorkfile(pyblish.api.ContextPlugin):

View file

@ -11,7 +11,7 @@ This code runs in a separate process to the main Resolve process.
"""
import os
from ayon_core.lib import Logger
import ayon_core.hosts.resolve.api
import ayon_resolve.api
log = Logger.get_logger(__name__)
@ -27,7 +27,7 @@ def ensure_installed_host():
if host:
return host
host = ayon_core.hosts.resolve.api.ResolveHost()
host = ayon_resolve.api.ResolveHost()
install_host(host)
return registered_host()
@ -35,7 +35,7 @@ def ensure_installed_host():
def launch_menu():
print("Launching Resolve AYON menu..")
ensure_installed_host()
ayon_core.hosts.resolve.api.launch_ayon_menu()
ayon_resolve.api.launch_ayon_menu()
def open_workfile(path):

View file

@ -8,7 +8,7 @@ log = Logger.get_logger(__name__)
def main(env):
from ayon_core.hosts.resolve.api import ResolveHost, launch_ayon_menu
from ayon_resolve.api import ResolveHost, launch_ayon_menu
# activate resolve from openpype
host = ResolveHost()

View file

@ -1,6 +1,6 @@
#!/usr/bin/env python
import os
from ayon_core.hosts.resolve.otio import davinci_export as otio_export
from ayon_resolve.otio import davinci_export as otio_export
resolve = bmd.scriptapp("Resolve") # noqa
fu = resolve.Fusion()

View file

@ -1,6 +1,6 @@
#!/usr/bin/env python
import os
from ayon_core.hosts.resolve.otio import davinci_import as otio_import
from ayon_resolve.otio import davinci_import as otio_import
resolve = bmd.scriptapp("Resolve") # noqa
fu = resolve.Fusion()

View file

@ -6,8 +6,8 @@ from ayon_core.pipeline import install_host
def main(env):
from ayon_core.hosts.resolve.utils import setup
import ayon_core.hosts.resolve.api as bmdvr
from ayon_resolve.utils import setup
import ayon_resolve.api as bmdvr
# Registers openpype's Global pyblish plugins
install_host(bmdvr)
setup(env)

View file

@ -2,7 +2,7 @@ import os
import shutil
from ayon_core.lib import Logger, is_running_from_build
RESOLVE_ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
RESOLVE_ADDON_ROOT = os.path.dirname(os.path.abspath(__file__))
def setup(env):
@ -12,7 +12,7 @@ def setup(env):
util_scripts_dir = env["RESOLVE_UTILITY_SCRIPTS_DIR"]
util_scripts_paths = [os.path.join(
RESOLVE_ROOT_DIR,
RESOLVE_ADDON_ROOT,
"utility_scripts"
)]

View file

@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
"""Package declaring AYON addon 'resolve' version."""
__version__ = "0.2.0"

Some files were not shown because too many files have changed in this diff Show more