diff --git a/openpype/hosts/maya/api/lib.py b/openpype/hosts/maya/api/lib.py index 52ebcaff64..d003203959 100644 --- a/openpype/hosts/maya/api/lib.py +++ b/openpype/hosts/maya/api/lib.py @@ -297,7 +297,8 @@ def collect_animation_data(): data = OrderedDict() data["frameStart"] = start data["frameEnd"] = end - data["handles"] = 0 + data["handleStart"] = 0 + data["handleEnd"] = 0 data["step"] = 1.0 data["fps"] = fps diff --git a/openpype/hosts/maya/plugins/publish/extract_animation.py b/openpype/hosts/maya/plugins/publish/extract_animation.py index 7ecc40a68d..e0ed4411a8 100644 --- a/openpype/hosts/maya/plugins/publish/extract_animation.py +++ b/openpype/hosts/maya/plugins/publish/extract_animation.py @@ -35,12 +35,8 @@ class ExtractAnimation(openpype.api.Extractor): fullPath=True) or [] # Collect the start and end including handles - start = instance.data["frameStart"] - end = instance.data["frameEnd"] - handles = instance.data.get("handles", 0) or 0 - if handles: - start -= handles - end += handles + start = instance.data["frameStartHandle"] + end = instance.data["frameEndHandle"] self.log.info("Extracting animation..") dirname = self.staging_dir(instance) diff --git a/openpype/hosts/maya/plugins/publish/extract_ass.py b/openpype/hosts/maya/plugins/publish/extract_ass.py index 7461ccdf78..9025709178 100644 --- a/openpype/hosts/maya/plugins/publish/extract_ass.py +++ b/openpype/hosts/maya/plugins/publish/extract_ass.py @@ -38,13 +38,9 @@ class ExtractAssStandin(openpype.api.Extractor): self.log.info("Extracting ass sequence") # Collect the start and end including handles - start = instance.data.get("frameStart", 1) - end = instance.data.get("frameEnd", 1) - handles = instance.data.get("handles", 0) + start = instance.data.get("frameStartHandle", 1) + end = instance.data.get("frameEndHandle", 1) step = instance.data.get("step", 0) - if handles: - start -= handles - end += handles exported_files = cmds.arnoldExportAss(filename=file_path, selected=True, diff --git a/openpype/hosts/maya/plugins/publish/extract_camera_alembic.py b/openpype/hosts/maya/plugins/publish/extract_camera_alembic.py index 8950ed6254..b6f1826098 100644 --- a/openpype/hosts/maya/plugins/publish/extract_camera_alembic.py +++ b/openpype/hosts/maya/plugins/publish/extract_camera_alembic.py @@ -23,17 +23,9 @@ class ExtractCameraAlembic(openpype.api.Extractor): def process(self, instance): - # get settings - framerange = [instance.data.get("frameStart", 1), - instance.data.get("frameEnd", 1)] - 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) + # Collect the start and end including handles + start = instance.data["frameStartHandle"] + end = instance.data["frameEndHandle"] step = instance.data.get("step", 1.0) bake_to_worldspace = instance.data("bakeToWorldSpace", True) @@ -63,10 +55,7 @@ class ExtractCameraAlembic(openpype.api.Extractor): job_str = ' -selection -dataFormat "ogawa" ' job_str += ' -attrPrefix cb' - job_str += ' -frameRange {0} {1} '.format(framerange[0] - - handle_start, - framerange[1] - + handle_end) + job_str += ' -frameRange {0} {1} '.format(start, end) job_str += ' -step {0} '.format(step) if bake_to_worldspace: diff --git a/openpype/hosts/maya/plugins/publish/extract_camera_mayaScene.py b/openpype/hosts/maya/plugins/publish/extract_camera_mayaScene.py index 888dc636b2..bac00dc711 100644 --- a/openpype/hosts/maya/plugins/publish/extract_camera_mayaScene.py +++ b/openpype/hosts/maya/plugins/publish/extract_camera_mayaScene.py @@ -118,19 +118,9 @@ class ExtractCameraMayaScene(openpype.api.Extractor): # no preset found pass - framerange = [instance.data.get("frameStart", 1), - instance.data.get("frameEnd", 1)] - 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] + # Collect the start and end including handles + start = instance.data["frameStartHandle"] + end = instance.data["frameEndHandle"] step = instance.data.get("step", 1.0) bake_to_worldspace = instance.data("bakeToWorldSpace", True) @@ -165,7 +155,7 @@ class ExtractCameraMayaScene(openpype.api.Extractor): "Performing camera bakes: {}".format(transform)) baked = lib.bake_to_world_space( transform, - frame_range=range_with_handles, + frame_range=[start, end], step=step ) baked_shapes = cmds.ls(baked, diff --git a/openpype/hosts/maya/plugins/publish/extract_fbx.py b/openpype/hosts/maya/plugins/publish/extract_fbx.py index 720a61b0a7..4a92e31ccb 100644 --- a/openpype/hosts/maya/plugins/publish/extract_fbx.py +++ b/openpype/hosts/maya/plugins/publish/extract_fbx.py @@ -166,12 +166,8 @@ class ExtractFBX(openpype.api.Extractor): self.log.info("Export options: {0}".format(options)) # Collect the start and end including handles - start = instance.data["frameStart"] - end = instance.data["frameEnd"] - handles = instance.data.get("handles", 0) - if handles: - start -= handles - end += handles + start = instance.data["frameStartHandle"] + end = instance.data["frameEndHandle"] options['bakeComplexStart'] = start options['bakeComplexEnd'] = end diff --git a/openpype/hosts/maya/plugins/publish/extract_vrayproxy.py b/openpype/hosts/maya/plugins/publish/extract_vrayproxy.py index 7103601b85..8bfbbd525d 100644 --- a/openpype/hosts/maya/plugins/publish/extract_vrayproxy.py +++ b/openpype/hosts/maya/plugins/publish/extract_vrayproxy.py @@ -28,14 +28,19 @@ class ExtractVRayProxy(openpype.api.Extractor): if not anim_on: # Remove animation information because it is not required for # non-animated subsets - instance.data.pop("frameStart", None) - instance.data.pop("frameEnd", None) + keys = ["frameStart", "frameEnd", + "handleStart", "handleEnd", + "frameStartHandle", "frameEndHandle", + # Backwards compatibility + "handles"] + for key in keys: + instance.data.pop(key, None) start_frame = 1 end_frame = 1 else: - start_frame = instance.data["frameStart"] - end_frame = instance.data["frameEnd"] + start_frame = instance.data["frameStartHandle"] + end_frame = instance.data["frameEndHandle"] vertex_colors = instance.data.get("vertexColors", False) diff --git a/openpype/hosts/maya/plugins/publish/extract_yeti_cache.py b/openpype/hosts/maya/plugins/publish/extract_yeti_cache.py index 05fe79ecc5..0d85708789 100644 --- a/openpype/hosts/maya/plugins/publish/extract_yeti_cache.py +++ b/openpype/hosts/maya/plugins/publish/extract_yeti_cache.py @@ -29,8 +29,8 @@ class ExtractYetiCache(openpype.api.Extractor): data_file = os.path.join(dirname, "yeti.fursettings") # Collect information for writing cache - start_frame = instance.data.get("frameStart") - end_frame = instance.data.get("frameEnd") + start_frame = instance.data.get("frameStartHandle") + end_frame = instance.data.get("frameEndHandle") preroll = instance.data.get("preroll") if preroll > 0: start_frame -= preroll