[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [13572] trunk/blender/source/blender/src: == Action Editor - Column Select tools ==

Joshua Leung aligorith at gmail.com
Tue Feb 5 03:47:08 CET 2008


Revision: 13572
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=13572
Author:   aligorith
Date:     2008-02-05 03:47:00 +0100 (Tue, 05 Feb 2008)

Log Message:
-----------
== Action Editor - Column Select tools ==

Added a new column-select type of tool: Select keys on current frame. 

As a result, I've changed the hotkeys for column select:
* KKEY - select keys on same frame as selected keys
* CTRL-KKEY - select keys on same frame as current frame
* SHIFT-KKEY - select keys on same frame as selected markers
* ALT-KKEY - select keys between selected markers

Modified Paths:
--------------
    trunk/blender/source/blender/src/editaction.c
    trunk/blender/source/blender/src/header_action.c

Modified: trunk/blender/source/blender/src/editaction.c
===================================================================
--- trunk/blender/source/blender/src/editaction.c	2008-02-05 01:35:55 UTC (rev 13571)
+++ trunk/blender/source/blender/src/editaction.c	2008-02-05 02:47:00 UTC (rev 13572)
@@ -2890,6 +2890,16 @@
 					ce->cfra= get_action_frame(OBACT, ce->cfra);
 			}
 			break;
+		case 3: /* current frame */
+			/* make a single CfraElem */
+			ce= MEM_callocN(sizeof(CfraElem), "cfraElem");
+			BLI_addtail(&elems, ce);
+			
+			/* apply scaled action correction if needed */
+			if (NLA_ACTION_SCALED && datatype==ACTCONT_ACTION)
+				ce->cfra= get_action_frame(OBACT, CFRA);
+			else
+				ce->cfra= CFRA;
 	}
 	
 	/* loop through all of the keys and select additional keyframes
@@ -4031,7 +4041,7 @@
 					printf("\t\tAchan \"%s\" : %p... group={%p} \n", achan->name, achan, achan->grp);
 				}	
 			}
-				
+			
 			/* Transforms */
 			else {
 				if (mval[0] >= ACTWIDTH) {
@@ -4055,13 +4065,14 @@
 			break;
 		
 		case KKEY:
-			if (G.qual & LR_CTRLKEY) {
+			if (G.qual == LR_ALTKEY)
 				markers_selectkeys_between();
-			}
-			else {
-				val= (G.qual & LR_SHIFTKEY) ? 2 : 1;
-				column_select_action_keys(val);
-			}
+			else if (G.qual == LR_SHIFTKEY)
+				column_select_action_keys(2);
+			else if (G.qual == LR_CTRLKEY)
+				column_select_action_keys(3);
+			else
+				column_select_action_keys(1);
 			
 			allqueue(REDRAWMARKER, 0);
 			break;

Modified: trunk/blender/source/blender/src/header_action.c
===================================================================
--- trunk/blender/source/blender/src/header_action.c	2008-02-05 01:35:55 UTC (rev 13571)
+++ trunk/blender/source/blender/src/header_action.c	2008-02-05 02:47:00 UTC (rev 13572)
@@ -117,8 +117,9 @@
 
 enum {
 	ACTMENU_SEL_COLUMN_KEYS	= 1,
+	ACTMENU_SEL_COLUMN_CFRA,
 	ACTMENU_SEL_COLUMN_MARKERSCOLUMN,
-	ACTMENU_SEL_COLUMN_MARKERSBETWEEN
+	ACTMENU_SEL_COLUMN_MARKERSBETWEEN 
 };
 
 enum {
@@ -503,6 +504,9 @@
 		case ACTMENU_SEL_COLUMN_MARKERSCOLUMN:
 			column_select_action_keys(2);
 			break;
+		case ACTMENU_SEL_COLUMN_CFRA:
+			column_select_action_keys(3);
+			break;
 	}
 		
 	allqueue(REDRAWMARKER, 0);
@@ -521,10 +525,13 @@
 					 "On Selected Keys|K", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0,  
 					 ACTMENU_SEL_COLUMN_KEYS, "");
 	uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, 
+					 "On Current Frame|Ctrl K", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0,  
+					 ACTMENU_SEL_COLUMN_CFRA, "");
+	uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, 
 					 "On Selected Markers|Shift K", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 
 					 ACTMENU_SEL_COLUMN_MARKERSCOLUMN, "");
 	uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, 
-					 "Between Selected Markers|Ctrl K", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 
+					 "Between Selected Markers|Alt K", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 
 					 ACTMENU_SEL_COLUMN_MARKERSBETWEEN, "");
 	
 	





More information about the Bf-blender-cvs mailing list