diff --git a/pype/plugins/celaction/publish/collect_celaction_instances.py b/pype/plugins/celaction/publish/collect_celaction_instances.py index aa2bb5da5d..431ab722d3 100644 --- a/pype/plugins/celaction/publish/collect_celaction_instances.py +++ b/pype/plugins/celaction/publish/collect_celaction_instances.py @@ -16,6 +16,7 @@ class CollectCelactionInstances(pyblish.api.ContextPlugin): scene_file = os.path.basename(current_file) version = context.data["version"] asset_entity = context.data["assetEntity"] + project_entity = context.data["projectEntity"] shared_instance_data = { "asset": asset_entity["name"], @@ -24,8 +25,12 @@ class CollectCelactionInstances(pyblish.api.ContextPlugin): "handleStart": asset_entity["data"]["handleStart"], "handleEnd": asset_entity["data"]["handleEnd"], "fps": asset_entity["data"]["fps"], - "resolutionWidth": asset_entity["data"]["resolutionWidth"], - "resolutionHeight": asset_entity["data"]["resolutionHeight"], + "resolutionWidth": asset_entity["data"].get( + "resolutionWidth", + project_entity["data"]["resolutionWidth"]), + "resolutionHeight": asset_entity["data"].get( + "resolutionHeight", + project_entity["data"]["resolutionHeight"]), "pixelAspect": 1, "step": 1, "version": version diff --git a/pype/plugins/celaction/publish/collect_render_path.py b/pype/plugins/celaction/publish/collect_render_path.py index cddd2643d8..d5fe6c07a5 100644 --- a/pype/plugins/celaction/publish/collect_render_path.py +++ b/pype/plugins/celaction/publish/collect_render_path.py @@ -1,5 +1,6 @@ import os import pyblish.api +import copy class CollectRenderPath(pyblish.api.InstancePlugin): @@ -7,19 +8,21 @@ class CollectRenderPath(pyblish.api.InstancePlugin): label = "Collect Render Path" order = pyblish.api.CollectorOrder + 0.495 + families = ["render.farm"] def process(self, instance): anatomy = instance.context.data["anatomy"] - current_file = instance.context.data["currentFile"] - work_dir = os.path.dirname(current_file) + anatomy_data = copy.deepcopy(instance.data["anatomyData"]) padding = anatomy.templates.get("frame_padding", 4) - render_dir = os.path.join( - work_dir, "render", "celaction" - ) - render_path = os.path.join( - render_dir, - ".".join([instance.data["subset"], f"%0{padding}d", "png"]) - ) + anatomy_data.update({ + "frame": f"%0{padding}d", + "representation": "png" + }) + + anatomy_filled = anatomy.format(anatomy_data) + + render_dir = anatomy_filled["render_tmp"]["folder"] + render_path = anatomy_filled["render_tmp"]["path"] # create dir if it doesnt exists os.makedirs(render_dir, exist_ok=True)