Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
clean(ppro): hound recommendations
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakub Jezek committed Apr 28, 2020
1 parent ec5da94 commit 492c42d
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 13 deletions.
3 changes: 2 additions & 1 deletion pype/avalon_apps/rest_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ def get_assets(self, request):
_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
Expand Down
3 changes: 0 additions & 3 deletions pype/hooks/premiere/prelaunch.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
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


Expand Down
3 changes: 2 additions & 1 deletion pype/plugins/adobecommunicator/publish/collect_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
10 changes: 6 additions & 4 deletions pype/plugins/global/publish/integrate_new.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ def get_subset(self, asset, instance):
"name": subset_name,
"data": {
"families": instance.data.get('families')
},
},
"parent": asset["_id"]
}).inserted_id

Expand Down Expand Up @@ -664,15 +664,17 @@ def create_version_data(self, context, instance):
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("\\", "/")

Expand Down
2 changes: 1 addition & 1 deletion pype/plugins/premiere/publish/collect_resolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def process(self, instance):
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
Expand Down
4 changes: 1 addition & 3 deletions pype/premiere/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@
reload_pipeline,
ls,
LOAD_PATH,
INVENTORY_PATH,
CREATE_PATH,
PUBLISH_PATH,
PLUGINS_DIR
PUBLISH_PATH
)

__all__ = [
Expand Down

0 comments on commit 492c42d

Please sign in to comment.