Merge pull request #549 from ynput/feature/AY-4921_Move-TrayPublisher-client-code

TrayPublisher: Move client code
This commit is contained in:
Jakub Trllo 2024-05-24 17:16:31 +02:00 committed by GitHub
commit c7723bb4ea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
48 changed files with 27 additions and 21 deletions

View file

@ -52,6 +52,7 @@ IGNORED_MODULES_IN_AYON = set()
MOVED_ADDON_MILESTONE_VERSIONS = { MOVED_ADDON_MILESTONE_VERSIONS = {
"applications": VersionInfo(0, 2, 0), "applications": VersionInfo(0, 2, 0),
"clockify": VersionInfo(0, 2, 0), "clockify": VersionInfo(0, 2, 0),
"traypublisher": VersionInfo(0, 2, 0),
"tvpaint": VersionInfo(0, 2, 0), "tvpaint": VersionInfo(0, 2, 0),
} }

View file

@ -29,8 +29,8 @@ class TrayPublishAddon(AYONAddon, IHostAddon, ITrayAction):
def on_action_trigger(self): def on_action_trigger(self):
self.run_traypublisher() self.run_traypublisher()
def connect_with_addons(self, enabled_modules): def connect_with_addons(self, enabled_addons):
"""Collect publish paths from other modules.""" """Collect publish paths from other addons."""
publish_paths = self.manager.collect_plugin_paths()["publish"] publish_paths = self.manager.collect_plugin_paths()["publish"]
self.publish_paths.extend(publish_paths) self.publish_paths.extend(publish_paths)
@ -55,9 +55,9 @@ def cli_main():
def launch(): def launch():
"""Launch TrayPublish tool UI.""" """Launch TrayPublish tool UI."""
from ayon_core.tools import traypublisher from ayon_traypublisher import ui
traypublisher.main() ui.main()
@cli_main.command() @cli_main.command()

View file

@ -22,7 +22,7 @@ from .pipeline import (
) )
REVIEW_EXTENSIONS = set(IMAGE_EXTENSIONS) | set(VIDEO_EXTENSIONS) REVIEW_EXTENSIONS = set(IMAGE_EXTENSIONS) | set(VIDEO_EXTENSIONS)
SHARED_DATA_KEY = "openpype.traypublisher.instances" SHARED_DATA_KEY = "ayon.traypublisher.instances"
class HiddenTrayPublishCreator(HiddenCreator): class HiddenTrayPublishCreator(HiddenCreator):

View file

@ -6,7 +6,7 @@ from ayon_core.lib.attribute_definitions import FileDefItem
from ayon_core.pipeline import install_host from ayon_core.pipeline import install_host
from ayon_core.pipeline.create import CreateContext from ayon_core.pipeline.create import CreateContext
from ayon_core.hosts.traypublisher.api import TrayPublisherHost from ayon_traypublisher.api import TrayPublisherHost
def csvpublish( def csvpublish(

View file

@ -15,13 +15,13 @@ from ayon_core.pipeline import (
CreatorError CreatorError
) )
from ayon_core.pipeline import colorspace from ayon_core.pipeline import colorspace
from ayon_core.hosts.traypublisher.api.plugin import TrayPublishCreator from ayon_traypublisher.api.plugin import TrayPublishCreator
class CreateColorspaceLook(TrayPublishCreator): class CreateColorspaceLook(TrayPublishCreator):
"""Creates colorspace look files.""" """Creates colorspace look files."""
identifier = "io.openpype.creators.traypublisher.colorspace_look" identifier = "io.ayon.creators.traypublisher.colorspace_look"
label = "Colorspace Look" label = "Colorspace Look"
product_type = "ociolook" product_type = "ociolook"
description = "Publishes color space look file." description = "Publishes color space look file."

View file

@ -13,9 +13,7 @@ from ayon_core.lib.transcoding import (
VIDEO_EXTENSIONS, IMAGE_EXTENSIONS VIDEO_EXTENSIONS, IMAGE_EXTENSIONS
) )
from ayon_core.pipeline.create import CreatorError from ayon_core.pipeline.create import CreatorError
from ayon_core.hosts.traypublisher.api.plugin import ( from ayon_traypublisher.api.plugin import TrayPublishCreator
TrayPublishCreator
)
class IngestCSV(TrayPublishCreator): class IngestCSV(TrayPublishCreator):

