[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55320] trunk/blender/source/blender/ editors/sculpt_paint/paint_stroke.c: minor cleanup and calculate rake angle before jittering or result

Antony Riakiotakis kalast at gmail.com
Fri Mar 15 23:32:46 CET 2013


Revision: 55320
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55320
Author:   psy-fi
Date:     2013-03-15 22:32:44 +0000 (Fri, 15 Mar 2013)
Log Message:
-----------
minor cleanup and calculate rake angle before jittering or result
becomes essentially, random

Modified Paths:
--------------
    trunk/blender/source/blender/editors/sculpt_paint/paint_stroke.c

Modified: trunk/blender/source/blender/editors/sculpt_paint/paint_stroke.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/paint_stroke.c	2013-03-15 20:45:39 UTC (rev 55319)
+++ trunk/blender/source/blender/editors/sculpt_paint/paint_stroke.c	2013-03-15 22:32:44 UTC (rev 55320)
@@ -143,11 +143,11 @@
 	return pressure;
 }
 
-#if 1
+
 /* Initialize the stroke cache variants from operator properties */
 static void paint_brush_update(bContext *C, Brush *brush, PaintMode mode,
                                          struct PaintStroke *stroke,
-                                         float mouse[2], float pressure)
+										 const float mouse[2], float pressure)
 {
 	Scene *scene = CTX_data_scene(C);
 	UnifiedPaintSettings *ups = &scene->toolsettings->unified_paint_settings;
@@ -234,8 +234,8 @@
 
 	stroke->brush_init = TRUE;
 }
-#endif
 
+
 /* Put the location of the next stroke dot into the stroke RNA and apply it to the mesh */
 static void paint_brush_stroke_add_step(bContext *C, wmOperator *op, const wmEvent *event, const float mouse_in[2])
 {
@@ -273,6 +273,8 @@
 	 * will create too many dabs */
 	copy_v2_v2(stroke->last_mouse_position, mouse_in);
 
+	paint_brush_update(C, brush, mode, stroke, mouse_in, pressure);
+
 	/* TODO: as sculpt and other paint modes are unified, this
 	 * separation will go away */
 	if (paint_supports_jitter(mode)) {
@@ -303,8 +305,6 @@
 	else
 		zero_v3(location);
 
-	paint_brush_update(C, brush, mode, stroke, mouse_out, pressure);
-
 	/* Add to stroke */
 	RNA_collection_add(op->ptr, "stroke", &itemptr);
 




More information about the Bf-blender-cvs mailing list