change celaction structure

This commit is contained in:
Milan Kolar 2021-01-28 16:44:17 +01:00
parent bf3f0eac30
commit b83ddf3780
6 changed files with 14 additions and 12 deletions

View file

@ -1 +0,0 @@
kwargs = None

View file

@ -0,0 +1 @@
kwargs = None

View file

@ -11,18 +11,19 @@ import pyblish.util
from pype.api import Logger
import pype
from pype.hosts import celaction
import pype.hosts.celaction
from pype.hosts.celaction import api as celaction
log = Logger().get_logger("Celaction_cli_publisher")
publish_host = "celaction"
PUBLISH_PATH = os.path.join(pype.PLUGINS_DIR, publish_host, "publish")
PUBLISH_PATHS = [
PUBLISH_PATH,
os.path.join(pype.PLUGINS_DIR, "ftrack", "publish")
]
HOST_DIR = os.path.dirname(os.path.abspath(pype.hosts.celaction.__file__))
PLUGINS_DIR = os.path.join(HOST_DIR, "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")
INVENTORY_PATH = os.path.join(PLUGINS_DIR, "inventory")
def cli():

View file

View file

@ -2,7 +2,7 @@ import os
import shutil
import winreg
from pype.lib import PreLaunchHook
from pype.hosts import celaction
from pype.hosts.celaction import api as celaction
class CelactionPrelaunchHook(PreLaunchHook):
@ -37,7 +37,7 @@ class CelactionPrelaunchHook(PreLaunchHook):
"Software\\CelAction\\CelAction2D\\User Settings", 0,
winreg.KEY_ALL_ACCESS)
# TODO: change to root path and pyblish standalone to premiere way
# TODO: change to pype executable
pype_root_path = os.getenv("PYPE_SETUP_PATH")
path = os.path.join(pype_root_path, "pype.bat")
@ -94,11 +94,12 @@ class CelactionPrelaunchHook(PreLaunchHook):
if not os.path.exists(workfile_path):
# TODO add ability to set different template workfile path via
# settings
pype_celaction_dir = os.path.dirname(
pype_celaction_dir = os.path.dirname(os.path.dirname(
os.path.abspath(celaction.__file__)
)
))
template_path = os.path.join(
pype_celaction_dir,
"resources",
"celaction_template_scene.scn"
)