Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2006-11-16 07:01:01 +0300
committerJoshua Leung <aligorith@gmail.com>2006-11-16 07:01:01 +0300
commit1b3f368e84b0fba04c1a6ebf1e4b5d724d3fa8cf (patch)
treea2d564a1f5452fb1d88f605f213409d8c85504d8 /source/blender/src/header_action.c
parent0ddd910189f1a7fcf798f76b4c4a1aed9df4d8cd (diff)
== Action Editor Makers ==
* There is now a feature to (de)select all markers. Can be found in menu or via the hotkey Ctrl A * The 'Markers' menu is now not drawn when marker set is 'None' * Some other minor code cleanups Additional Notes: * I'm still trying to track down the cause of a bug which means that you can't select more than one marker (with RMB clicks) at once. For now, just use borderselect
Diffstat (limited to 'source/blender/src/header_action.c')
-rw-r--r--source/blender/src/header_action.c31
1 files changed, 27 insertions, 4 deletions
diff --git a/source/blender/src/header_action.c b/source/blender/src/header_action.c
index 0bb18014b4e..4cb3dc27bd2 100644
--- a/source/blender/src/header_action.c
+++ b/source/blender/src/header_action.c
@@ -89,6 +89,7 @@
#define ACTMENU_SEL_ALL_KEYS 1
#define ACTMENU_SEL_ALL_CHAN 2
#define ACTMENU_SEL_COLUMN 3
+#define ACTMENU_SEL_ALL_MARKERS 4
#define ACTMENU_KEY_DUPLICATE 0
#define ACTMENU_KEY_DELETE 1
@@ -335,6 +336,7 @@ static void do_action_selectmenu(void *arg, int event)
SpaceAction *saction;
bAction *act;
Key *key;
+ ListBase *markers;
saction = curarea->spacedata.first;
if (!saction)
@@ -342,6 +344,7 @@ static void do_action_selectmenu(void *arg, int event)
act = saction->action;
key = get_action_mesh_key();
+ markers = get_saction_markers(saction);
switch(event)
{
@@ -380,6 +383,14 @@ static void do_action_selectmenu(void *arg, int event)
case ACTMENU_SEL_COLUMN:
addqueue (curarea->win, KKEY, 1);
break;
+
+ case ACTMENU_SEL_ALL_MARKERS: /* select/deselect all markers */
+ if (markers != NULL) {
+ deselect_saction_markers(markers, 1, 0);
+ allqueue(REDRAWACTION, 0);
+ allqueue(REDRAWTIME, 0);
+ }
+ break;
}
}
@@ -396,16 +407,26 @@ static uiBlock *action_selectmenu(void *arg_unused)
"Border Select|B", 0, yco-=20,
menuwidth, 19, NULL, 0.0, 0.0, 0,
ACTMENU_SEL_BORDER, "");
+
uiDefBut(block, SEPR, 0, "", 0, yco-=6,
menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
"Select/Deselect All Keys|A", 0, yco-=20,
menuwidth, 19, NULL, 0.0, 0.0, 0,
ACTMENU_SEL_ALL_KEYS, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
+ "Select/Deselect All Markers|Ctrl A", 0, yco-=20,
+ menuwidth, 19, NULL, 0.0, 0.0, 0,
+ ACTMENU_SEL_ALL_MARKERS, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
"Select/Deselect All Channels", 0, yco-=20,
menuwidth, 19, NULL, 0.0, 0.0, 0,
ACTMENU_SEL_ALL_CHAN, "");
+
+ uiDefBut(block, SEPR, 0, "", 0, yco-=6,
+ menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,
"Select Column|K", 0, yco-=20,
menuwidth, 19, NULL, 0.0, 0.0, 0,
@@ -1035,10 +1056,12 @@ void action_buttons(void)
"Key", xco, -2, xmax-3, 24, "");
xco+= xmax;
- xmax= GetButStringLength("Marker");
- uiDefPulldownBut(block, action_markermenu, NULL,
- "Marker", xco, -2, xmax-3, 24, "");
- xco+= xmax;
+ if (G.saction->markert != SACTION_NOMARKERS) {
+ xmax= GetButStringLength("Marker");
+ uiDefPulldownBut(block, action_markermenu, NULL,
+ "Marker", xco, -2, xmax-3, 24, "");
+ xco+= xmax;
+ }
}
uiBlockSetEmboss(block, UI_EMBOSS);