[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38651] branches/merwin-spacenav/source/ blender/editors: sculpt/paint while using 3D mouse

Mike Erwin significant.bit at gmail.com
Sun Jul 24 10:02:43 CEST 2011


Revision: 38651
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38651
Author:   merwin
Date:     2011-07-24 08:02:42 +0000 (Sun, 24 Jul 2011)
Log Message:
-----------
sculpt/paint while using 3D mouse

Modified Paths:
--------------
    branches/merwin-spacenav/source/blender/editors/gpencil/gpencil_paint.c
    branches/merwin-spacenav/source/blender/editors/sculpt_paint/paint_stroke.c

Modified: branches/merwin-spacenav/source/blender/editors/gpencil/gpencil_paint.c
===================================================================
--- branches/merwin-spacenav/source/blender/editors/gpencil/gpencil_paint.c	2011-07-24 05:24:46 UTC (rev 38650)
+++ branches/merwin-spacenav/source/blender/editors/gpencil/gpencil_paint.c	2011-07-24 08:02:42 UTC (rev 38651)
@@ -1617,6 +1617,18 @@
 	tGPsdata *p= op->customdata;
 	int estate = OPERATOR_PASS_THROUGH; /* default exit state - not handled, so let others have a share of the pie */
 	
+	// if (event->type == NDOF_MOTION)
+	//	return OPERATOR_PASS_THROUGH;
+	// -------------------------------
+	// [mce] Not quite what I was looking
+	// for, but a good start! GP continues to
+	// draw on the screen while the 3D mouse
+	// moves the viewpoint. Problem is that
+	// the stroke is converted to 3D only after
+	// it is finished. This approach should work
+	// better in tools that immediately apply
+	// in 3D space.
+
 	//printf("\tGP - handle modal event...\n");
 	
 	/* exit painting mode (and/or end current stroke) */

Modified: branches/merwin-spacenav/source/blender/editors/sculpt_paint/paint_stroke.c
===================================================================
--- branches/merwin-spacenav/source/blender/editors/sculpt_paint/paint_stroke.c	2011-07-24 05:24:46 UTC (rev 38650)
+++ branches/merwin-spacenav/source/blender/editors/sculpt_paint/paint_stroke.c	2011-07-24 08:02:42 UTC (rev 38651)
@@ -832,6 +832,9 @@
 	float mouse[2];
 	int first= 0;
 
+	if (event->type == NDOF_MOTION)
+		return OPERATOR_PASS_THROUGH;
+
 	if(!stroke->stroke_started) {
 		stroke->last_mouse_position[0] = event->x;
 		stroke->last_mouse_position[1] = event->y;




More information about the Bf-blender-cvs mailing list