[Bf-blender-cvs] [bce9680] GPencil_Editing_Stage3: GP Sculpt: Dampen Pinch brush strength
Joshua Leung
noreply at git.blender.org
Tue Jul 14 17:09:14 CEST 2015
Commit: bce968044f2c2a9589388c925ab6cb5bcf3227ae
Author: Joshua Leung
Date: Wed Jul 15 02:57:26 2015 +1200
Branches: GPencil_Editing_Stage3
https://developer.blender.org/rBbce968044f2c2a9589388c925ab6cb5bcf3227ae
GP Sculpt: Dampen Pinch brush strength
By trial and error, it seems that dividing the influence by 5 makes this tool
more manageable.
===================================================================
M source/blender/editors/gpencil/gpencil_brush.c
===================================================================
diff --git a/source/blender/editors/gpencil/gpencil_brush.c b/source/blender/editors/gpencil/gpencil_brush.c
index 5f6f4e8..5bac81d 100644
--- a/source/blender/editors/gpencil/gpencil_brush.c
+++ b/source/blender/editors/gpencil/gpencil_brush.c
@@ -515,9 +515,15 @@ static bool gp_brush_pinch_apply(tGP_BrushEditData *gso, bGPDstroke *gps, int i,
const int radius, const int co[2])
{
bGPDspoint *pt = gps->points + i;
- float inf = gp_brush_influence_calc(gso, radius, co);
+ float fac, inf;
float vec[3];
- float fac;
+
+ /* Scale down standard influence value to get it more manageable...
+ * - No damping = Unmanageable at > 0.5 strength
+ * - Div 10 = Not enough effect
+ * - Div 5 = Happy medium... (by trial and error)
+ */
+ inf = gp_brush_influence_calc(gso, radius, co) / 5.0f;
/* 1) Make this point relative to the cursor/midpoint (dvec) */
sub_v3_v3v3(vec, &pt->x, gso->dvec);
More information about the Bf-blender-cvs
mailing list