diff --git a/pype/plugins/maya/publish/extract_camera_alembic.py b/pype/plugins/maya/publish/extract_camera_alembic.py index c61ec5e19e..c03fd44802 100644 --- a/pype/plugins/maya/publish/extract_camera_alembic.py +++ b/pype/plugins/maya/publish/extract_camera_alembic.py @@ -26,7 +26,15 @@ class ExtractCameraAlembic(pype.api.Extractor): # get settings framerange = [instance.data.get("frameStart", 1), instance.data.get("frameEnd", 1)] - handles = instance.data.get("handles", 0) + handle_start = instance.data.get("handleStart", 0) + handle_end = instance.data.get("handleEnd", 0) + + # TODO: deprecated attribute "handles" + + if handle_start is None: + handle_start = instance.data.get("handles", 0) + handle_end = instance.data.get("handles", 0) + step = instance.data.get("step", 1.0) bake_to_worldspace = instance.data("bakeToWorldSpace", True) @@ -55,8 +63,8 @@ class ExtractCameraAlembic(pype.api.Extractor): job_str = ' -selection -dataFormat "ogawa" ' job_str += ' -attrPrefix cb' - job_str += ' -frameRange {0} {1} '.format(framerange[0] - handles, - framerange[1] + handles) + job_str += ' -frameRange {0} {1} '.format(framerange[0] - handle_start, + framerange[1] + handle_end) job_str += ' -step {0} '.format(step) if bake_to_worldspace: diff --git a/pype/plugins/maya/publish/extract_camera_mayaScene.py b/pype/plugins/maya/publish/extract_camera_mayaScene.py index 1a0f4694d1..6ddb76d479 100644 --- a/pype/plugins/maya/publish/extract_camera_mayaScene.py +++ b/pype/plugins/maya/publish/extract_camera_mayaScene.py @@ -107,7 +107,18 @@ class ExtractCameraMayaScene(pype.api.Extractor): framerange = [instance.data.get("frameStart", 1), instance.data.get("frameEnd", 1)] - handles = instance.data.get("handles", 0) + handle_start = instance.data.get("handleStart", 0) + handle_end = instance.data.get("handleEnd", 0) + + # TODO: deprecated attribute "handles" + + if handle_start is None: + handle_start = instance.data.get("handles", 0) + handle_end = instance.data.get("handles", 0) + + range_with_handles = [framerange[0] - handle_start, + framerange[1] + handle_end] + step = instance.data.get("step", 1.0) bake_to_worldspace = instance.data("bakeToWorldSpace", True) @@ -121,9 +132,6 @@ class ExtractCameraMayaScene(pype.api.Extractor): cameras = cmds.ls(members, leaf=True, shapes=True, long=True, dag=True, type="camera") - range_with_handles = [framerange[0] - handles, - framerange[1] + handles] - # validate required settings assert len(cameras) == 1, "Single camera must be found in extraction" assert isinstance(step, float), "Step must be a float value"