mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-26 13:52:15 +01:00
Merge pull request #35 from BigRoy/master
Implement a first draft for PLN-31
This commit is contained in:
commit
f2be2a7d8b
2 changed files with 12 additions and 9 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue