From eb59a319f7879e42e8bf5409d916c839a5c00768 Mon Sep 17 00:00:00 2001 From: David Cattermole Date: Fri, 7 Apr 2023 08:41:35 +1000 Subject: [PATCH] Menus - Move "Screen-Space Transform Bake" tool menu To separate the "Screen-Space Transform Bake" and give a visual difference between it and the "Screen-Space Rig Bake" tool. --- python/mmSolver/utils/animcurve.py | 12 ++++++------ share/config/menu.json | 3 ++- share/config/shelf.json | 3 ++- share/config/shelf_minimal.json | 3 ++- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/python/mmSolver/utils/animcurve.py b/python/mmSolver/utils/animcurve.py index 81d468806..1bb817304 100644 --- a/python/mmSolver/utils/animcurve.py +++ b/python/mmSolver/utils/animcurve.py @@ -51,10 +51,10 @@ def create_anim_curve_node_apione( Create an animCurve using Maya API (one). :param times: Time values for the animCurve - :type times: list + :type times: tuple or list :param values: Values for the animCurve. - :type values: list + :type values: tuple or list :param node_attr: The 'plug' to connect the animCurve to. :type node_attr: str @@ -75,10 +75,10 @@ def create_anim_curve_node_apione( :return: MFnAnimCurve object attached to a newly created animation curve. :rtype: maya.OpenMaya.MFnAnimCurve """ - if not isinstance(times, list): - raise ValueError('times must be a list or sequence type; %r' % times) - if not isinstance(values, list): - raise ValueError('values must be a list or sequence type; %r' % values) + if not isinstance(times, (tuple, list)): + raise ValueError('times must be a tuple or list type; %r' % times) + if not isinstance(values, (tuple, list)): + raise ValueError('values must be a tuple or list type; %r' % values) if len(times) == 0: raise ValueError('times must have 1 or more values; %r' % times) if len(values) == 0: diff --git a/share/config/menu.json b/share/config/menu.json index 71cddb2e5..392a972dc 100644 --- a/share/config/menu.json +++ b/share/config/menu.json @@ -90,10 +90,11 @@ "display_tools/create_screen_space_motion_trail", "zdepth_tools/---Z-Depth Screen-Space Tools", "zdepth_tools/screen_z_manipulator", - "zdepth_tools/screen_z_transform_bake", "zdepth_tools/screen_space_rig_bake", "zdepth_tools/camera_object_scale_adjust", "zdepth_tools/camera_object_scale_remove", + "zdepth_tools/---", + "zdepth_tools/screen_z_transform_bake", "general_tools/---Parenting", "general_tools/reparent_under_node2", "general_tools/unparent_to_world2", diff --git a/share/config/shelf.json b/share/config/shelf.json index 2ebb1f861..1e88dcb3a 100644 --- a/share/config/shelf.json +++ b/share/config/shelf.json @@ -87,10 +87,11 @@ "display_tools/display_popup/create_screen_space_motion_trail", "zdepth_tools/zdepth_popup/---Z-Depth Screen-Space Tools", "zdepth_tools/zdepth_popup/screen_z_manipulator", - "zdepth_tools/zdepth_popup/screen_z_transform_bake", "zdepth_tools/zdepth_popup/screen_space_rig_bake", "zdepth_tools/zdepth_popup/camera_object_scale_adjust", "zdepth_tools/zdepth_popup/camera_object_scale_remove", + "zdepth_tools/zdepth_popup/---", + "zdepth_tools/zdepth_popup/screen_z_transform_bake", "general_tools/gen_tools_popup/---Parenting", "general_tools/gen_tools_popup/reparent_under_node2", "general_tools/gen_tools_popup/unparent_to_world2", diff --git a/share/config/shelf_minimal.json b/share/config/shelf_minimal.json index ea2d579aa..538808ef1 100644 --- a/share/config/shelf_minimal.json +++ b/share/config/shelf_minimal.json @@ -98,10 +98,11 @@ "display_tools/display_popup/create_screen_space_motion_trail", "zdepth_tools/zdepth_popup/---Z-Depth Screen-Space Tools", "zdepth_tools/zdepth_popup/screen_z_manipulator", - "zdepth_tools/zdepth_popup/screen_z_transform_bake", "zdepth_tools/zdepth_popup/screen_space_rig_bake", "zdepth_tools/zdepth_popup/camera_object_scale_adjust", "zdepth_tools/zdepth_popup/camera_object_scale_remove", + "zdepth_tools/zdepth_popup/---", + "zdepth_tools/zdepth_popup/screen_z_transform_bake", "general_tools/gen_tools_popup/---Parenting", "general_tools/gen_tools_popup/reparent_under_node2", "general_tools/gen_tools_popup/unparent_to_world2",