From 11fbd15094bea4fde8f600c7c460fdcfb2b9a417 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Mon, 30 Oct 2017 12:53:21 +0100 Subject: [PATCH 1/4] Add comment and fix typo in variable --- colorbleed/plugins/publish/collect_imagesequences.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/colorbleed/plugins/publish/collect_imagesequences.py b/colorbleed/plugins/publish/collect_imagesequences.py index a20ecec781..3a1e95ce6b 100644 --- a/colorbleed/plugins/publish/collect_imagesequences.py +++ b/colorbleed/plugins/publish/collect_imagesequences.py @@ -16,6 +16,7 @@ class CollectMindbenderImageSequences(pyblish.api.ContextPlugin): # Force towards a single json sequence (override searching # the current working directory) + # TODO: This logic should be simplified USE_JSON = os.environ.get("USE_JSON", "") if USE_JSON: workspace = os.path.dirname(USE_JSON) @@ -54,7 +55,7 @@ class CollectMindbenderImageSequences(pyblish.api.ContextPlugin): raise Exception("%s was not published correctly " "(missing metadata)" % renderlayer) - metadat_instance = metadata['instance'] + metadata_instance = metadata['instance'] # For now ensure this data is ignored for collection in collections: instance = context.create_instance(str(collection)) @@ -62,7 +63,7 @@ class CollectMindbenderImageSequences(pyblish.api.ContextPlugin): # Ensure each instance gets its own unique reference to # the source data - instance_metadata = copy.deepcopy(metadat_instance) + instance_metadata = copy.deepcopy(metadata_instance) data = dict(instance_metadata, **{ "name": instance.name, From 4b9e24d8dad517dadf8374016b5d780046b33224 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Mon, 30 Oct 2017 12:53:46 +0100 Subject: [PATCH 2/4] Fix `family` issue --- colorbleed/plugins/publish/collect_imagesequences.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/colorbleed/plugins/publish/collect_imagesequences.py b/colorbleed/plugins/publish/collect_imagesequences.py index 3a1e95ce6b..4da58840c0 100644 --- a/colorbleed/plugins/publish/collect_imagesequences.py +++ b/colorbleed/plugins/publish/collect_imagesequences.py @@ -67,7 +67,7 @@ class CollectMindbenderImageSequences(pyblish.api.ContextPlugin): data = dict(instance_metadata, **{ "name": instance.name, - "family": "Image Sequence", + "family": "colorbleed.imagesequence", "families": ["colorbleed.imagesequence"], "subset": collection.head[:-1], "stagingDir": os.path.join(workspace, renderlayer), From b61b9848b2ec879d2e7e216c27caa7ba426e3290 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Mon, 30 Oct 2017 14:21:33 +0100 Subject: [PATCH 3/4] Implement potential fix for PLN-31 --- colorbleed/maya/lib.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/colorbleed/maya/lib.py b/colorbleed/maya/lib.py index 95ca405feb..c671b7a561 100644 --- a/colorbleed/maya/lib.py +++ b/colorbleed/maya/lib.py @@ -14,6 +14,7 @@ from maya import cmds, mel from avalon import api, maya, io, pipeline from cb.utils.maya import core +import cb.utils.maya.context log = logging.getLogger(__name__) @@ -572,7 +573,11 @@ def extract_alembic(file, # Perform extraction print("Alembic Job Arguments : {}".format(job_str)) - cmds.AbcExport(j=job_str, verbose=verbose) + # Disable the parallel evaluation temporarily to ensure no buggy + # exports are made. (PLN-31) + # TODO: Make sure this actually fixes the issues + with cb.utils.maya.context.evaluation("off"): + cmds.AbcExport(j=job_str, verbose=verbose) if verbose: log.debug("Extracted Alembic to: %s", file) From 51f8713ff45a8a402c59e7a49979263a90ae9feb Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Mon, 30 Oct 2017 14:22:22 +0100 Subject: [PATCH 4/4] Use set literal for SHAPE_ATTRS --- colorbleed/maya/lib.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/colorbleed/maya/lib.py b/colorbleed/maya/lib.py index c671b7a561..8d417b79ed 100644 --- a/colorbleed/maya/lib.py +++ b/colorbleed/maya/lib.py @@ -25,7 +25,7 @@ ATTRIBUTE_DICT = {"int": {"attributeType": "long"}, "float": {"attributeType": "double"}, "bool": {"attributeType": "bool"}} -SHAPE_ATTRS = ["castsShadows", +SHAPE_ATTRS = {"castsShadows", "receiveShadows", "motionBlur", "primaryVisibility", @@ -33,7 +33,7 @@ SHAPE_ATTRS = ["castsShadows", "visibleInReflections", "visibleInRefractions", "doubleSided", - "opposite"] + "opposite"} RENDER_ATTRS = {"vray": { @@ -51,9 +51,6 @@ RENDER_ATTRS = {"vray": } -SHAPE_ATTRS = set(SHAPE_ATTRS) - - DEFAULT_MATRIX = [1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0,