[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38619] branches/soc-2011-onion/source/ blender/editors/uvedit/uvedit_ops.c: smart stitch

Antony Riakiotakis kalast at gmail.com
Fri Jul 22 20:29:17 CEST 2011


Revision: 38619
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38619
Author:   psy-fi
Date:     2011-07-22 18:29:17 +0000 (Fri, 22 Jul 2011)
Log Message:
-----------
smart stitch
============================
- smart stitch: Usability improvement: Now user can navigate with wheel - middle mouse while stitching.
- altered limit so that you have to press Ctrl to adjust it.

Modified Paths:
--------------
    branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_ops.c

Modified: branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_ops.c
===================================================================
--- branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_ops.c	2011-07-22 17:37:51 UTC (rev 38618)
+++ branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_ops.c	2011-07-22 18:29:17 UTC (rev 38619)
@@ -1230,7 +1230,7 @@
 /* This function updates the header of the UV editor when the stitch tool updates its settings */
 static void stitch_update_header(StitchState *stitch_state, bContext *C)
 {
-	static char str[] = "Select(V {+Ctrl deselect}) Mode(M): %c Vertex  %c Edge  %c Preview(P)  %c Limit(L)  %c Snap(S)   Wheel(limit adjust): %f";
+	static char str[] = "Select(V {+Ctrl deselect}) Mode(M): %c Vertex  %c Edge  %c Preview(P)  %c Limit(L)  %c Snap(S)  Ctrl+Wheel(limit adjust): %f";
 	char msg[256];
 	ScrArea *sa= CTX_wm_area(C);
 	char mode = (stitch_state->mode == VERT_STITCH);
@@ -2046,6 +2046,9 @@
 	stitch_state = (StitchState *)op->customdata;
 
 	switch(event->type){
+		case MIDDLEMOUSE:
+			return OPERATOR_PASS_THROUGH;
+
 		/* Cancel */
 		case ESCKEY:
 		case RIGHTMOUSE:
@@ -2062,17 +2065,25 @@
 		/* Increase limit */
 		case PADPLUSKEY:
 		case WHEELUPMOUSE:
-			stitch_state->limitDist += 0.01;
-			stitch_process_data(stitch_state, 0, scene, 1);
-			break;
-
+			if(event->ctrl){
+				stitch_state->limitDist += 0.01;
+				stitch_process_data(stitch_state, 0, scene, 1);
+				break;
+			}
+			else{
+				return OPERATOR_PASS_THROUGH;
+			}
 		/* Decrease limit */
 		case PADMINUS:
 		case WHEELDOWNMOUSE:
-			stitch_state->limitDist -= 0.01;
-			stitch_state->limitDist = MAX2(0.01, stitch_state->limitDist);
-			stitch_process_data(stitch_state, 0, scene, 1);
-			break;
+			if(event->ctrl){
+				stitch_state->limitDist -= 0.01;
+				stitch_state->limitDist = MAX2(0.01, stitch_state->limitDist);
+				stitch_process_data(stitch_state, 0, scene, 1);
+				break;
+			}else{
+				return OPERATOR_PASS_THROUGH;
+			}
 
 		/* Use Limit (Default off)*/
 		case LKEY:




More information about the Bf-blender-cvs mailing list