[Bf-blender-cvs] [e3654f1] GPencil_Editing_Stage3: Initial stub callbacks for grab brush

Joshua Leung noreply at git.blender.org
Sat Jun 13 02:45:10 CEST 2015


Commit: e3654f1da522daa62bc02a8b4239d584916684d2
Author: Joshua Leung
Date:   Sat Jun 13 12:18:07 2015 +1200
Branches: GPencil_Editing_Stage3
https://developer.blender.org/rBe3654f1da522daa62bc02a8b4239d584916684d2

Initial stub callbacks for grab brush

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

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 5344a20..3933748 100644
--- a/source/blender/editors/gpencil/gpencil_brush.c
+++ b/source/blender/editors/gpencil/gpencil_brush.c
@@ -268,6 +268,39 @@ static bool gp_brush_thickness_apply(tGP_BrushEditData *gso, bGPDstroke *gps, in
 /* ----------------------------------------------- */
 /* Grab Brush */
 
+#if 0
+
+/* initialise custom data for handling this stroke */
+static bool gp_brush_grab_stroke_init(tGP_BrushEditData *gso, bGPDstroke *gps)
+{
+	
+}
+
+/* store references to stroke points in the initial stage */
+static bool gp_brush_grab_store_points(tGP_BrushEditData *gso, bGPDstroke *gps, int i,
+                                       const int mx, const int my, const int radius,
+                                       const int x0, const int y0)
+{
+	bGPDspoint *pt = &gps->points[i];
+	
+	
+	return true;
+}
+
+/* apply smoothing by blending between the average coordinates and the current coordinates */
+static bool gp_brush_grab_apply(tGP_BrushEditData *gso, bGPDstroke *gps, int i,
+                                const int mx, const int my, const int radius,
+                                const int x0, const int y0)
+{
+	bGPDspoint *pt = &gps->points[i];
+	float inf = gp_brush_influence_calc(gso, radius, mx, my, x0, y0);
+	 
+	
+	return true;
+}
+
+#endif
+
 /* ************************************************ */
 /* Cursor drawing */




More information about the Bf-blender-cvs mailing list