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>2009-01-01 04:47:36 +0300
committerJoshua Leung <aligorith@gmail.com>2009-01-01 04:47:36 +0300
commitc0621a1b7eca3310320e2df02094e828eda2cd37 (patch)
treec90cf5beae4919feca3cec977b56ac7ad111acbd /source/blender/editors/animation/anim_channels.c
parentc2de1373d1c61815e3030f88c196e6c42cb1c5fc (diff)
2.5 - Action Editor
* Fixed 'mute' icons for IPO-Curve channels. Added define for icon-button widths instead of magic numbers there too. * Restored View All (HomeKey) and Auto-Set Preview Range (Ctrl-Alt-P). These tools both use the max extents of the keyframes to determine their (time)range.
Diffstat (limited to 'source/blender/editors/animation/anim_channels.c')
-rw-r--r--source/blender/editors/animation/anim_channels.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/source/blender/editors/animation/anim_channels.c b/source/blender/editors/animation/anim_channels.c
index c213e2d9a10..d60394d720f 100644
--- a/source/blender/editors/animation/anim_channels.c
+++ b/source/blender/editors/animation/anim_channels.c
@@ -91,11 +91,6 @@
/* -------------------------- Exposed API ----------------------------------- */
/* ************************************************************************** */
-/* Channel Drawing */
-// XXX should these get their own file or go in anim_draw instead???
-
-
-/* ************************************************************************** */
/* Operators */
@@ -232,7 +227,7 @@ static void mouse_anim_channels (bAnimContext *ac, float x, int channel_index, s
/* toggle expand */
agrp->flag ^= AGRP_EXPANDED;
}
- else if (x >= (ACHANNEL_NAMEWIDTH-16)) {
+ else if (x >= (ACHANNEL_NAMEWIDTH-ACHANNEL_BUTTON_WIDTH)) {
/* toggle protection/locking */
agrp->flag ^= AGRP_PROTECTED;
}
@@ -253,6 +248,9 @@ static void mouse_anim_channels (bAnimContext *ac, float x, int channel_index, s
//deselect_actionchannels(act, ANIMCONT_ACTION, 0);
//select_action_group(act, agrp, SELECT_ADD);
}
+
+ // XXX
+ agrp->flag ^= AGRP_SELECTED;
}
}
break;
@@ -261,11 +259,11 @@ static void mouse_anim_channels (bAnimContext *ac, float x, int channel_index, s
bActionChannel *achan= (bActionChannel *)ale->data;
short offset= (ac->datatype == ANIMCONT_DOPESHEET)? 21 : 0;
- if (x >= (ACHANNEL_NAMEWIDTH-16)) {
+ if (x >= (ACHANNEL_NAMEWIDTH-ACHANNEL_BUTTON_WIDTH)) {
/* toggle protect */
achan->flag ^= ACHAN_PROTECTED;
}
- else if ((x >= (ACHANNEL_NAMEWIDTH-32)) && (achan->ipo)) {
+ else if ((x >= (ACHANNEL_NAMEWIDTH-2*ACHANNEL_BUTTON_WIDTH)) && (achan->ipo)) {
/* toggle mute */
achan->ipo->muteipo = (achan->ipo->muteipo)? 0: 1;
}
@@ -333,11 +331,11 @@ static void mouse_anim_channels (bAnimContext *ac, float x, int channel_index, s
{
IpoCurve *icu= (IpoCurve *)ale->data;
- if (x >= (ACHANNEL_NAMEWIDTH-16)) {
+ if (x >= (ACHANNEL_NAMEWIDTH-ACHANNEL_BUTTON_WIDTH)) {
/* toggle protection */
icu->flag ^= IPO_PROTECT;
}
- else if (x >= (ACHANNEL_NAMEWIDTH-16)) {
+ else if (x >= (ACHANNEL_NAMEWIDTH-2*ACHANNEL_BUTTON_WIDTH)) {
/* toggle mute */
icu->flag ^= IPO_MUTE;
}