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

Commit

Permalink
Merge branch 'hotfix/celaction-publish-metadata-json'
Browse files Browse the repository at this point in the history
  • Loading branch information
mkolar committed Jul 28, 2020
2 parents 5c3e809 + 7df271a commit b4997d7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
13 changes: 8 additions & 5 deletions pype/plugins/celaction/publish/collect_render_path.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class CollectRenderPath(pyblish.api.InstancePlugin):

# Presets
anatomy_render_key = None
anatomy_publish_render_key = None
publish_render_metadata = None

def process(self, instance):
anatomy = instance.context.data["anatomy"]
Expand All @@ -28,7 +28,7 @@ def process(self, instance):

# get anatomy rendering keys
anatomy_render_key = self.anatomy_render_key or "render"
anatomy_publish_render_key = self.anatomy_publish_render_key or "render"
publish_render_metadata = self.publish_render_metadata or "render"

# get folder and path for rendering images from celaction
render_dir = anatomy_filled[anatomy_render_key]["folder"]
Expand All @@ -46,8 +46,11 @@ def process(self, instance):
instance.data["path"] = render_path

# get anatomy for published renders folder path
if anatomy_filled.get(anatomy_publish_render_key):
instance.data["publishRenderFolder"] = anatomy_filled[
anatomy_publish_render_key]["folder"]
if anatomy_filled.get(publish_render_metadata):
instance.data["publishRenderMetadataFolder"] = anatomy_filled[
publish_render_metadata]["folder"]
self.log.info("Metadata render path: `{}`".format(
instance.data["publishRenderMetadataFolder"]
))

self.log.info(f"Render output path set to: `{render_path}`")
3 changes: 2 additions & 1 deletion pype/plugins/global/publish/submit_publish_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,8 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin):
def _create_metadata_path(self, instance):
ins_data = instance.data
# Ensure output dir exists
output_dir = ins_data.get("publishRenderFolder", ins_data["outputDir"])
output_dir = ins_data.get(
"publishRenderMetadataFolder", ins_data["outputDir"])

try:
if not os.path.isdir(output_dir):
Expand Down

0 comments on commit b4997d7

Please sign in to comment.