feat(premiere): update static page

This commit is contained in:
Jakub Jezek 2020-04-02 15:03:40 +02:00
parent 124e61a847
commit a0ab0fea88
No known key found for this signature in database
GPG key ID: C4B96E101D2A47F3
18 changed files with 7215 additions and 436 deletions

View file

@ -21,12 +21,13 @@ class PremierePrelaunch(PypeHook):
self.signature = "( {} )".format(self.__class__.__name__)
def execute(self, *args, env: dict = None) -> bool:
from pype.services.rest_api.base_class import register_statics
if not env:
env = os.environ
EXTENSIONS_CACHE_PATH = env.get("EXTENSIONS_CACHE_PATH", None)
self.log.debug(
"_ EXTENSIONS_CACHE_PATH: `{}`".format(EXTENSIONS_CACHE_PATH))
PYPE_MODULE_ROOT = env.get("PYPE_MODULE_ROOT", None)
asset = env["AVALON_ASSET"]
task = env["AVALON_TASK"]
workdir = env["AVALON_WORKDIR"]
@ -46,7 +47,17 @@ class PremierePrelaunch(PypeHook):
print("pyblish: Could not load integration: %s " % e)
else:
# Setup integration
# start rest api static server
static_site_dir_path = os.path.join(
PYPE_MODULE_ROOT,
"pype",
"premiere",
"static_ppro").replace("\\", "/")
self.log.debug(
"_ static_site_dir_path: `{}`".format(static_site_dir_path))
register_statics("/ppro", static_site_dir_path)
# Premiere Setup integration
from pype.premiere import lib as prlib
importlib.reload(prlib)
prlib.setup(env)