From 7bd1969888951fa9982a58ed416f595bd0882edd Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 27 Mar 2019 14:49:49 +1100 Subject: [PATCH] pie_menus_official: conform menu names Needed after changes to the API. --- pie_menus_official/pie_clip_marker_of.py | 60 +++++++++++++++---------------- pie_menus_official/pie_manipulator_of.py | 7 ++-- pie_menus_official/pie_object_modes_of.py | 11 +++--- pie_menus_official/pie_pivot_of.py | 9 +++-- pie_menus_official/pie_shade_of.py | 9 +++-- pie_menus_official/pie_snap_of.py | 5 ++- pie_menus_official/pie_view_of.py | 14 ++++---- 7 files changed, 55 insertions(+), 60 deletions(-) diff --git a/pie_menus_official/pie_clip_marker_of.py b/pie_menus_official/pie_clip_marker_of.py index 865aa24c..ce08ce65 100644 --- a/pie_menus_official/pie_clip_marker_of.py +++ b/pie_menus_official/pie_clip_marker_of.py @@ -34,7 +34,7 @@ import bpy from bpy.types import Menu -class CLIP_PIE_refine_pie(Menu): +class CLIP_MT_refine_pie(Menu): # Refinement Options bl_label = "Refine Intrinsics" @@ -53,7 +53,7 @@ class CLIP_PIE_refine_pie(Menu): pie.prop(settings, "refine_intrinsics", expand=True) -class CLIP_PIE_geometry_reconstruction(Menu): +class CLIP_MT_geometry_reconstruction(Menu): # Geometry Reconstruction bl_label = "Reconstruction" @@ -65,7 +65,7 @@ class CLIP_PIE_geometry_reconstruction(Menu): pie.operator("clip.track_to_empty", icon='EMPTY_DATA') -class CLIP_PIE_proxy_pie(Menu): +class CLIP_MT_proxy_pie(Menu): # Proxy Controls bl_label = "Proxy Size" @@ -84,7 +84,7 @@ class CLIP_PIE_proxy_pie(Menu): pie.prop(space.clip_user, "proxy_render_size", expand=True) -class CLIP_PIE_display_pie(Menu): +class CLIP_MT_display_pie(Menu): # Display Options bl_label = "Marker Display" @@ -100,7 +100,7 @@ class CLIP_PIE_display_pie(Menu): pie.prop(space, "show_marker_pattern", text="Display Pattern Area", icon='BORDERMOVE') -class CLIP_PIE_marker_pie(Menu): +class CLIP_MT_marker_pie(Menu): # Settings for the individual markers bl_label = "Marker Settings" @@ -137,7 +137,7 @@ class CLIP_PIE_marker_pie(Menu): prop.value = 'PREV_FRAME' -class CLIP_PIE_tracking_pie(Menu): +class CLIP_MT_tracking_pie(Menu): # Tracking Operators bl_label = "Tracking" @@ -162,7 +162,7 @@ class CLIP_PIE_tracking_pie(Menu): pie.operator("clip.refine_markers", icon='LOOP_FORWARDS').backwards = False -class CLIP_PIE_clipsetup_pie(Menu): +class CLIP_MT_clipsetup_pie(Menu): # Setup the clip display options bl_label = "Clip and Display Setup" @@ -178,15 +178,15 @@ class CLIP_PIE_clipsetup_pie(Menu): pie.prop(space, "use_mute_footage", text="Mute Footage", icon='MUTE_IPO_ON') pie.prop(space.clip_user, "use_render_undistorted", text="Render Undistorted") pie.operator("clip.set_scene_frames", text="Set Scene Frames", icon='SCENE_DATA') - pie.operator("wm.call_menu_pie", text="Marker Display", icon='PLUS').name = "CLIP_PIE_display_pie" + pie.operator("wm.call_menu_pie", text="Marker Display", icon='PLUS').name = "CLIP_MT_display_pie" pie.operator("clip.set_active_clip", icon='CLIP') pie_proxy = layout.menu_pie() pie_proxy.enabled = space.clip is not None - pie_proxy.operator("wm.call_menu_pie", text="Proxy", icon='PLUS').name = "CLIP_PIE_proxy_pie" + pie_proxy.operator("wm.call_menu_pie", text="Proxy", icon='PLUS').name = "CLIP_MT_proxy_pie" -class CLIP_PIE_solver_pie(Menu): +class CLIP_MT_solver_pie(Menu): # Operators to solve the scene bl_label = "Solving" @@ -202,7 +202,7 @@ class CLIP_PIE_solver_pie(Menu): if settings: pie.operator("wm.call_menu_pie", text="Refinement", - icon='CAMERA_DATA').name = "CLIP_PIE_refine_pie" + icon='CAMERA_DATA').name = "CLIP_MT_refine_pie" pie.prop(settings, "use_tripod_solver", text="Tripod Solver") pie.operator("clip.set_solver_keyframe", text="Set Keyframe A", @@ -216,7 +216,7 @@ class CLIP_PIE_solver_pie(Menu): prop.error = 2 -class CLIP_PIE_reconstruction_pie(Menu): +class CLIP_MT_reconstruction_pie(Menu): # Scene Reconstruction bl_label = "Reconstruction" @@ -235,10 +235,10 @@ class CLIP_PIE_reconstruction_pie(Menu): pie.operator("clip.set_scale", text="Set Scale", icon='ARROW_LEFTRIGHT') pie.operator("wm.call_menu_pie", text="Reconstruction", - icon='MESH_DATA').name = "CLIP_PIE_geometry_reconstruction" + icon='MESH_DATA').name = "CLIP_MT_geometry_reconstruction" -class CLIP_PIE_timecontrol_pie(Menu): +class CLIP_MT_timecontrol_pie(Menu): # Time Controls bl_label = "Time Control" @@ -262,16 +262,16 @@ class CLIP_PIE_timecontrol_pie(Menu): addon_keymaps = [] classes = ( - CLIP_PIE_geometry_reconstruction, - CLIP_PIE_tracking_pie, - CLIP_PIE_display_pie, - CLIP_PIE_proxy_pie, - CLIP_PIE_marker_pie, - CLIP_PIE_solver_pie, - CLIP_PIE_refine_pie, - CLIP_PIE_reconstruction_pie, - CLIP_PIE_clipsetup_pie, - CLIP_PIE_timecontrol_pie, + CLIP_MT_geometry_reconstruction, + CLIP_MT_tracking_pie, + CLIP_MT_display_pie, + CLIP_MT_proxy_pie, + CLIP_MT_marker_pie, + CLIP_MT_solver_pie, + CLIP_MT_refine_pie, + CLIP_MT_reconstruction_pie, + CLIP_MT_clipsetup_pie, + CLIP_MT_timecontrol_pie, ) @@ -287,27 +287,27 @@ def register(): km = wm.keyconfigs.addon.keymaps.new(name="Clip", space_type='CLIP_EDITOR') kmi = km.keymap_items.new("wm.call_menu_pie", 'Q', 'PRESS') - kmi.properties.name = "CLIP_PIE_marker_pie" + kmi.properties.name = "CLIP_MT_marker_pie" addon_keymaps.append((km, kmi)) kmi = km.keymap_items.new("wm.call_menu_pie", 'W', 'PRESS') - kmi.properties.name = "CLIP_PIE_clipsetup_pie" + kmi.properties.name = "CLIP_MT_clipsetup_pie" addon_keymaps.append((km, kmi)) kmi = km.keymap_items.new("wm.call_menu_pie", 'E', 'PRESS') - kmi.properties.name = "CLIP_PIE_tracking_pie" + kmi.properties.name = "CLIP_MT_tracking_pie" addon_keymaps.append((km, kmi)) kmi = km.keymap_items.new("wm.call_menu_pie", 'S', 'PRESS', shift=True) - kmi.properties.name = "CLIP_PIE_solver_pie" + kmi.properties.name = "CLIP_MT_solver_pie" addon_keymaps.append((km, kmi)) kmi = km.keymap_items.new("wm.call_menu_pie", 'W', 'PRESS', shift=True) - kmi.properties.name = "CLIP_PIE_reconstruction_pie" + kmi.properties.name = "CLIP_MT_reconstruction_pie" addon_keymaps.append((km, kmi)) kmi = km.keymap_items.new("wm.call_menu_pie", 'A', 'PRESS', shift=True) - kmi.properties.name = "CLIP_PIE_timecontrol_pie" + kmi.properties.name = "CLIP_MT_timecontrol_pie" addon_keymaps.append((km, kmi)) diff --git a/pie_menus_official/pie_manipulator_of.py b/pie_menus_official/pie_manipulator_of.py index 3bdc4e2a..42994083 100644 --- a/pie_menus_official/pie_manipulator_of.py +++ b/pie_menus_official/pie_manipulator_of.py @@ -42,9 +42,8 @@ class VIEW3D_manipulator_set_of(Operator): return {'FINISHED'} -class VIEW3D_PIE_manipulator_of(Menu): +class VIEW3D_MT_manipulator_of(Menu): bl_label = "Manipulator" - bl_idname = "view3d.manipulator_of" def draw(self, context): layout = self.layout @@ -58,7 +57,7 @@ class VIEW3D_PIE_manipulator_of(Menu): classes = ( VIEW3D_manipulator_set_of, - VIEW3D_PIE_manipulator_of, + VIEW3D_MT_manipulator_of, ) addon_keymaps = [] @@ -73,7 +72,7 @@ def register(): # Align km = wm.keyconfigs.addon.keymaps.new(name='Object Non-modal') kmi = km.keymap_items.new('wm.call_menu_pie', 'SPACE', 'PRESS', ctrl=True) - kmi.properties.name = "view3d.manipulator_of" + kmi.properties.name = VIEW3D_MT_manipulator_of.__name__ addon_keymaps.append((km, kmi)) diff --git a/pie_menus_official/pie_object_modes_of.py b/pie_menus_official/pie_object_modes_of.py index 34df5772..06ebbe6f 100644 --- a/pie_menus_official/pie_object_modes_of.py +++ b/pie_menus_official/pie_object_modes_of.py @@ -16,8 +16,7 @@ from bpy.types import Menu # Pie Object Mode - Tab -class VIEW3D_PIE_object_mode_of(Menu): - bl_idname = "pie.object_mode_of" +class VIEW3D_MT_object_mode_of(Menu): bl_label = "Mode" def draw(self, context): @@ -28,8 +27,8 @@ class VIEW3D_PIE_object_mode_of(Menu): classes = ( - VIEW3D_PIE_object_mode_of, - ) + VIEW3D_MT_object_mode_of, +) addon_keymaps = [] @@ -44,13 +43,13 @@ def register(): # Object Modes km = wm.keyconfigs.addon.keymaps.new(name='Object Non-modal') kmi = km.keymap_items.new('wm.call_menu_pie', 'TAB', 'PRESS') - kmi.properties.name = "pie.object_mode_of" + kmi.properties.name = VIEW3D_MT_object_mode_of.__name__ addon_keymaps.append((km, kmi)) # Grease Pencil Edit Modes km = wm.keyconfigs.addon.keymaps.new(name='Grease Pencil Stroke Edit Mode') kmi = km.keymap_items.new('wm.call_menu_pie', 'TAB', 'PRESS') - kmi.properties.name = "pie.object_mode_of" + kmi.properties.name = VIEW3D_MT_object_mode_of.__name__ addon_keymaps.append((km, kmi)) diff --git a/pie_menus_official/pie_pivot_of.py b/pie_menus_official/pie_pivot_of.py index ec48d359..12a86274 100644 --- a/pie_menus_official/pie_pivot_of.py +++ b/pie_menus_official/pie_pivot_of.py @@ -16,9 +16,8 @@ from bpy.types import Menu # Pie Pivot Mode - . key -class VIEW3D_PIE_pivot_of(Menu): +class VIEW3D_MT_pivot_of(Menu): bl_label = "Pivot" - bl_idname = "view3d.pivot_of" def draw(self, context): layout = self.layout @@ -30,8 +29,8 @@ class VIEW3D_PIE_pivot_of(Menu): classes = ( - VIEW3D_PIE_pivot_of, - ) + VIEW3D_MT_pivot_of, +) addon_keymaps = [] @@ -45,7 +44,7 @@ def register(): # Align km = wm.keyconfigs.addon.keymaps.new(name='Object Non-modal') kmi = km.keymap_items.new('wm.call_menu_pie', 'PERIOD', 'PRESS') - kmi.properties.name = "view3d.pivot_of" + kmi.properties.name = VIEW3D_MT_pivot_of.__name__ addon_keymaps.append((km, kmi)) diff --git a/pie_menus_official/pie_shade_of.py b/pie_menus_official/pie_shade_of.py index e637a490..157f40ab 100644 --- a/pie_menus_official/pie_shade_of.py +++ b/pie_menus_official/pie_shade_of.py @@ -16,9 +16,8 @@ from bpy.types import Menu # Pie Shade Mode - Z -class VIEW3D_PIE_shade_of(Menu): +class VIEW3D_MT_shade_of(Menu): bl_label = "Shade" - bl_idname = "pie.shade_of" def draw(self, context): layout = self.layout @@ -36,8 +35,8 @@ class VIEW3D_PIE_shade_of(Menu): classes = ( - VIEW3D_PIE_shade_of, - ) + VIEW3D_MT_shade_of, +) addon_keymaps = [] @@ -51,7 +50,7 @@ def register(): # Align km = wm.keyconfigs.addon.keymaps.new(name='Object Non-modal') kmi = km.keymap_items.new('wm.call_menu_pie', 'Z', 'PRESS') - kmi.properties.name = "pie.shade_of" + kmi.properties.name = VIEW3D_MT_shade_of.__name__ addon_keymaps.append((km, kmi)) diff --git a/pie_menus_official/pie_snap_of.py b/pie_menus_official/pie_snap_of.py index c360def3..eaf5be84 100644 --- a/pie_menus_official/pie_snap_of.py +++ b/pie_menus_official/pie_snap_of.py @@ -16,9 +16,8 @@ from bpy.types import Menu # Pie Snap Mode - . key -class VIEW3D_PIE_snap_of(Menu): +class VIEW3D_MT_snap_of(Menu): bl_label = "Snapping" - bl_idname = "view3d.snap_of" def draw(self, context): layout = self.layout @@ -30,7 +29,7 @@ class VIEW3D_PIE_snap_of(Menu): classes = ( - VIEW3D_PIE_snap_of, + VIEW3D_MT_snap_of, ) addon_keymaps = [] diff --git a/pie_menus_official/pie_view_of.py b/pie_menus_official/pie_view_of.py index 1c1f3df2..891db280 100644 --- a/pie_menus_official/pie_view_of.py +++ b/pie_menus_official/pie_view_of.py @@ -15,7 +15,7 @@ from bpy.types import Menu # Pie View Mode - Q -class VIEW3D_PIE_view_more_of(Menu): +class VIEW3D_MT_view_more_of(Menu): bl_label = "More" def draw(self, context): @@ -30,21 +30,21 @@ class VIEW3D_PIE_view_more_of(Menu): pie.operator("SCREEN_OT_region_quadview") -class VIEW3D_PIE_view_of(Menu): +class VIEW3D_MT_view_of(Menu): bl_label = "View" - bl_idname = "pie.view_of" def draw(self, context): layout = self.layout pie = layout.menu_pie() pie.operator_enum("VIEW3D_OT_view_axis", "type") - pie.operator("wm.call_menu_pie", text="More", icon='PLUS').name = "VIEW3D_PIE_view_more_of" + props = pie.operator("wm.call_menu_pie", text="More", icon='PLUS') + props.name = VIEW3D_MT_view_more_of.__name__ classes = ( - VIEW3D_PIE_view_more_of, - VIEW3D_PIE_view_of, + VIEW3D_MT_view_more_of, + VIEW3D_MT_view_of, ) addon_keymaps = [] @@ -60,7 +60,7 @@ def register(): # Align km = wm.keyconfigs.addon.keymaps.new(name='Object Non-modal') kmi = km.keymap_items.new('wm.call_menu_pie', 'Q', 'PRESS') - kmi.properties.name = "pie.view_of" + kmi.properties.name = VIEW3D_MT_view_of.__name__ addon_keymaps.append((km, kmi)) -- 2.11.4.GIT