[Bf-extensions-cvs] [64852088] master: Edit Tools 2: Massive update - Initial stage
lijenstina
noreply at git.blender.org
Wed Feb 8 10:25:03 CET 2017
Commit: 648520881902aad8d8d5f03773d992e6d330619a
Author: lijenstina
Date: Wed Feb 8 10:19:03 2017 +0100
Branches: master
https://developer.blender.org/rBAC648520881902aad8d8d5f03773d992e6d330619a
Edit Tools 2: Massive update - Initial stage
Pep 8 Cleanup, remove unused imports, variables
Consistent style across scripts
Fixed several crashes
Removed some unused / not needed operators
Refactor of certain operators - pass variables to one
most notably - the Help system
UI fixes and consistency
Various smaller fixes in scripts
Part of the task T50357
Notes for some possible TODOs:
1. Intersect_Line_Face operator in mesh_edgetools
probably will need removal before release - as it is used
for testing only
2. Working context of pkhg_faces currently Object mode
3. mesh_edge_roundifier a function returns NaN - line 95
4. Register of the shortcuts/ modules for Pen Tool And VFE specials
why they are separate? Does it influence reload with F8?
Testing is welcomed :)
===================================================================
M mesh_extra_tools/__init__.py
M mesh_extra_tools/face_inset_fillet.py
M mesh_extra_tools/mesh_cut_faces.py
M mesh_extra_tools/mesh_edge_roundifier.py
M mesh_extra_tools/mesh_edges_length.py
M mesh_extra_tools/mesh_edgetools.py
M mesh_extra_tools/mesh_fastloop.py
M mesh_extra_tools/mesh_filletplus.py
A mesh_extra_tools/mesh_help.py
M mesh_extra_tools/mesh_mextrude_plus.py
M mesh_extra_tools/mesh_offset_edges.py
M mesh_extra_tools/mesh_pen_tool.py
M mesh_extra_tools/mesh_select_tools/__init__.py
M mesh_extra_tools/mesh_select_tools/mesh_index_select.py
M mesh_extra_tools/mesh_select_tools/mesh_info_select.py
M mesh_extra_tools/mesh_select_tools/mesh_select_by_direction.py
M mesh_extra_tools/mesh_select_tools/mesh_select_by_edge_length.py
M mesh_extra_tools/mesh_select_tools/mesh_select_by_pi.py
M mesh_extra_tools/mesh_select_tools/mesh_select_by_type.py
M mesh_extra_tools/mesh_select_tools/mesh_select_connected_faces.py
M mesh_extra_tools/mesh_select_tools/mesh_selection_topokit.py
M mesh_extra_tools/mesh_to_wall.py
M mesh_extra_tools/mesh_vertex_chamfer.py
M mesh_extra_tools/pkhg_faces.py
M mesh_extra_tools/random_vertices.py
M mesh_extra_tools/split_solidify.py
M mesh_extra_tools/vfe_specials.py
===================================================================
diff --git a/mesh_extra_tools/__init__.py b/mesh_extra_tools/__init__.py
index f0130c46..9f7a704f 100644
--- a/mesh_extra_tools/__init__.py
+++ b/mesh_extra_tools/__init__.py
@@ -15,32 +15,24 @@
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####
-# Contributed to by
+
+# Contributed to by:
# meta-androcto, Hidesato Ikeya, zmj100, luxuy_BlenderCN, TrumanBlending, PKHG, #
-# Oscurart, Stanislav Blinov, komi3D, BlenderLab, Paul Marshall (brikbot), metalliandy, #
-# macouno, CoDEmanX, dustractor, Liero, #
+# Oscurart, Greg, Stanislav Blinov, komi3D, BlenderLab, Paul Marshall (brikbot), #
+# metalliandy, macouno, CoDEmanX, dustractor, Liero, lijenstina #
bl_info = {
- "name": "Edit Tools2",
+ "name": "Edit Tools 2",
"author": "meta-androcto",
- "version": (0, 2, 0),
+ "version": (0, 3, 1),
"blender": (2, 77, 0),
- "location": "View3D > Toolshelf > Tools & Specials (W-key)",
- "description": "Add extra mesh edit tools",
+ "location": "View3D > Toolshelf > Tools and Specials (W-key)",
+ "description": "Extra mesh edit tools - modifying meshes and selection",
"warning": "",
"wiki_url": "",
"tracker_url": "https://developer.blender.org/maniphest/task/edit/form/2/",
"category": "Mesh"}
-# Import From Folder
-from .mesh_select_tools import mesh_select_by_direction
-from .mesh_select_tools import mesh_select_by_edge_length
-from .mesh_select_tools import mesh_select_by_pi
-from .mesh_select_tools import mesh_select_by_type
-from .mesh_select_tools import mesh_select_connected_faces
-from .mesh_select_tools import mesh_index_select
-from .mesh_select_tools import mesh_selection_topokit
-from .mesh_select_tools import mesh_info_select
# Import From Files
if "bpy" in locals():
@@ -61,6 +53,16 @@ if "bpy" in locals():
importlib.reload(mesh_edgetools)
importlib.reload(mesh_pen_tool)
importlib.reload(vfe_specials)
+ importlib.reload(mesh_help)
+
+ importlib.reload(mesh_select_by_direction)
+ importlib.reload(mesh_select_by_edge_length)
+ importlib.reload(mesh_select_by_pi)
+ importlib.reload(mesh_select_by_type)
+ importlib.reload(mesh_select_connected_faces)
+ importlib.reload(mesh_index_select)
+ importlib.reload(mesh_selection_topokit)
+ importlib.reload(mesh_info_select)
else:
from . import face_inset_fillet
@@ -79,15 +81,35 @@ else:
from . import mesh_edgetools
from . import mesh_pen_tool
from . import vfe_specials
+ from . import mesh_help
-import bpy
-from bpy.props import BoolProperty
-from bpy_extras import view3d_utils
-### ------ MENUS ====== ###
-
+ from .mesh_select_tools import mesh_select_by_direction
+ from .mesh_select_tools import mesh_select_by_edge_length
+ from .mesh_select_tools import mesh_select_by_pi
+ from .mesh_select_tools import mesh_select_by_type
+ from .mesh_select_tools import mesh_select_connected_faces
+ from .mesh_select_tools import mesh_index_select
+ from .mesh_select_tools import mesh_selection_topokit
+ from .mesh_select_tools import mesh_info_select
-class VIEW3D_MT_edit_mesh_extras(bpy.types.Menu):
- # Define the "Extras" menu
+import bpy
+from bpy.types import (
+ Menu,
+ Panel,
+ PropertyGroup,
+ AddonPreferences,
+ )
+from bpy.props import (
+ BoolProperty,
+ IntVectorProperty,
+ PointerProperty,
+ )
+
+
+# ------ MENUS ------ #
+
+# Define the "Extras" menu
+class VIEW3D_MT_edit_mesh_extras(Menu):
bl_idname = "VIEW3D_MT_edit_mesh_extras"
bl_label = "Edit Tools"
@@ -95,418 +117,470 @@ class VIEW3D_MT_edit_mesh_extras(bpy.types.Menu):
layout = self.layout
layout.operator_context = 'INVOKE_REGION_WIN'
mode = context.tool_settings.mesh_select_mode
+
if mode[0]:
split = layout.split()
col = split.column()
- col.label(text="Vert")
- col.operator("mesh.vertex_chamfer",
- text="Vertex Chamfer")
- col.operator("mesh.random_vertices",
- text="Random Vertices")
- row = split.row(align=True)
+ col.label(text="Vertex", icon="VERTEXSEL")
+ col.separator()
+
+ col.operator("mesh.vertex_chamfer", text="Vertex Chamfer")
+ col.operator("mesh.random_vertices", text="Random Vertices")
+
col = split.column()
- col.label(text="Utilities")
- col.operator("object_ot.fastloop",
- text="Fast loop")
- col.operator('mesh.flip_normals', text='Normals Flip')
- col.operator('mesh.remove_doubles', text='Remove Doubles')
- col.operator('mesh.subdivide', text='Subdivide')
- col.operator('mesh.dissolve_limited', text='Dissolve Limited')
+ col.label(text="Utilities", icon="SCRIPTWIN")
+ col.separator()
+
+ col.operator("object_ot.fastloop", text="Fast loop")
+ col.operator("mesh.flip_normals", text="Normals Flip")
+ col.operator("mesh.remove_doubles", text="Remove Doubles")
+ col.operator("mesh.subdivide", text="Subdivide")
+ col.operator("mesh.dissolve_limited", text="Dissolve Limited")
elif mode[1]:
split = layout.split()
col = split.column()
- col.label(text="Edge")
- col.operator("fillet.op0_id",
- text="Edge Fillet Plus")
- col.operator("mesh.offset_edges",
- text="Offset Edges")
- col.operator("mesh.edge_roundifier",
- text="Edge Roundify")
- col.operator("object.mesh_edge_length_set",
- text="Set Edge Length")
- col.operator("bpt.mesh_to_wall",
- text="Edge(s) to Wall")
- row = split.row(align=True)
+ col.label(text="Edge", icon="EDGESEL")
+ col.separator()
+
+ col.operator("mesh.fillet_plus", text="Edge Fillet Plus")
+ col.operator("mesh.offset_edges", text="Offset Edges")
+ col.operator("mesh.edge_roundifier", text="Edge Roundify")
+ col.operator("object.mesh_edge_length_set", text="Set Edge Length")
+ col.operator("bpt.mesh_to_wall", text="Edge(s) to Wall")
+
col = split.column()
- col.label(text="Utilities")
- col.operator("object_ot.fastloop",
- text="Fast loop")
- col.operator('mesh.flip_normals', text='Normals Flip')
- col.operator('mesh.remove_doubles', text='Remove Doubles')
+ col.label(text="Utilities", icon="SCRIPTWIN")
+ col.separator()
- col.operator('mesh.subdivide', text='Subdivide')
- col.operator('mesh.dissolve_limited', text='Dissolve Limited')
+ col.operator("object_ot.fastloop", text="Fast loop")
+ col.operator("mesh.flip_normals", text="Normals Flip")
+ col.operator("mesh.remove_doubles", text="Remove Doubles")
+
+ col.operator("mesh.subdivide", text="Subdivide")
+ col.operator("mesh.dissolve_limited", text="Dissolve Limited")
elif mode[2]:
split = layout.split()
col = split.column()
- col.label(text="Face")
- col.operator("object.mextrude",
- text="Multi Extrude")
- col.operator("faceinfillet.op0_id",
- text="Face Inset Fillet")
- col.operator("mesh.add_faces_to_object",
- text="PKHG Faces")
- col.operator("mesh.ext_cut_faces",
- text="Cut Faces")
- col.operator("sp_sol.op0_id",
- text="Split Solidify")
-
- row = split.row(align=True)
+ col.label(text="Face", icon="FACESEL")
+ col.separator()
+
+ col.operator("object.mextrude", text="Multi Extrude")
+ col.operator("mesh.face_inset_fillet", text="Face Inset Fillet")
+ col.operator("mesh.add_faces_to_object", text="PKHG Faces")
+ col.operator("mesh.ext_cut_faces", text="Cut Faces")
+ col.operator("mesh.split_solidify", text="Split Solidify")
+
col = split.column()
- col.label(text="Utilities")
- col.operator("object_ot.fastloop",
- text="Fast loop")
- col.operator('mesh.flip_normals', text='Normals Flip')
- col.operator('mesh.remove_doubles', text='Remove Doubles')
- col.operator('mesh.subdivide', text='Subdivide')
- col.operator('mesh.dissolve_limited', text='Dissolve Limited')
-
-class EditToolsPanel(bpy.types.Panel):
- bl_label = 'Mesh Edit Tools'
- bl_space_type = 'VIEW_3D'
- bl_region_type = 'TOOLS'
- bl_context = 'mesh_edit'
- bl_category = 'Tools'
- bl_options = {'DEFAULT_CLOSED'}
+ col.label(text="Utilities", icon="SCRIPTWIN")
+ col.separator()
+
+ col.operator("object_ot.fastloop", text="Fast loop")
+ col.operator("mesh.flip_normals", text="Normals Flip")
+ col.operator("mesh.remove_doubles", text="Remove Doubles")
+ col.operator("mesh.subdivide", text="Subdivide")
+ col.operator("mesh.dissolve_limited", text="Dissolve Limited")
+
+
+class EditToolsPanel(Panel):
+ bl_label = "Mesh Edit Tools"
+ bl_space_type = "VIEW_3D"
+ bl_region_type = "TOOLS"
+ bl_context = "mesh_edit"
+ bl_category = "Tools"
+ bl_options = {"DEFAULT_CLOSED"}
def draw(self, context):
scene = context.scene
- VERTDROP = scene.UTVertDrop
- EDGEDROP = scene.UTEdgeDrop
- FACEDROP = scene.UTFaceDrop
- UTILS1DROP = scene.UTUtils1Drop
- view = context.space_data
- toolsettings = context.tool_settings
+ VERTDROP = scene.mesh_extra_tools.UTVertDrop
+ EDGEDROP = scene.mesh_extra_tools.UTEdgeDrop
+ FACEDROP = scene.mesh_extra_tools.UTFaceDrop
+ UTILSDROP =
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-extensions-cvs
mailing list