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-21 05:31:19 +0300
committerJoshua Leung <aligorith@gmail.com>2006-11-21 05:31:19 +0300
commit0d56a6e3197ddfc888c10c0c3615106dd65e560f (patch)
tree2b1f3b5a17857a6daca22cb5e9699ebcacacfa2d /source/blender/src/drawaction.c
parent1b24f495132930255860915f812072a97c222d85 (diff)
== Action Editor ==
Just a minor little code cleanup that I partially started in another one of my commits. The implementation of the showsliders stuff was pretty ugly with exported globals (correct terminology?) used to store whether sliders were shown in the action editor for shapes. This is now a flag in SpaceAction, so the visibility status of markers is now saved in files.
Diffstat (limited to 'source/blender/src/drawaction.c')
-rw-r--r--source/blender/src/drawaction.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/source/blender/src/drawaction.c b/source/blender/src/drawaction.c
index 80fbfa0b8a7..ae476530cde 100644
--- a/source/blender/src/drawaction.c
+++ b/source/blender/src/drawaction.c
@@ -99,7 +99,6 @@ static BezTriple **icu_to_keylist(IpoCurve *icu, int flags, int *totvert);
void draw_icu_channel(gla2DDrawInfo *di, IpoCurve *icu, int flags, float ypos);
/* implementation ------------------------------------------------------ */
-extern short showsliders; /* editaction .c */
extern short ACTWIDTH;
static void meshactionbuts(SpaceAction *saction, Object *ob, Key *key)
@@ -139,24 +138,24 @@ static void meshactionbuts(SpaceAction *saction, Object *ob, Key *key)
uiBlockSetEmboss(block, UI_EMBOSSN);
- if (!showsliders) {
+ if (!(G.saction->flag & SACTION_SLIDERS)) {
ACTWIDTH = NAMEWIDTH;
- but=uiDefIconButS(block, TOG, B_REDR,
+ but=uiDefIconButBitI(block, TOG, SACTION_SLIDERS, B_REDR,
ICON_DISCLOSURE_TRI_RIGHT,
NAMEWIDTH - XIC - 5, y + CHANNELHEIGHT,
XIC,YIC-2,
- &(showsliders), 0, 0, 0, 0,
+ &(G.saction->flag), 0, 0, 0, 0,
"Show action window sliders");
// no hilite, the winmatrix is not correct later on...
uiButSetFlag(but, UI_NO_HILITE);
}
else {
- but= uiDefIconButS(block, TOG, B_REDR,
+ but= uiDefIconButBitI(block, TOG, SACTION_SLIDERS, B_REDR,
ICON_DISCLOSURE_TRI_DOWN,
NAMEWIDTH - XIC - 5, y + CHANNELHEIGHT,
XIC,YIC-2,
- &(showsliders), 0, 0, 0, 0,
+ &(G.saction->flag), 0, 0, 0, 0,
"Hide action window sliders");
// no hilite, the winmatrix is not correct later on...
uiButSetFlag(but, UI_NO_HILITE);
@@ -636,7 +635,7 @@ void drawactionspace(ScrArea *sa, void *spacedata)
* is set to an appropriate value based on whether sliders
* are showing of not
*/
- if (key && showsliders) ACTWIDTH = NAMEWIDTH + SLIDERWIDTH;
+ if (key && (G.saction->flag & SACTION_SLIDERS)) ACTWIDTH = NAMEWIDTH + SLIDERWIDTH;
else ACTWIDTH = NAMEWIDTH;
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) ;