Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py13
-rw-r--r--source/blender/bmesh/intern/bmesh_mesh.c4
2 files changed, 12 insertions, 5 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 33fc3ad28d6..3f67dbd9d6f 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -3786,6 +3786,16 @@ class VIEW3D_MT_edit_mesh_normals_set_strength(Menu):
op.set = True
op.face_strength = 'STRONG'
+class VIEW3D_MT_edit_mesh_normals_average(Menu):
+ bl_label = "Average"
+
+ def draw(self, _context):
+ layout = self.layout
+
+ layout.operator("mesh.average_normals", text="Custom Normal").average_type = 'CUSTOM_NORMAL'
+ layout.operator("mesh.average_normals", text="Face Area").average_type = 'FACE_AREA'
+ layout.operator("mesh.average_normals", text="Corner Angle").average_type = 'CORNER_ANGLE'
+
class VIEW3D_MT_edit_mesh_normals(Menu):
bl_label = "Normals"
@@ -3803,7 +3813,7 @@ class VIEW3D_MT_edit_mesh_normals(Menu):
layout.operator("mesh.point_normals", text="Point to Target")
layout.operator("mesh.merge_normals", text="Merge")
layout.operator("mesh.split_normals", text="Split")
- layout.operator("mesh.average_normals", text="Average")
+ layout.menu("VIEW3D_MT_edit_mesh_normals_average", text="Average")
layout.separator()
@@ -6489,6 +6499,7 @@ classes = (
VIEW3D_MT_edit_mesh_normals,
VIEW3D_MT_edit_mesh_normals_select_strength,
VIEW3D_MT_edit_mesh_normals_set_strength,
+ VIEW3D_MT_edit_mesh_normals_average,
VIEW3D_MT_edit_mesh_shading,
VIEW3D_MT_edit_mesh_weights,
VIEW3D_MT_edit_mesh_clean,
diff --git a/source/blender/bmesh/intern/bmesh_mesh.c b/source/blender/bmesh/intern/bmesh_mesh.c
index cb10ec9d701..a35d10db697 100644
--- a/source/blender/bmesh/intern/bmesh_mesh.c
+++ b/source/blender/bmesh/intern/bmesh_mesh.c
@@ -1440,7 +1440,6 @@ static int bm_loop_normal_mark_indiv(BMesh *bm, BLI_bitmap *loops)
* Note that this is OnĀ² piece of code,
* but it is not designed to be used with huge selection sets,
* rather with only a few items selected at most.*/
- printf("using face history selection\n");
/* Goes from last selected to the first selected element. */
for (ese = bm->selected.last; ese; ese = ese->prev) {
if (ese->htype == BM_FACE) {
@@ -1473,7 +1472,6 @@ static int bm_loop_normal_mark_indiv(BMesh *bm, BLI_bitmap *loops)
else {
if (sel_faces) {
/* Only select all loops of selected faces. */
- printf("using face selection\n");
BMLoop *l;
BMFace *f;
BMIter liter, fiter;
@@ -1487,7 +1485,6 @@ static int bm_loop_normal_mark_indiv(BMesh *bm, BLI_bitmap *loops)
}
if (sel_edges) {
/* Only select all loops of selected edges. */
- printf("using edge selection\n");
BMLoop *l;
BMEdge *e;
BMIter liter, eiter;
@@ -1510,7 +1507,6 @@ static int bm_loop_normal_mark_indiv(BMesh *bm, BLI_bitmap *loops)
}
if (sel_verts) {
/* Select all loops of selected verts. */
- printf("using vert selection\n");
BMLoop *l;
BMVert *v;
BMIter liter, viter;