[Bf-blender-cvs] [59a9e40] GPencil_Editing_Stage3: Fix: Initialise GP Sculpt settings when creating new scenes

Joshua Leung noreply at git.blender.org
Mon Nov 23 12:04:04 CET 2015


Commit: 59a9e4027a8d583baa2cba40fd203b674438037c
Author: Joshua Leung
Date:   Mon Nov 23 23:57:08 2015 +1300
Branches: GPencil_Editing_Stage3
https://developer.blender.org/rB59a9e4027a8d583baa2cba40fd203b674438037c

Fix: Initialise GP Sculpt settings when creating new scenes

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

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

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

diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 82a040f..7e179fd 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -750,6 +750,47 @@ void BKE_scene_init(Scene *sce)
 	copy_v2_fl2(sce->safe_areas.action_center, 15.0f / 100.0f, 5.0f / 100.0f);
 
 	sce->preview = NULL;
+	
+	/* GP Sculpt brushes */
+	{
+		GP_BrushEdit_Settings *gset = &sce->toolsettings->gp_sculpt;
+		GP_EditBrush_Data *gp_brush;
+		
+		gp_brush = &gset->brush[GP_EDITBRUSH_TYPE_SMOOTH];
+		gp_brush->size = 25;
+		gp_brush->strength = 0.3f;
+		gp_brush->flag = GP_EDITBRUSH_FLAG_USE_FALLOFF | GP_EDITBRUSH_FLAG_SMOOTH_PRESSURE;
+		
+		gp_brush = &gset->brush[GP_EDITBRUSH_TYPE_THICKNESS];
+		gp_brush->size = 25;
+		gp_brush->strength = 0.5f;
+		gp_brush->flag = GP_EDITBRUSH_FLAG_USE_FALLOFF;
+		
+		gp_brush = &gset->brush[GP_EDITBRUSH_TYPE_GRAB];
+		gp_brush->size = 50;
+		gp_brush->strength = 0.3f;
+		gp_brush->flag = GP_EDITBRUSH_FLAG_USE_FALLOFF;
+		
+		gp_brush = &gset->brush[GP_EDITBRUSH_TYPE_PUSH];
+		gp_brush->size = 25;
+		gp_brush->strength = 0.3f;
+		gp_brush->flag = GP_EDITBRUSH_FLAG_USE_FALLOFF;
+		
+		gp_brush = &gset->brush[GP_EDITBRUSH_TYPE_TWIST];
+		gp_brush->size = 50;
+		gp_brush->strength = 0.3f; // XXX?
+		gp_brush->flag = GP_EDITBRUSH_FLAG_USE_FALLOFF;
+		
+		gp_brush = &gset->brush[GP_EDITBRUSH_TYPE_PINCH];
+		gp_brush->size = 50;
+		gp_brush->strength = 0.5f; // XXX?
+		gp_brush->flag = GP_EDITBRUSH_FLAG_USE_FALLOFF;
+		
+		gp_brush = &gset->brush[GP_EDITBRUSH_TYPE_RANDOMISE];
+		gp_brush->size = 25;
+		gp_brush->strength = 0.5f;
+		gp_brush->flag = GP_EDITBRUSH_FLAG_USE_FALLOFF;
+	}
 }
 
 Scene *BKE_scene_add(Main *bmain, const char *name)




More information about the Bf-blender-cvs mailing list