[Bf-extensions-cvs] [4e7b694e] master: viewport pies: remove snap, orientation, clean up: T67995
meta-androcto
noreply at git.blender.org
Sat Aug 24 06:06:00 CEST 2019
Commit: 4e7b694ee44060373ae20dd2e71644a1230dd569
Author: meta-androcto
Date: Sat Aug 24 14:05:31 2019 +1000
Branches: master
https://developer.blender.org/rBA4e7b694ee44060373ae20dd2e71644a1230dd569
viewport pies: remove snap, orientation, clean up: T67995
===================================================================
M space_view3d_pie_menus/__init__.py
M space_view3d_pie_menus/pie_modes_menu.py
D space_view3d_pie_menus/pie_orientation_menu.py
M space_view3d_pie_menus/pie_save_open_menu.py
D space_view3d_pie_menus/pie_snap_menu.py
===================================================================
diff --git a/space_view3d_pie_menus/__init__.py b/space_view3d_pie_menus/__init__.py
index cdb9a9e5..a8eb7d00 100644
--- a/space_view3d_pie_menus/__init__.py
+++ b/space_view3d_pie_menus/__init__.py
@@ -45,20 +45,19 @@ bl_info = {
}
sub_modules_names = (
- "pie_modes_menu",
- "pie_views_numpad_menu",
- "pie_sculpt_menu",
- "pie_origin",
- "pie_manipulator_menu",
- "pie_snap_menu",
- "pie_shading_menu",
"pie_align_menu",
- "pie_delete_menu",
- "pie_apply_transform_menu",
- "pie_select_menu",
"pie_animation_menu",
- "pie_save_open_menu",
+ "pie_apply_transform_menu",
+ "pie_delete_menu",
"pie_editor_switch_menu",
+ "pie_manipulator_menu",
+ "pie_modes_menu",
+ "pie_origin",
+ "pie_save_open_menu",
+ "pie_sculpt_menu",
+ "pie_select_menu",
+ "pie_shading_menu",
+ "pie_views_numpad_menu",
)
diff --git a/space_view3d_pie_menus/pie_modes_menu.py b/space_view3d_pie_menus/pie_modes_menu.py
index 0b68c79e..bcaf4af6 100644
--- a/space_view3d_pie_menus/pie_modes_menu.py
+++ b/space_view3d_pie_menus/pie_modes_menu.py
@@ -178,57 +178,6 @@ class PIE_OT_ClassFace(Operator):
return {'FINISHED'}
-class PIE_OT_VertsEdges(Operator):
- bl_idname = "verts.edges"
- bl_label = "Verts Edges"
- bl_description = "Vert/Edge Select Mode"
- bl_options = {'REGISTER', 'UNDO'}
-
- def execute(self, context):
- if context.object.mode != "EDIT":
- bpy.ops.object.mode_set(mode="EDIT")
- bpy.ops.mesh.select_mode(use_extend=False, use_expand=False, type='VERT')
- if bpy.ops.mesh.select_mode != "VERT, EDGE, FACE":
- bpy.ops.object.mode_set(mode="EDIT")
- bpy.ops.mesh.select_mode(use_extend=False, use_expand=False, type='VERT')
- bpy.ops.mesh.select_mode(use_extend=True, use_expand=False, type='EDGE')
- return {'FINISHED'}
-
-
-class PIE_OT_EdgesFaces(Operator):
- bl_idname = "edges.faces"
- bl_label = "EdgesFaces"
- bl_description = "Edge/Face Select Mode"
- bl_options = {'REGISTER', 'UNDO'}
-
- def execute(self, context):
- if context.object.mode != "EDIT":
- bpy.ops.object.mode_set(mode="EDIT")
- bpy.ops.mesh.select_mode(use_extend=False, use_expand=False, type='EDGE')
- if bpy.ops.mesh.select_mode != "VERT, EDGE, FACE":
- bpy.ops.object.mode_set(mode="EDIT")
- bpy.ops.mesh.select_mode(use_extend=False, use_expand=False, type='EDGE')
- bpy.ops.mesh.select_mode(use_extend=True, use_expand=False, type='FACE')
- return {'FINISHED'}
-
-
-class PIE_OT_VertsFaces(Operator):
- bl_idname = "verts.faces"
- bl_label = "Verts Faces"
- bl_description = "Vert/Face Select Mode"
- bl_options = {'REGISTER', 'UNDO'}
-
- def execute(self, context):
- if context.object.mode != "EDIT":
- bpy.ops.object.mode_set(mode="EDIT")
- bpy.ops.mesh.select_mode(use_extend=False, use_expand=False, type='VERT')
- if bpy.ops.mesh.select_mode != "VERT, EDGE, FACE":
- bpy.ops.object.mode_set(mode="EDIT")
- bpy.ops.mesh.select_mode(use_extend=False, use_expand=False, type='VERT')
- bpy.ops.mesh.select_mode(use_extend=True, use_expand=False, type='FACE')
- return {'FINISHED'}
-
-
class PIE_OT_VertsEdgesFaces(Operator):
bl_idname = "verts.edgesfaces"
bl_label = "Verts Edges Faces"
@@ -280,9 +229,6 @@ class PIE_MT_ObjectEditotherModes(Menu):
box.operator("class.vertex", text="Vertex", icon='VERTEXSEL')
box.operator("class.edge", text="Edge", icon='EDGESEL')
box.operator("class.face", text="Face", icon='FACESEL')
- box.operator("verts.faces", text="Vertex/Faces", icon='VERTEXSEL')
- box.operator("verts.edges", text="Vertex/Edges", icon='EDGESEL')
- box.operator("edges.faces", text="Edges/Faces", icon='FACESEL')
box.operator("verts.edgesfaces", text="Vertex/Edges/Faces", icon='OBJECT_DATAMODE')
@@ -309,17 +255,17 @@ class PIE_MT_ObjectEditMode(Menu):
'PARTICLE_EDIT', 'GPENCIL_EDIT'}:
pie = layout.menu_pie()
# 4 - LEFT
- pie.operator("class.pievertexpaint", text="Vertex Paint", icon='VPAINT_HLT')
+ pie.operator("class.pieweightpaint", text="Weight Paint", icon='WPAINT_HLT')
# 6 - RIGHT
pie.operator("class.pietexturepaint", text="Texture Paint", icon='TPAINT_HLT')
# 2 - BOTTOM
- pie.menu("MENU_MT_objecteditmodeothermodes", text="Vert,Edge,Face Modes", icon='EDITMODE_HLT')
+ pie.menu("MENU_MT_objecteditmodeothermodes", text="Edit Modes", icon='EDITMODE_HLT')
# 8 - TOP
pie.operator("class.object", text="Object/Edit Toggle", icon='OBJECT_DATAMODE')
# 7 - TOP - LEFT
pie.operator("sculpt.sculptmode_toggle", text="Sculpt", icon='SCULPTMODE_HLT')
# 9 - TOP - RIGHT
- pie.operator("class.pieweightpaint", text="Weight Paint", icon='WPAINT_HLT')
+ pie.operator("class.pievertexpaint", text="Vertex Paint", icon='VPAINT_HLT')
# 1 - BOTTOM - LEFT
if context.object.particle_systems:
pie.operator("class.pieparticleedit", text="Particle Edit", icon='PARTICLEMODE')
@@ -332,7 +278,7 @@ class PIE_MT_ObjectEditMode(Menu):
elif ob and ob.type == 'MESH' and ob.mode in {'EDIT'}:
pie = layout.menu_pie()
# 4 - LEFT
- pie.operator("class.pievertexpaint", text="Vertex Paint", icon='VPAINT_HLT')
+ pie.operator("class.pieweightpaint", text="Weight Paint", icon='WPAINT_HLT')
# 6 - RIGHT
pie.operator("class.pietexturepaint", text="Texture Paint", icon='TPAINT_HLT')
# 2 - BOTTOM
@@ -342,7 +288,7 @@ class PIE_MT_ObjectEditMode(Menu):
# 7 - TOP - LEFT
pie.operator("sculpt.sculptmode_toggle", text="Sculpt", icon='SCULPTMODE_HLT')
# 9 - TOP - RIGHT
- pie.operator("class.pieweightpaint", text="Weight Paint", icon='WPAINT_HLT')
+ pie.operator("class.pievertexpaint", text="Vertex Paint", icon='VPAINT_HLT')
# 1 - BOTTOM - LEFT
if context.object.particle_systems:
pie.operator("class.pieparticleedit", text="Particle Edit", icon='PARTICLEMODE')
@@ -484,9 +430,6 @@ classes = (
PIE_OT_ClassVertexPaint,
PIE_OT_ClassParticleEdit,
PIE_OT_InteractiveModeGreasePencil,
- PIE_OT_VertsEdges,
- PIE_OT_EdgesFaces,
- PIE_OT_VertsFaces,
PIE_OT_VertsEdgesFaces,
PIE_OT_SetObjectModePie,
)
diff --git a/space_view3d_pie_menus/pie_orientation_menu.py b/space_view3d_pie_menus/pie_orientation_menu.py
deleted file mode 100644
index 2b8dd844..00000000
--- a/space_view3d_pie_menus/pie_orientation_menu.py
+++ /dev/null
@@ -1,87 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-# <pep8 compliant>
-
-"""Replace default list-style menu for transform orientations with a pie."""
-
-bl_info = {
- "name": "Hotkey: 'Alt + Spacebar'",
- "author": "Italic_",
- "version": (1, 1, 0),
- "blender": (2, 80, 0),
- "description": "Set Transform Orientations",
- "location": "3D View",
- "category": "Orientation Pie"}
-
-import bpy
-from bpy.types import (
- Menu,
- Operator,
- )
-from bpy.props import (
- StringProperty,
- )
-
-
-class PIE_MT_OrientPie(Menu):
- bl_label = "Transform Orientation"
- bl_idname = "PIE_MT_orient"
-
- def draw(self, context):
- layout = self.layout
- pie = layout.menu_pie()
- scene = context.scene
-
- pie.prop(scene.transform_orientation_slots[0], "type", expand=True)
-
-
-addon_keymaps = []
-
-classes = (
- PIE_MT_OrientPie,
- )
-
-
-def register():
- for cls in classes:
- bpy.utils.register_class(cls)
-
- wm = bpy.context.window_manager
- if wm.keyconfigs.addon:
- # Manipulators
- km = wm.keyconfigs.addon.keymaps.new(name='3D View Generic', space_type='VIEW_3D')
- kmi = km.keymap_items.new('wm.call_menu_pie', 'SPACE', 'PRESS', alt=True)
- kmi.properties.name = "PIE_MT_orient"
- addon_keymaps.append((km, kmi))
-
-
-def unregister():
- for cls in classes:
- bpy.utils.unregister_class(cls)
-
- wm = bpy.context.window_manager
- kc = wm.keyconfigs.addon
- if kc:
- for km, kmi in addon_keymaps:
- km.keymap_items.remove(kmi)
- addon_keymaps.clear()
-
-
-if __name__ == "__main__":
- register()
diff --git a/space_view3d_pie_menus/pie_save_open_menu.py b/space_view3d_pie_menus/pie_save_open_menu.py
index 29fe67a2..9e02b321 100644
--- a/space_view3d_pie_menus/pie_save_open_menu.py
+++ b/space_view3d_pie_menus/pie_save_open_menu.py
@@ -35,9 +35,8 @@ from bpy.types import (
)
import os
-# Pie Save/Open
-
+# Pie Save/Open
class PIE_MT_SaveOpen(Menu):
bl_idname = "PIE_MT_saveopen"
bl_label = "Pie Save/Open"
@@ -48,17 +47,17 @@ class PIE_MT_SaveOpen(Menu):
# 4 - LEFT
pie.operator("wm.read_homefile", text="New", icon='FILE_NEW')
# 6 - RIGHT
- pie.menu("PIE_MT_link", text="Link", icon='LINK_BLEND')
+ pie.menu("PIE_MT_link", text="Link Menu", icon='LINK_BLEND')
# 2 - BOTTOM
pie.menu("PIE_M
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-extensions-cvs
mailing list