[Bf-blender-cvs] [1a5fa01eb33] greasepencil-object: GPencil: Add missing Strength Sculpt Brush

Antonio Vazquez noreply at git.blender.org
Thu Nov 21 23:10:50 CET 2019


Commit: 1a5fa01eb33e0035ef44a884b3398c46aca71ed7
Author: Antonio Vazquez
Date:   Thu Nov 21 23:05:23 2019 +0100
Branches: greasepencil-object
https://developer.blender.org/rB1a5fa01eb33e0035ef44a884b3398c46aca71ed7

GPencil: Add missing Strength Sculpt Brush

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

M	source/blender/blenkernel/intern/brush.c

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

diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c
index 59336325190..889d51e2d6a 100644
--- a/source/blender/blenkernel/intern/brush.c
+++ b/source/blender/blenkernel/intern/brush.c
@@ -778,6 +778,22 @@ void BKE_brush_gpencil_sculpt_presets(Main *bmain, ToolSettings *ts)
     brush->gpencil_settings->sculpt_mode_flag |= GP_SCULPT_FLAGMODE_APPLY_POSITION;
   }
 
+  /* Smooth brush. */
+  brush = gpencil_brush_ensure(bmain, ts, "Strength Stroke", OB_MODE_SCULPT_GPENCIL, &new_brush);
+  brush->gpencil_settings->icon_id = GP_BRUSH_ICON_GPBRUSH_STRENGTH;
+  brush->gpencil_sculpt_tool = GPSCULPT_TOOL_STRENGTH;
+
+  if (new_brush) {
+    brush->size = 25.0f;
+    brush->gpencil_settings->flag |= (GP_BRUSH_USE_PRESSURE | GP_BRUSH_ENABLE_CURSOR);
+
+    brush->gpencil_settings->draw_strength = 0.3f;
+    brush->gpencil_settings->flag |= GP_BRUSH_USE_STENGTH_PRESSURE;
+    brush->gpencil_settings->sculpt_flag = GP_SCULPT_FLAG_USE_FALLOFF |
+                                           GP_SCULPT_FLAG_SMOOTH_PRESSURE;
+    brush->gpencil_settings->sculpt_mode_flag |= GP_SCULPT_FLAGMODE_APPLY_POSITION;
+  }
+
   /* Thickness brush. */
   brush = gpencil_brush_ensure(bmain, ts, "Thickness Stroke", OB_MODE_SCULPT_GPENCIL, &new_brush);
   brush->gpencil_settings->icon_id = GP_BRUSH_ICON_GPBRUSH_THICKNESS;



More information about the Bf-blender-cvs mailing list