Merge pull request #578 from ynput/enhancement/AY-4909_Move-AfterEffects-client-code
Chore: Move AfterEffects client code
|
|
@ -49,6 +49,7 @@ IGNORED_MODULES_IN_AYON = set()
|
|||
# When addon was moved from ayon-core codebase
|
||||
# - this is used to log the missing addon
|
||||
MOVED_ADDON_MILESTONE_VERSIONS = {
|
||||
"aftereffects": VersionInfo(0, 2, 0),
|
||||
"applications": VersionInfo(0, 2, 0),
|
||||
"blender": VersionInfo(0, 2, 0),
|
||||
"celaction": VersionInfo(0, 2, 0),
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
Adobe webserver
|
||||
---------------
|
||||
Aiohttp (Asyncio) based websocket server used for communication with host
|
||||
applications, currently only for Adobe (but could be used for any non python
|
||||
DCC which has websocket client).
|
||||
|
||||
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.
|
||||
|
||||
(Different from `ayon_core/modules/webserver` as that one is running in Tray,
|
||||
this one is running in spawn Python process.)
|
||||
|
|
@ -79,12 +79,12 @@ 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/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",
|
||||
"server_addon/hiero/client/ayon_hiero/api/startup/*"
|
||||
"server_addon/hiero/client/ayon_hiero/api/startup/*",
|
||||
"server_addon/aftereffects/client/ayon_aftereffects/api/extension/js/libs/*"
|
||||
]
|
||||
|
||||
[tool.ruff.lint.per-file-ignores]
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
from .version import __version__
|
||||
from .addon import (
|
||||
AFTEREFFECTS_ADDON_ROOT,
|
||||
AfterEffectsAddon,
|
||||
|
|
@ -6,6 +7,8 @@ from .addon import (
|
|||
|
||||
|
||||
__all__ = (
|
||||
"__version__",
|
||||
|
||||
"AFTEREFFECTS_ADDON_ROOT",
|
||||
"AfterEffectsAddon",
|
||||
"get_launch_script_path",
|
||||
|
|
@ -2,11 +2,14 @@ import os
|
|||
|
||||
from ayon_core.addon import AYONAddon, IHostAddon
|
||||
|
||||
from .version import __version__
|
||||
|
||||
AFTEREFFECTS_ADDON_ROOT = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
|
||||
class AfterEffectsAddon(AYONAddon, IHostAddon):
|
||||
name = "aftereffects"
|
||||
version = __version__
|
||||
host_name = "aftereffects"
|
||||
|
||||
def add_implementation_envs(self, env, _app):
|
||||
|
|
@ -25,7 +25,7 @@ download [Anastasiy’s Extension Manager](https://install.anastasiy.com/)
|
|||
The easiest way to get the server and After Effects launch is with:
|
||||
|
||||
```
|
||||
python -c ^"import ayon_core.hosts.photoshop;ayon_core.hosts.aftereffects.launch(""c:\Program Files\Adobe\Adobe After Effects 2020\Support Files\AfterFX.exe"")^"
|
||||
python -c ^"import ayon_core.hosts.photoshop;ayon_aftereffects.launch(""c:\Program Files\Adobe\Adobe After Effects 2020\Support Files\AfterFX.exe"")^"
|
||||
```
|
||||
|
||||
`avalon.aftereffects.launch` launches the application and server, and also closes the server when After Effects exists.
|
||||
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
|
@ -18,8 +18,8 @@ from ayon_core.lib import Logger, is_in_tests
|
|||
from ayon_core.pipeline import install_host
|
||||
from ayon_core.addon import AddonsManager
|
||||
from ayon_core.tools.utils import host_tools, get_ayon_qt_app
|
||||
from ayon_core.tools.adobe_webserver.app import WebServerTool
|
||||
|
||||
from .webserver import WebServerTool
|
||||
from .ws_stub import get_stub
|
||||
from .lib import set_settings
|
||||
|
||||
|
|
@ -35,7 +35,7 @@ def main(*subprocess_args):
|
|||
"""Main entrypoint to AE launching, called from pre hook."""
|
||||
sys.excepthook = safe_excepthook
|
||||
|
||||
from ayon_core.hosts.aftereffects.api import AfterEffectsHost
|
||||
from ayon_aftereffects.api import AfterEffectsHost
|
||||
|
||||
host = AfterEffectsHost()
|
||||
install_host(host)
|
||||
|
|
@ -355,7 +355,7 @@ class AfterEffectsRoute(WebSocketRoute):
|
|||
return "nothing"
|
||||
|
||||
def create_placeholder_route(self):
|
||||
from ayon_core.hosts.aftereffects.api.workfile_template_builder import \
|
||||
from ayon_aftereffects.api.workfile_template_builder import \
|
||||
create_placeholder
|
||||
partial_method = functools.partial(create_placeholder)
|
||||
|
||||
|
|
@ -365,7 +365,7 @@ class AfterEffectsRoute(WebSocketRoute):
|
|||
return "nothing"
|
||||
|
||||
def update_placeholder_route(self):
|
||||
from ayon_core.hosts.aftereffects.api.workfile_template_builder import \
|
||||
from ayon_aftereffects.api.workfile_template_builder import \
|
||||
update_placeholder
|
||||
partial_method = functools.partial(update_placeholder)
|
||||
|
||||
|
|
@ -375,7 +375,7 @@ class AfterEffectsRoute(WebSocketRoute):
|
|||
return "nothing"
|
||||
|
||||
def build_workfile_template_route(self):
|
||||
from ayon_core.hosts.aftereffects.api.workfile_template_builder import \
|
||||
from ayon_aftereffects.api.workfile_template_builder import \
|
||||
build_workfile_template
|
||||
partial_method = functools.partial(build_workfile_template)
|
||||
|
||||
|
|
@ -8,7 +8,7 @@ workfile or others.
|
|||
import os
|
||||
import sys
|
||||
|
||||
from ayon_core.hosts.aftereffects.api.launch_logic import main as host_main
|
||||
from ayon_aftereffects.api.launch_logic import main as host_main
|
||||
|
||||
# Get current file to locate start point of sys.argv
|
||||
CURRENT_FILE = os.path.abspath(__file__)
|
||||
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
|
@ -14,8 +14,6 @@ from ayon_core.pipeline import (
|
|||
AYON_INSTANCE_ID,
|
||||
)
|
||||
from ayon_core.pipeline.load import any_outdated_containers
|
||||
import ayon_core.hosts.aftereffects
|
||||
|
||||
from ayon_core.host import (
|
||||
HostBase,
|
||||
IWorkfileHost,
|
||||
|
|
@ -23,6 +21,7 @@ from ayon_core.host import (
|
|||
IPublishHost
|
||||
)
|
||||
from ayon_core.tools.utils import get_ayon_qt_app
|
||||
from ayon_aftereffects import AFTEREFFECTS_ADDON_ROOT
|
||||
|
||||
from .launch_logic import get_stub
|
||||
from .ws_stub import ConnectionNotEstablishedYet
|
||||
|
|
@ -30,10 +29,7 @@ from .ws_stub import ConnectionNotEstablishedYet
|
|||
log = Logger.get_logger(__name__)
|
||||
|
||||
|
||||
HOST_DIR = os.path.dirname(
|
||||
os.path.abspath(ayon_core.hosts.aftereffects.__file__)
|
||||
)
|
||||
PLUGINS_DIR = os.path.join(HOST_DIR, "plugins")
|
||||
PLUGINS_DIR = os.path.join(AFTEREFFECTS_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")
|
||||
|
|
@ -1,7 +1,11 @@
|
|||
"""This Webserver tool is python 3 specific.
|
||||
"""Webserver for communication with AfterEffects.
|
||||
|
||||
Don't import directly to avalon.tools or implementation of Python 2 hosts
|
||||
would break.
|
||||
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
|
||||
|
|
@ -12,9 +16,7 @@ import socket
|
|||
|
||||
from aiohttp import web
|
||||
|
||||
from wsrpc_aiohttp import (
|
||||
WSRPCClient
|
||||
)
|
||||
from wsrpc_aiohttp import WSRPCClient
|
||||
|
||||
from ayon_core.pipeline import get_global_context
|
||||
|
||||
|
|
@ -12,7 +12,7 @@ from ayon_core.pipeline.workfile.workfile_template_builder import (
|
|||
PlaceholderPlugin,
|
||||
PlaceholderItem
|
||||
)
|
||||
from ayon_core.hosts.aftereffects.api import get_stub
|
||||
from ayon_aftereffects.api import get_stub
|
||||
|
||||
PLACEHOLDER_SET = "PLACEHOLDERS_SET"
|
||||
PLACEHOLDER_ID = "openpype.placeholder"
|
||||
|
|
@ -8,7 +8,8 @@ import logging
|
|||
import attr
|
||||
|
||||
from wsrpc_aiohttp import WebSocketAsync
|
||||
from ayon_core.tools.adobe_webserver.app import WebServerTool
|
||||
|
||||
from .webserver import WebServerTool
|
||||
|
||||
|
||||
class ConnectionNotEstablishedYet(Exception):
|
||||
|
|
@ -7,7 +7,7 @@ from ayon_core.lib import (
|
|||
is_using_ayon_console,
|
||||
)
|
||||
from ayon_applications import PreLaunchHook, LaunchTypes
|
||||
from ayon_core.hosts.aftereffects import get_launch_script_path
|
||||
from ayon_aftereffects import get_launch_script_path
|
||||
|
||||
|
||||
def get_launch_kwargs(kwargs):
|
||||
|
|
@ -2,16 +2,16 @@ import re
|
|||
|
||||
from ayon_core import resources
|
||||
from ayon_core.lib import BoolDef, UISeparatorDef
|
||||
from ayon_core.hosts.aftereffects import api
|
||||
from ayon_core.pipeline import (
|
||||
Creator,
|
||||
CreatedInstance,
|
||||
CreatorError
|
||||
)
|
||||
from ayon_core.hosts.aftereffects.api.pipeline import cache_and_get_instances
|
||||
from ayon_core.hosts.aftereffects.api.lib import set_settings
|
||||
from ayon_core.lib import prepare_template_data
|
||||
from ayon_core.pipeline.create import PRODUCT_NAME_ALLOWED_SYMBOLS
|
||||
from ayon_aftereffects import api
|
||||
from ayon_aftereffects.api.pipeline import cache_and_get_instances
|
||||
from ayon_aftereffects.api.lib import set_settings
|
||||
|
||||
|
||||
class RenderCreator(Creator):
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
import ayon_api
|
||||
|
||||
import ayon_core.hosts.aftereffects.api as api
|
||||
from ayon_core.pipeline import (
|
||||
AutoCreator,
|
||||
CreatedInstance
|
||||
)
|
||||
from ayon_core.hosts.aftereffects.api.pipeline import cache_and_get_instances
|
||||
from ayon_aftereffects import api
|
||||
from ayon_aftereffects.api.pipeline import cache_and_get_instances
|
||||
|
||||
|
||||
class AEWorkfileCreator(AutoCreator):
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
import re
|
||||
|
||||
from ayon_core.pipeline import get_representation_path
|
||||
from ayon_core.hosts.aftereffects import api
|
||||
|
||||
from ayon_core.hosts.aftereffects.api.lib import (
|
||||
from ayon_aftereffects import api
|
||||
from ayon_aftereffects.api.lib import (
|
||||
get_background_layers,
|
||||
get_unique_layer_name,
|
||||
)
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
import re
|
||||
|
||||
from ayon_core.pipeline import get_representation_path
|
||||
from ayon_core.hosts.aftereffects import api
|
||||
from ayon_core.hosts.aftereffects.api.lib import get_unique_layer_name
|
||||
from ayon_aftereffects import api
|
||||
from ayon_aftereffects.api.lib import get_unique_layer_name
|
||||
|
||||
|
||||
class FileLoader(api.AfterEffectsLoader):
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
import pyblish.api
|
||||
|
||||
from ayon_core.hosts.aftereffects.api import get_stub
|
||||
from ayon_aftereffects.api import get_stub
|
||||
|
||||
|
||||
class AddPublishHighlight(pyblish.api.InstancePlugin):
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
"""Close AE after publish. For Webpublishing only."""
|
||||
import pyblish.api
|
||||
|
||||
from ayon_core.hosts.aftereffects.api import get_stub
|
||||
from ayon_aftereffects.api import get_stub
|
||||
|
||||
|
||||
class CloseAE(pyblish.api.ContextPlugin):
|
||||
|
|
@ -2,7 +2,7 @@ import os
|
|||
|
||||
import pyblish.api
|
||||
|
||||
from ayon_core.hosts.aftereffects.api import get_stub
|
||||
from ayon_aftereffects.api import get_stub
|
||||
|
||||
|
||||
class CollectAudio(pyblish.api.ContextPlugin):
|
||||
|
|
@ -2,7 +2,7 @@ import os
|
|||
|
||||
import pyblish.api
|
||||
|
||||
from ayon_core.hosts.aftereffects.api import get_stub
|
||||
from ayon_aftereffects.api import get_stub
|
||||
|
||||
|
||||
class CollectCurrentFile(pyblish.api.ContextPlugin):
|
||||
|
|
@ -2,7 +2,7 @@ import os
|
|||
import re
|
||||
import pyblish.api
|
||||
|
||||
from ayon_core.hosts.aftereffects.api import (
|
||||
from ayon_aftereffects.api import (
|
||||
get_stub,
|
||||
get_extension_manifest_path
|
||||
)
|
||||
|
|
@ -6,8 +6,8 @@ import pyblish.api
|
|||
|
||||
from ayon_core.pipeline import publish
|
||||
from ayon_core.pipeline.publish import RenderInstance
|
||||
from ayon_core.hosts.aftereffects.api import get_stub
|
||||
|
||||
from ayon_aftereffects.api import get_stub
|
||||
|
||||
@attr.s
|
||||
class AERenderInstance(RenderInstance):
|
||||
|
|
@ -14,6 +14,7 @@ class CollectReview(pyblish.api.ContextPlugin):
|
|||
label = "Collect Review"
|
||||
hosts = ["aftereffects"]
|
||||
order = pyblish.api.CollectorOrder + 0.1
|
||||
settings_category = "aftereffects"
|
||||
|
||||
def process(self, context):
|
||||
for instance in context:
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
import os
|
||||
|
||||
from ayon_core.pipeline import publish
|
||||
from ayon_core.hosts.aftereffects.api import get_stub
|
||||
|
||||
from ayon_aftereffects.api import get_stub
|
||||
|
||||
class ExtractLocalRender(publish.Extractor):
|
||||
"""Render RenderQueue locally."""
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
import pyblish.api
|
||||
|
||||
from ayon_core.pipeline import publish
|
||||
from ayon_core.hosts.aftereffects.api import get_stub
|
||||
from ayon_aftereffects.api import get_stub
|
||||
|
||||
|
||||
class ExtractSaveScene(pyblish.api.ContextPlugin):
|
||||
|
|
@ -2,7 +2,7 @@ import pyblish.api
|
|||
from ayon_core.lib import version_up
|
||||
from ayon_core.pipeline.publish import get_errored_plugins_from_context
|
||||
|
||||
from ayon_core.hosts.aftereffects.api import get_stub
|
||||
from ayon_aftereffects.api import get_stub
|
||||
|
||||
|
||||
class IncrementWorkfile(pyblish.api.InstancePlugin):
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
from ayon_core.pipeline import publish
|
||||
from ayon_core.hosts.aftereffects.api import get_stub
|
||||
from ayon_aftereffects.api import get_stub
|
||||
|
||||
|
||||
class RemovePublishHighlight(publish.Extractor):
|
||||
|
|
@ -9,7 +9,7 @@ import pyblish.api
|
|||
from ayon_core.pipeline import (
|
||||
PublishXmlValidationError
|
||||
)
|
||||
from ayon_core.hosts.aftereffects.api import get_stub
|
||||
from ayon_aftereffects.api import get_stub
|
||||
|
||||
|
||||
class ValidateFootageItems(pyblish.api.InstancePlugin):
|
||||
|
|
@ -5,7 +5,7 @@ from ayon_core.pipeline.publish import (
|
|||
ValidateContentsOrder,
|
||||
PublishXmlValidationError,
|
||||
)
|
||||
from ayon_core.hosts.aftereffects.api import get_stub
|
||||
from ayon_aftereffects.api import get_stub
|
||||
|
||||
|
||||
class ValidateInstanceFolderRepair(pyblish.api.Action):
|
||||
|
|
@ -13,7 +13,7 @@ from ayon_core.pipeline import (
|
|||
PublishXmlValidationError,
|
||||
OptionalPyblishPluginMixin
|
||||
)
|
||||
from ayon_core.hosts.aftereffects.api import get_folder_settings
|
||||
from ayon_aftereffects.api import get_folder_settings
|
||||
|
||||
|
||||
class ValidateSceneSettings(OptionalPyblishPluginMixin,
|
||||
|
|
@ -60,6 +60,7 @@ class ValidateSceneSettings(OptionalPyblishPluginMixin,
|
|||
label = "Validate Scene Settings"
|
||||
families = ["render.farm", "render.local", "render"]
|
||||
hosts = ["aftereffects"]
|
||||
settings_category = "aftereffects"
|
||||
optional = True
|
||||
|
||||
skip_timelines_check = [".*"] # * >> skip for all
|
||||
|
|
@ -2,9 +2,11 @@ from ayon_core.pipeline.workfile.workfile_template_builder import (
|
|||
CreatePlaceholderItem,
|
||||
PlaceholderCreateMixin
|
||||
)
|
||||
from ayon_core.hosts.aftereffects.api import get_stub
|
||||
from ayon_core.hosts.aftereffects.api.lib import set_settings
|
||||
import ayon_core.hosts.aftereffects.api.workfile_template_builder as wtb
|
||||
from ayon_aftereffects.api import (
|
||||
get_stub,
|
||||
workfile_template_builder as wtb,
|
||||
)
|
||||
from ayon_aftereffects.api.lib import set_settings
|
||||
|
||||
|
||||
class AEPlaceholderCreatePlugin(wtb.AEPlaceholderPlugin,
|
||||
|
|
@ -2,8 +2,10 @@ from ayon_core.pipeline.workfile.workfile_template_builder import (
|
|||
LoadPlaceholderItem,
|
||||
PlaceholderLoadMixin
|
||||
)
|
||||
from ayon_core.hosts.aftereffects.api import get_stub
|
||||
import ayon_core.hosts.aftereffects.api.workfile_template_builder as wtb
|
||||
from ayon_aftereffects.api import (
|
||||
get_stub,
|
||||
workfile_template_builder as wtb,
|
||||
)
|
||||
|
||||
|
||||
class AEPlaceholderLoadPlugin(wtb.AEPlaceholderPlugin, PlaceholderLoadMixin):
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""Package declaring AYON addon 'aftereffects' version."""
|
||||
__version__ = "0.2.0"
|
||||
6
server_addon/aftereffects/client/pyproject.toml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
[project]
|
||||
name="aftereffects"
|
||||
description="AYON AfterEffects addon."
|
||||
|
||||
[ayon.runtimeDependencies]
|
||||
wsrpc_aiohttp = "^3.1.1" # websocket server
|
||||
|
|
@ -1,3 +1,10 @@
|
|||
name = "aftereffects"
|
||||
title = "AfterEffects"
|
||||
version = "0.1.4"
|
||||
version = "0.2.0"
|
||||
|
||||
client_dir = "ayon_aftereffects"
|
||||
|
||||
ayon_required_addons = {
|
||||
"core": ">0.3.2",
|
||||
}
|
||||
ayon_compatible_addons = {}
|
||||
|
|
|
|||