View file

@ -4,11 +4,11 @@ from copy import deepcopy
import ayon_api import ayon_api
import opentimelineio as otio import opentimelineio as otio
from ayon_core.hosts.traypublisher.api.plugin import ( from ayon_traypublisher.api.plugin import (
TrayPublishCreator, TrayPublishCreator,
HiddenTrayPublishCreator HiddenTrayPublishCreator
) )
from ayon_core.hosts.traypublisher.api.editorial import ( from ayon_traypublisher.api.editorial import (
ShotMetadataSolver ShotMetadataSolver
) )
from ayon_core.pipeline import CreatedInstance from ayon_core.pipeline import CreatedInstance

View file

@ -9,7 +9,7 @@ from ayon_core.lib.attribute_definitions import (
BoolDef, BoolDef,
TextDef, TextDef,
) )
from ayon_core.hosts.traypublisher.api.plugin import TrayPublishCreator from ayon_traypublisher.api.plugin import TrayPublishCreator
class EditorialPackageCreator(TrayPublishCreator): class EditorialPackageCreator(TrayPublishCreator):

View file

@ -6,7 +6,7 @@ log = Logger.get_logger(__name__)
def initialize(): def initialize():
from ayon_core.hosts.traypublisher.api.plugin import SettingsCreator from ayon_traypublisher.api.plugin import SettingsCreator
project_name = os.environ["AYON_PROJECT_NAME"] project_name = os.environ["AYON_PROJECT_NAME"]
project_settings = get_project_settings(project_name) project_settings = get_project_settings(project_name)

View file

@ -17,8 +17,8 @@ from ayon_core.pipeline.create import (
TaskNotSetError, TaskNotSetError,
) )
from ayon_core.hosts.traypublisher.api.plugin import TrayPublishCreator from ayon_traypublisher.api.plugin import TrayPublishCreator
from ayon_core.hosts.traypublisher.batch_parsing import ( from ayon_traypublisher.batch_parsing import (
get_folder_entity_from_filename get_folder_entity_from_filename
) )

View file

@ -14,13 +14,13 @@ from ayon_core.pipeline import (
CreatedInstance, CreatedInstance,
CreatorError CreatorError
) )
from ayon_core.hosts.traypublisher.api.plugin import TrayPublishCreator from ayon_traypublisher.api.plugin import TrayPublishCreator
class OnlineCreator(TrayPublishCreator): class OnlineCreator(TrayPublishCreator):
"""Creates instance from file and retains its original name.""" """Creates instance from file and retains its original name."""
identifier = "io.openpype.creators.traypublisher.online" identifier = "io.ayon.creators.traypublisher.online"
label = "Online" label = "Online"
product_type = "online" product_type = "online"
description = "Publish file retaining its original file name" description = "Publish file retaining its original file name"

View file

@ -13,7 +13,6 @@ import qtawesome
from ayon_core.lib import AYONSettingsRegistry, is_running_from_build from ayon_core.lib import AYONSettingsRegistry, is_running_from_build
from ayon_core.pipeline import install_host from ayon_core.pipeline import install_host
from ayon_core.hosts.traypublisher.api import TrayPublisherHost
from ayon_core.tools.publisher.control_qt import QtPublisherController from ayon_core.tools.publisher.control_qt import QtPublisherController
from ayon_core.tools.publisher.window import PublisherWindow from ayon_core.tools.publisher.window import PublisherWindow
from ayon_core.tools.common_models import ProjectsModel from ayon_core.tools.common_models import ProjectsModel
@ -24,6 +23,7 @@ from ayon_core.tools.utils import (
ProjectSortFilterProxy, ProjectSortFilterProxy,
PROJECT_NAME_ROLE, PROJECT_NAME_ROLE,
) )
from ayon_traypublisher.api import TrayPublisherHost
class TrayPublisherRegistry(AYONSettingsRegistry): class TrayPublisherRegistry(AYONSettingsRegistry):

View file

@ -1,3 +1,10 @@
name = "traypublisher" name = "traypublisher"
title = "TrayPublisher" title = "TrayPublisher"
version = "0.1.5" version = "0.2.0"
client_dir = "ayon_traypublisher"
ayon_required_addons = {
"core": ">0.3.2",
}
ayon_compatible_addons = {}