clean(ppro): hound recommendations

This commit is contained in:
Jakub Jezek 2020-04-28 16:09:09 +02:00
parent ec5da9468b
commit 492c42d13f
No known key found for this signature in database
GPG key ID: C4B96E101D2A47F3
6 changed files with 12 additions and 13 deletions

View file

@ -70,7 +70,8 @@ class AvalonRestApi(RestApi):
_asset, identificator, _project_name
))
@RestApi.route("/publish/<asset_name>", url_prefix="/premiere", methods="GET")
@RestApi.route("/publish/<asset_name>",
url_prefix="/premiere", methods="GET")
def publish(self, request):
"""
http://localhost:8021/premiere/publish/shot021?json_in=this/path/file_in.json&json_out=this/path/file_out.json

View file

@ -2,9 +2,6 @@ import os
import traceback
from pype.lib import PypeHook
from pypeapp import Logger
import importlib
import avalon.api
import pype.premiere
from pype.premiere import lib as prlib

View file

@ -24,7 +24,8 @@ class CollectContextDataFromAport(pyblish.api.ContextPlugin):
order = pyblish.api.CollectorOrder - 0.49
def process(self, context):
self.log.info("registred_hosts: `{}`".format(pyblish.api.registered_hosts()))
self.log.info(
"registred_hosts: `{}`".format(pyblish.api.registered_hosts()))
io.install()
# get json paths from data
input_json_path = os.environ.get("AC_PUBLISH_INPATH")

View file

@ -610,7 +610,7 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin):
"name": subset_name,
"data": {
"families": instance.data.get('families')
},
},
"parent": asset["_id"]
}).inserted_id
@ -664,15 +664,17 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin):
families += current_families
self.log.debug("Registered root: {}".format(api.registered_root()))
self.log.debug("PYPE_STUDIO_PROJECTS_MOUNT: {}".format(os.getenv("PYPE_STUDIO_PROJECTS_MOUNT")))
# create relative source path for DB
try:
source = instance.data['source']
except KeyError:
source = context.data["currentFile"]
self.log.debug("source: {}".format(source))
source = str(source).replace(os.getenv("PYPE_STUDIO_PROJECTS_MOUNT"),
api.registered_root())
source = str(source).replace(
os.getenv("PYPE_STUDIO_PROJECTS_MOUNT"),
api.registered_root()
)
relative_path = os.path.relpath(source, api.registered_root())
source = os.path.join("{root}", relative_path).replace("\\", "/")

View file

@ -22,7 +22,7 @@ class CollectResolution(pyblish.api.InstancePlugin):
pixel_aspect = float(metadata['ppro.format.pixelaspect'])
res_width = metadata['ppro.format.width']
res_height = metadata['ppro.format.height']
instance.data['pixelAspect'] = pixel_aspect
instance.data['resolutionWidth'] = res_width
instance.data['resolutionHeight'] = res_height

View file

@ -9,10 +9,8 @@ from .lib import (
reload_pipeline,
ls,
LOAD_PATH,
INVENTORY_PATH,
CREATE_PATH,
PUBLISH_PATH,
PLUGINS_DIR
PUBLISH_PATH
)
__all__ = [