mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
standalone publish plugins are registered based on imported modules
This commit is contained in:
parent
f4d77493d6
commit
caf78dee15
2 changed files with 21 additions and 7 deletions
|
|
@ -15,13 +15,6 @@ from pypeapp import execute
|
|||
import pyblish.api
|
||||
|
||||
|
||||
# Registers Global pyblish plugins
|
||||
pype.install()
|
||||
# Registers Standalone pyblish plugins
|
||||
PUBLISH_PATH = os.path.sep.join(
|
||||
[pype.PLUGINS_DIR, 'standalonepublisher', 'publish']
|
||||
)
|
||||
pyblish.api.register_plugin_path(PUBLISH_PATH)
|
||||
|
||||
|
||||
def set_context(project, asset, task, app):
|
||||
|
|
|
|||
|
|
@ -1,11 +1,19 @@
|
|||
import os
|
||||
from .app import show
|
||||
from .widgets import QtWidgets
|
||||
import pype
|
||||
import pyblish.api
|
||||
|
||||
|
||||
class StandAlonePublishModule:
|
||||
PUBLISH_PATHS = []
|
||||
|
||||
def __init__(self, main_parent=None, parent=None):
|
||||
self.main_parent = main_parent
|
||||
self.parent_widget = parent
|
||||
self.PUBLISH_PATHS.append(os.path.sep.join(
|
||||
[pype.PLUGINS_DIR, "standalonepublisher", "publish"]
|
||||
))
|
||||
|
||||
def tray_menu(self, parent_menu):
|
||||
self.run_action = QtWidgets.QAction(
|
||||
|
|
@ -14,5 +22,18 @@ class StandAlonePublishModule:
|
|||
self.run_action.triggered.connect(self.show)
|
||||
parent_menu.addAction(self.run_action)
|
||||
|
||||
def process_modules(self, modules):
|
||||
if "FtrackModule" in modules:
|
||||
self.PUBLISH_PATHS.append(os.path.sep.join(
|
||||
[pype.PLUGINS_DIR, "ftrack", "publish"]
|
||||
))
|
||||
|
||||
def tray_start(self):
|
||||
# Registers Global pyblish plugins
|
||||
pype.install()
|
||||
# Registers Standalone pyblish plugins
|
||||
for path in self.PUBLISH_PATHS:
|
||||
pyblish.api.register_plugin_path(path)
|
||||
|
||||
def show(self):
|
||||
show(self.main_parent, False)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue