Merge pull request #254 from pypeclub/bugfix/2.x-alembic-export

Maya: export alembic start/end frame type
This commit is contained in:
Milan Kolar 2020-06-16 10:18:01 +02:00 committed by GitHub
commit ebb05ca7eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -37,7 +37,7 @@ class ExtractAnimation(pype.api.Extractor):
# Collect the start and end including handles
start = instance.data["frameStart"]
end = instance.data["frameEnd"]
handles = instance.data.get("handles", 0)
handles = instance.data.get("handles", 0) or 0
if handles:
start -= handles
end += handles
@ -50,7 +50,7 @@ class ExtractAnimation(pype.api.Extractor):
path = os.path.join(parent_dir, filename)
options = {
"step": instance.data.get("step", 1.0),
"step": instance.data.get("step", 1.0) or 1.0,
"attr": ["cbId"],
"writeVisibility": True,
"writeCreases": True,
@ -74,8 +74,8 @@ class ExtractAnimation(pype.api.Extractor):
with avalon.maya.maintained_selection():
cmds.select(nodes, noExpand=True)
extract_alembic(file=path,
startFrame=start,
endFrame=end,
startFrame=float(start),
endFrame=float(end),
**options)
if "representations" not in instance.data: