Merge pull request #35 from BigRoy/master

Implement a first draft for PLN-31
This commit is contained in:
Wijnand Koreman 2017-10-30 15:06:46 +01:00 committed by GitHub
commit f2be2a7d8b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 9 deletions

View file

@ -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__)
@ -24,7 +25,7 @@ ATTRIBUTE_DICT = {"int": {"attributeType": "long"},
"float": {"attributeType": "double"},
"bool": {"attributeType": "bool"}}
SHAPE_ATTRS = ["castsShadows",
SHAPE_ATTRS = {"castsShadows",
"receiveShadows",
"motionBlur",
"primaryVisibility",
@ -32,7 +33,7 @@ SHAPE_ATTRS = ["castsShadows",
"visibleInReflections",
"visibleInRefractions",
"doubleSided",
"opposite"]
"opposite"}
RENDER_ATTRS = {"vray":
{
@ -50,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,
@ -572,7 +570,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)

View file

@ -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,11 +63,11 @@ 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,
"family": "Image Sequence",
"family": "colorbleed.imagesequence",
"families": ["colorbleed.imagesequence"],
"subset": collection.head[:-1],
"stagingDir": os.path.join(workspace, renderlayer),