[Bf-blender-cvs] [330febba5a5] greasepencil-object: Cleanup UI and unused fields

Antonio Vazquez noreply at git.blender.org
Mon Nov 13 14:35:34 CET 2017


Commit: 330febba5a547ef1238dfb51c0ea1d8905eaf374
Author: Antonio Vazquez
Date:   Mon Nov 13 14:35:14 2017 +0100
Branches: greasepencil-object
https://developer.blender.org/rB330febba5a547ef1238dfb51c0ea1d8905eaf374

Cleanup UI and unused fields

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

M	release/scripts/startup/bl_ui/properties_data_modifier.py
M	source/blender/modifiers/intern/MOD_gpencilsmooth.c

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

diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py
index da68565e571..e54dd19dfb3 100644
--- a/release/scripts/startup/bl_ui/properties_data_modifier.py
+++ b/release/scripts/startup/bl_ui/properties_data_modifier.py
@@ -1580,10 +1580,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
 
     def GP_SMOOTH(self, layout, ob, md):
         gpd = ob.data
-        split = layout.split()
-
-        col = split.column()
-        row = col.row(align=False)
+        row = layout.row(align=False)
         row.prop(md, "factor")
         row.prop(md, "step")
 
@@ -1594,6 +1591,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
         row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL')
         row.prop(md, "inverse_layers", text="", icon="ARROW_LEFTRIGHT")
 
+        col = split.column()
         col.label("Vertex Group:")
         row = col.row(align=True)
         row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
diff --git a/source/blender/modifiers/intern/MOD_gpencilsmooth.c b/source/blender/modifiers/intern/MOD_gpencilsmooth.c
index 43bc0b0803a..d9fde45f7e1 100644
--- a/source/blender/modifiers/intern/MOD_gpencilsmooth.c
+++ b/source/blender/modifiers/intern/MOD_gpencilsmooth.c
@@ -87,7 +87,6 @@ static void deformStroke(ModifierData *md, const EvaluationContext *UNUSED(eval_
 
 	/* smooth stroke */
 	if (mmd->factor > 0.0f) {
-		float reduce = 0.0f;
 		for (int r = 0; r < mmd->step; ++r) {
 			for (int i = 0; i < gps->totpoints; i++) {
 				pt = &gps->points[i];
@@ -97,7 +96,7 @@ static void deformStroke(ModifierData *md, const EvaluationContext *UNUSED(eval_
 					continue;
 				}
 
-				val = (mmd->factor - reduce) * weight;
+				val = mmd->factor * weight;
 				/* perform smoothing */
 				if (mmd->flag & GP_SMOOTH_MOD_LOCATION) {
 					BKE_gp_smooth_stroke(gps, i, val, false);
@@ -109,7 +108,6 @@ static void deformStroke(ModifierData *md, const EvaluationContext *UNUSED(eval_
 					BKE_gp_smooth_stroke_thickness(gps, i, val);
 				}
 			}
-			//reduce += 0.25f;  // reduce the factor
 		}
 	}
 }



More information about the Bf-blender-cvs mailing list