diff --git a/openpype/hosts/fusion/scripts/fusion_switch_shot.py b/openpype/hosts/fusion/scripts/fusion_switch_shot.py index 041b53f6c9..9dd8a351e4 100644 --- a/openpype/hosts/fusion/scripts/fusion_switch_shot.py +++ b/openpype/hosts/fusion/scripts/fusion_switch_shot.py @@ -176,7 +176,7 @@ def update_frame_range(comp, representations): versions = list(versions) versions = [v for v in versions - if v["data"].get("startFrame", None) is not None] + if v["data"].get("frameStart", None) is not None] if not versions: log.warning("No versions loaded to match frame range to.\n") diff --git a/openpype/hosts/houdini/plugins/load/actions.py b/openpype/hosts/houdini/plugins/load/actions.py index 6e9410ff58..acdb998c16 100644 --- a/openpype/hosts/houdini/plugins/load/actions.py +++ b/openpype/hosts/houdini/plugins/load/actions.py @@ -29,8 +29,8 @@ class SetFrameRangeLoader(api.Loader): version = context["version"] version_data = version.get("data", {}) - start = version_data.get("startFrame", None) - end = version_data.get("endFrame", None) + start = version_data.get("frameStart", None) + end = version_data.get("frameEnd", None) if start is None or end is None: print( @@ -67,8 +67,8 @@ class SetFrameRangeWithHandlesLoader(api.Loader): version = context["version"] version_data = version.get("data", {}) - start = version_data.get("startFrame", None) - end = version_data.get("endFrame", None) + start = version_data.get("frameStart", None) + end = version_data.get("frameEnd", None) if start is None or end is None: print( @@ -78,9 +78,8 @@ class SetFrameRangeWithHandlesLoader(api.Loader): return # Include handles - handles = version_data.get("handles", 0) - start -= handles - end += handles + start -= version_data.get("handleStart", 0) + end += version_data.get("handleEnd", 0) hou.playbar.setFrameRange(start, end) hou.playbar.setPlaybackRange(start, end) diff --git a/openpype/hosts/houdini/plugins/publish/validate_abc_primitive_to_detail.py b/openpype/hosts/houdini/plugins/publish/validate_abc_primitive_to_detail.py index 8fe1b44b7a..3e17d3e8de 100644 --- a/openpype/hosts/houdini/plugins/publish/validate_abc_primitive_to_detail.py +++ b/openpype/hosts/houdini/plugins/publish/validate_abc_primitive_to_detail.py @@ -65,7 +65,7 @@ class ValidateAbcPrimitiveToDetail(pyblish.api.InstancePlugin): cls.log.debug("Checking with path attribute: %s" % path_attr) # Check if the primitive attribute exists - frame = instance.data.get("startFrame", 0) + frame = instance.data.get("frameStart", 0) geo = output.geometryAtFrame(frame) # If there are no primitives on the start frame then it might be diff --git a/openpype/hosts/houdini/plugins/publish/validate_alembic_input_node.py b/openpype/hosts/houdini/plugins/publish/validate_alembic_input_node.py index 17c9da837a..8d7e3b611f 100644 --- a/openpype/hosts/houdini/plugins/publish/validate_alembic_input_node.py +++ b/openpype/hosts/houdini/plugins/publish/validate_alembic_input_node.py @@ -38,7 +38,7 @@ class ValidateAlembicInputNode(pyblish.api.InstancePlugin): cls.log.warning("No geometry output node found, skipping check..") return - frame = instance.data.get("startFrame", 0) + frame = instance.data.get("frameStart", 0) geo = node.geometryAtFrame(frame) invalid = False diff --git a/openpype/hosts/houdini/plugins/publish/validate_primitive_hierarchy_paths.py b/openpype/hosts/houdini/plugins/publish/validate_primitive_hierarchy_paths.py index 3c15532be8..1eb36763bb 100644 --- a/openpype/hosts/houdini/plugins/publish/validate_primitive_hierarchy_paths.py +++ b/openpype/hosts/houdini/plugins/publish/validate_primitive_hierarchy_paths.py @@ -51,7 +51,7 @@ class ValidatePrimitiveHierarchyPaths(pyblish.api.InstancePlugin): cls.log.debug("Checking for attribute: %s" % path_attr) # Check if the primitive attribute exists - frame = instance.data.get("startFrame", 0) + frame = instance.data.get("frameStart", 0) geo = output.geometryAtFrame(frame) # If there are no primitives on the current frame then we can't diff --git a/openpype/hosts/maya/api/lib.py b/openpype/hosts/maya/api/lib.py index c2a140548a..41c67a6209 100644 --- a/openpype/hosts/maya/api/lib.py +++ b/openpype/hosts/maya/api/lib.py @@ -355,7 +355,8 @@ def collect_animation_data(fps=False): data = OrderedDict() data["frameStart"] = start data["frameEnd"] = end - data["handles"] = 0 + data["handleStart"] = 0 + data["handleEnd"] = 0 data["step"] = 1.0 if fps: diff --git a/openpype/hosts/maya/plugins/load/actions.py b/openpype/hosts/maya/plugins/load/actions.py index 1cc7ee0c03..1cb63c8a7a 100644 --- a/openpype/hosts/maya/plugins/load/actions.py +++ b/openpype/hosts/maya/plugins/load/actions.py @@ -72,9 +72,8 @@ class SetFrameRangeWithHandlesLoader(api.Loader): return # Include handles - handles = version_data.get("handles", 0) - start -= handles - end += handles + start -= version_data.get("handleStart", 0) + end += version_data.get("handleEnd", 0) cmds.playbackOptions(minTime=start, maxTime=end, diff --git a/openpype/hosts/maya/plugins/publish/extract_animation.py b/openpype/hosts/maya/plugins/publish/extract_animation.py index 269972d996..8a8bd67cd8 100644 --- a/openpype/hosts/maya/plugins/publish/extract_animation.py +++ b/openpype/hosts/maya/plugins/publish/extract_animation.py @@ -38,12 +38,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 ab149de700..760f410f91 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 806a079940..5ad6b79d5c 100644 --- a/openpype/hosts/maya/plugins/publish/extract_camera_alembic.py +++ b/openpype/hosts/maya/plugins/publish/extract_camera_alembic.py @@ -21,17 +21,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) @@ -61,10 +53,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 3015b1ac24..49c156f9cd 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 844084b9ab..a2adcb3091 100644 --- a/openpype/hosts/maya/plugins/publish/extract_fbx.py +++ b/openpype/hosts/maya/plugins/publish/extract_fbx.py @@ -168,12 +168,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 615bc27878..562ca078e1 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 diff --git a/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py b/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py index 2cd6b0e6b0..59aeb68b79 100644 --- a/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py +++ b/openpype/modules/deadline/plugins/publish/submit_houdini_render_deadline.py @@ -50,8 +50,8 @@ class HoudiniSubmitRenderDeadline(pyblish.api.InstancePlugin): # StartFrame to EndFrame by byFrameStep frames = "{start}-{end}x{step}".format( - start=int(instance.data["startFrame"]), - end=int(instance.data["endFrame"]), + start=int(instance.data["frameStart"]), + end=int(instance.data["frameEnd"]), step=int(instance.data["byFrameStep"]), ) diff --git a/openpype/modules/deadline/plugins/publish/submit_publish_job.py b/openpype/modules/deadline/plugins/publish/submit_publish_job.py index a77a968815..c7a14791e4 100644 --- a/openpype/modules/deadline/plugins/publish/submit_publish_job.py +++ b/openpype/modules/deadline/plugins/publish/submit_publish_job.py @@ -316,8 +316,8 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin): import speedcopy self.log.info("Preparing to copy ...") - start = instance.data.get("startFrame") - end = instance.data.get("endFrame") + start = instance.data.get("frameStart") + end = instance.data.get("frameEnd") # get latest version of subset # this will stop if subset wasn't published yet