[Bf-blender-cvs] [43500671dc7] master: Normal UI: Remove normals toolbar and add/muliply menu options.

Howard Trickey noreply at git.blender.org
Mon May 20 14:57:27 CEST 2019


Commit: 43500671dc7227df1a557ec6109a3323ee4ba348
Author: Howard Trickey
Date:   Mon May 20 08:51:18 2019 -0400
Branches: master
https://developer.blender.org/rB43500671dc7227df1a557ec6109a3323ee4ba348

Normal UI: Remove normals toolbar and add/muliply menu options.

See T64324 for discussion re improving normal editing ui.
As next step, remove the face_strength tool settings because
menu operator now includes that. Move face_strenth enum to
better place.
Remove normals toolbar panel because only thing left
(normal_vector) can stay hidden for copy/paste.
Remove add vector and multiply vector menu entries as
they are useless without ui method for specifying operand,
and they are very low utility operations anyway.

===================================================================

M	release/scripts/startup/bl_ui/space_view3d.py
M	release/scripts/startup/bl_ui/space_view3d_toolbar.py
M	source/blender/bmesh/intern/bmesh_operators.h
M	source/blender/makesdna/DNA_scene_types.h
M	source/blender/makesrna/intern/rna_scene.c
M	source/blender/modifiers/intern/MOD_weighted_normal.c

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 2d27ef134d8..ac622da8a4c 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -3819,8 +3819,6 @@ class VIEW3D_MT_edit_mesh_normals(Menu):
 
         layout.operator("mesh.normals_tools", text="Copy Vectors").mode = 'COPY'
         layout.operator("mesh.normals_tools", text="Paste Vectors").mode = 'PASTE'
-        layout.operator("mesh.normals_tools", text="Add Vectors").mode = 'ADD'
-        layout.operator("mesh.normals_tools", text="Multiply Vectors").mode = 'MULTIPLY'
 
         layout.operator("mesh.smoothen_normals", text="Smoothen Vectors")
         layout.operator("mesh.normals_tools", text="Reset Vectors").mode = 'RESET'
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 76a0cbb8533..dd9f09f0a45 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -1621,22 +1621,6 @@ class VIEW3D_PT_tools_particlemode_options_display(View3DPanel, Panel):
             sub.prop(pe, "fade_frames", slider=True)
 
 
-class VIEW3D_PT_tools_meshedit_normal(View3DPanel, Panel):
-    bl_category = "Tool"
-    bl_context = ".mesh_edit"
-    bl_label = "Normals"
-    bl_options = {'DEFAULT_CLOSED'}
-
-    def draw(self, context):
-        layout = self.layout
-        layout.use_property_split = True
-        layout.use_property_decorate = False  # No animation.
-
-        tool_settings = context.tool_settings
-
-        layout.prop(tool_settings, "normal_vector", text="Normal Vector")
-        layout.prop(tool_settings, "face_strength", text="Face Strength")
-
 # ********** grease pencil object tool panels ****************
 
 # Grease Pencil drawing brushes
@@ -2044,7 +2028,6 @@ class VIEW3D_PT_gpencil_brush_presets(PresetPanel, Panel):
 
 
 classes = (
-    VIEW3D_PT_tools_meshedit_normal,
     VIEW3D_PT_tools_meshedit_options,
     VIEW3D_PT_tools_curveedit_options_stroke,
     VIEW3D_PT_tools_armatureedit_options,
diff --git a/source/blender/bmesh/intern/bmesh_operators.h b/source/blender/bmesh/intern/bmesh_operators.h
index 0279e4dd23e..78e8ce04115 100644
--- a/source/blender/bmesh/intern/bmesh_operators.h
+++ b/source/blender/bmesh/intern/bmesh_operators.h
@@ -126,6 +126,13 @@ enum {
   BEVEL_MITER_ARC,
 };
 
+/* Normal Face Strength values */
+enum {
+  FACE_STRENGTH_WEAK = -16384,
+  FACE_STRENGTH_MEDIUM = 0,
+  FACE_STRENGTH_STRONG = 16384,
+};
+
 extern const BMOpDefine *bmo_opdefines[];
 extern const int bmo_opdefines_total;
 
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index 0f6d028ea35..611a52774c7 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -1499,7 +1499,7 @@ typedef struct ToolSettings {
 
   /* Normal Editing */
   float normal_vector[3];
-  int face_strength;
+  char _pad6[4];
 } ToolSettings;
 
 /* *************************************************************** */
@@ -2089,13 +2089,6 @@ enum {
   OB_DRAW_GROUPUSER_ALL = 2,
 };
 
-/* toolsettings->face_strength */
-enum {
-  FACE_STRENGTH_WEAK = -16384,
-  FACE_STRENGTH_MEDIUM = 0,
-  FACE_STRENGTH_STRONG = 16384,
-};
-
 /* object_vgroup.c */
 /* ToolSettings.vgroupsubset */
 typedef enum eVGroupSelect {
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index a4d263b7927..7e14817fd4d 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -3167,10 +3167,6 @@ static void rna_def_tool_settings(BlenderRNA *brna)
   RNA_def_property_ui_text(prop, "Normal Vector", "Normal Vector used to copy, add or multiply");
   RNA_def_property_ui_range(prop, -10000.0, 10000.0, 1, 3);
 
-  prop = RNA_def_property(srna, "face_strength", PROP_ENUM, PROP_NONE);
-  RNA_def_property_enum_items(prop, mod_weighted_strength);
-  RNA_def_property_ui_text(prop, "Face Strength", "Set strength of face to specified value");
-
   /* Unified Paint Settings */
   prop = RNA_def_property(srna, "unified_paint_settings", PROP_POINTER, PROP_NONE);
   RNA_def_property_flag(prop, PROP_NEVER_NULL);
diff --git a/source/blender/modifiers/intern/MOD_weighted_normal.c b/source/blender/modifiers/intern/MOD_weighted_normal.c
index 7fbaa24b579..0accbe607eb 100644
--- a/source/blender/modifiers/intern/MOD_weighted_normal.c
+++ b/source/blender/modifiers/intern/MOD_weighted_normal.c
@@ -35,6 +35,8 @@
 #include "MOD_modifiertypes.h"
 #include "MOD_util.h"
 
+#include "bmesh.h"
+
 #define CLNORS_VALID_VEC_LEN (1e-6f)
 
 typedef struct ModePair {



More information about the Bf-blender-cvs mailing list