[Bf-blender-cvs] [8c48de561fa] soc-2019-bevel-profiles: Bevel modifier: Display optimization

Hans Goudey noreply at git.blender.org
Tue Aug 6 19:54:35 CEST 2019


Commit: 8c48de561fa67787db7b5cf5ab1929418f92fff3
Author: Hans Goudey
Date:   Tue Aug 6 13:52:53 2019 -0400
Branches: soc-2019-bevel-profiles
https://developer.blender.org/rB8c48de561fa67787db7b5cf5ab1929418f92fff3

Bevel modifier: Display optimization

Only reinitialize the sampled segments table for the display profile
widget when the number of samples has changed.

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

M	release/scripts/startup/bl_ui/properties_data_modifier.py
M	source/blender/makesrna/intern/rna_modifier.c

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

diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py
index e338af3a602..58d3a18e994 100644
--- a/release/scripts/startup/bl_ui/properties_data_modifier.py
+++ b/release/scripts/startup/bl_ui/properties_data_modifier.py
@@ -176,10 +176,10 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
         layout.row().prop(md, "use_custom_profile")
         if md.use_custom_profile:
             layout.template_profilewidget(md, "prwdgt")
-            # For drawing the sampled segment positions in the profile widget itself. This has to
-            # be done here before the ProfileWidget that the bevel code uses is copied from the
-            # original
-            md.prwdgt.initialize(md.segments)
+            # If the number of segments has changed update the table to show the new sampled
+            # segment locations on the widget
+            if md.prwdgt.totsegments != md.segments:
+                md.prwdgt.initialize(md.segments)
 
     def BOOLEAN(self, layout, _ob, md):
         split = layout.split()
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index e103e8affc9..c92e0ac2ce3 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -3515,7 +3515,7 @@ static void rna_def_modifier_bevel(BlenderRNA *brna)
   static EnumPropertyItem prop_vmesh_method_items[] = {
       {MOD_BEVEL_VMESH_ADJ, "ADJ", 0, "Grid Fill", "Default patterned fill"},
       {MOD_BEVEL_VMESH_CUTOFF, "CUTOFF", 0, "Cutoff",
-       "A cut-off at each profile's end before the intersection"},
+       "A cut-off at the end of each profile before the intersection"},
       {0, NULL, 0, NULL, NULL},
   };
 
@@ -3589,8 +3589,8 @@ static void rna_def_modifier_bevel(BlenderRNA *brna)
   prop = RNA_def_property(srna, "material", PROP_INT, PROP_NONE);
   RNA_def_property_int_sdna(prop, NULL, "mat");
   RNA_def_property_range(prop, -1, SHRT_MAX);
-  RNA_def_property_ui_text(
-      prop, "Material", "Material index of generated faces, -1 for automatic");
+  RNA_def_property_ui_text(prop, "Material",
+                           "Material index of generated faces, -1 for automatic");
   RNA_def_property_update(prop, 0, "rna_Modifier_update");
 
   prop = RNA_def_property(srna, "loop_slide", PROP_BOOLEAN, PROP_NONE);



More information about the Bf-blender-cvs mailing list