[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [54553] trunk/blender/source/blender/ editors/transform/transform.c: fix [#33949] T_ALT_TRANSFORM conflicts with "emulate 3 button mouse"

Campbell Barton ideasman42 at gmail.com
Thu Feb 14 15:50:16 CET 2013


Revision: 54553
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54553
Author:   campbellbarton
Date:     2013-02-14 14:50:16 +0000 (Thu, 14 Feb 2013)
Log Message:
-----------
fix [#33949] T_ALT_TRANSFORM conflicts with "emulate 3 button mouse" 
finally last transform tool relying on alt has an alternative.

Sequencer slide which makes room for the placed strip by moving others - Pressing G a second time toggles this behavior.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/transform/transform.c

Modified: trunk/blender/source/blender/editors/transform/transform.c
===================================================================
--- trunk/blender/source/blender/editors/transform/transform.c	2013-02-14 14:41:04 UTC (rev 54552)
+++ trunk/blender/source/blender/editors/transform/transform.c	2013-02-14 14:50:16 UTC (rev 54553)
@@ -894,6 +894,10 @@
 					t->redraw |= TREDRAW_HARD;
 					WM_event_add_mousemove(t->context);
 				}
+				else if (t->mode == TFM_SEQ_SLIDE) {
+					t->flag ^= T_ALT_TRANSFORM;
+					t->redraw |= TREDRAW_HARD;
+				}
 				else {
 					if (t->obedit && t->obedit->type == OB_MESH) {
 						if ((t->mode == TFM_TRANSLATION) && (t->spacetype == SPACE_VIEW3D)) {
@@ -4083,14 +4087,18 @@
 		str_p += BLI_snprintf(str_p, sizeof(str) - (str_p - str), " %.4f", distance);
 	}
 
-	str_p += BLI_snprintf(str_p, sizeof(str) - (str_p - str), " %s, (", t->proptext);
+	if (t->proptext[0]) {
+		str_p += BLI_snprintf(str_p, sizeof(str) - (str_p - str), " %s", t->proptext);
+	}
+	str_p += BLI_snprintf(str_p, sizeof(str) - (str_p - str), ", (");
+
 	{
 		wmKeyMapItem *kmi = WM_modalkeymap_find_propvalue(t->keymap, TFM_MODAL_RESIZE);
 		if (kmi) {
 			str_p += WM_keymap_item_to_string(kmi, str_p, sizeof(str) - (str_p - str));
 		}
 	}
-	str_p += BLI_snprintf(str_p, sizeof(str) - (str_p - str), ") Even Thickness %s",
+	str_p += BLI_snprintf(str_p, sizeof(str) - (str_p - str), " or Alt) Even Thickness %s",
 	                      (t->flag & T_ALT_TRANSFORM) ? "ON" : "OFF");
 	/* done with header string */
 
@@ -6752,9 +6760,10 @@
 	t->num.increment = t->snap[1];
 }
 
-static void headerSeqSlide(TransInfo *t, float val[2], char *str)
+static void headerSeqSlide(TransInfo *t, float val[2], char *str, size_t str_len)
 {
 	char tvec[NUM_STR_REP_LEN * 3];
+	char *str_p;
 
 	if (hasNumInput(&t->num)) {
 		outputNumInput(&(t->num), tvec);
@@ -6763,7 +6772,17 @@
 		sprintf(&tvec[0], "%.0f, %.0f", val[0], val[1]);
 	}
 
-	sprintf(str, "Sequence Slide: %s%s", &tvec[0], t->con.text);
+	str_p = str;
+	str_p += BLI_snprintf(str, str_len, "Sequence Slide: %s%s, (", &tvec[0], t->con.text);
+
+	{
+		wmKeyMapItem *kmi = WM_modalkeymap_find_propvalue(t->keymap, TFM_MODAL_TRANSLATE);
+		if (kmi) {
+			str_p += WM_keymap_item_to_string(kmi, str_p, str_len - (str_p - str));
+		}
+	}
+	str_p += BLI_snprintf(str_p, str_len - (str_p - str), " or Alt) Expand to fit %s",
+	                      (t->flag & T_ALT_TRANSFORM) ? "ON" : "OFF");
 }
 
 static void applySeqSlide(TransInfo *t, float val[2])
@@ -6807,7 +6826,7 @@
 	t->values[0] = floor(t->values[0] + 0.5f);
 	t->values[1] = floor(t->values[1] + 0.5f);
 
-	headerSeqSlide(t, t->values, str);
+	headerSeqSlide(t, t->values, str, sizeof(str));
 	applySeqSlide(t, t->values);
 
 	recalcData(t);




More information about the Bf-blender-cvs mailing list