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-08-14 15:09:19 +0400
committerJoshua Leung <aligorith@gmail.com>2009-08-14 15:09:19 +0400
commit4bbccd39bc827e5d794bdbe987b4d48164e8d950 (patch)
treeb4a0a6b097b095850d1b2373837aae7d6078ccee /source/blender/editors/animation/anim_channels_defines.c
parentc6e041f125008a59f9c77ffb4d6a017e20804eec (diff)
2.5 - Assorted Animation UI Tweaks
* Fixed padding for Graph Editor visibility toggles * Reverted many of the tweaks to Timeline UI for now (for the reasons outlined in earlier mail) * NLA Editor now (mostly) uses the new channel-drawing API
Diffstat (limited to 'source/blender/editors/animation/anim_channels_defines.c')
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c45
1 files changed, 23 insertions, 22 deletions
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index 879296c58b8..32bda94f796 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -1874,10 +1874,10 @@ void ANIM_channel_draw (bAnimContext *ac, bAnimListElem *ale, float yminc, float
glColor3fv(fcu->color);
/* just a solid color rect
- * hardcoded 18 pixels width is slightly wider than icon width, so that
+ * hardcoded 17 pixels width is slightly wider than icon width, so that
* there's a slight border around it
*/
- glRectf(offset, yminc, offset+18, ymaxc);
+ glRectf(offset, yminc, offset+17, ymaxc);
}
/* finally the icon itself */
@@ -1913,34 +1913,35 @@ void ANIM_channel_draw (bAnimContext *ac, bAnimListElem *ale, float yminc, float
UI_DrawString(offset, ytext, name);
}
- /* step 6) draw mute+protection toggles ............................. */
+ /* step 6) draw mute+protection toggles + (sliders) ....................... */
/* reset offset - now goes from RHS of panel */
offset = 0;
// TODO: we need a mechanism of drawing over (and hiding) stuff from here...
+ // TODO: when drawing sliders, make those draw instead of these toggles if not enough space
- /* set blending again, as text drawing may clear it */
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- glEnable(GL_BLEND);
-
- /* protect... */
- // XXX v2d might not be valid
- if (acf->has_setting(ac, ale, ACHANNEL_SETTING_PROTECT)) {
- enabled= ANIM_channel_setting_get(ac, ale, ACHANNEL_SETTING_PROTECT);
+ if (v2d) {
+ /* set blending again, as text drawing may clear it */
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ glEnable(GL_BLEND);
- offset += ICON_WIDTH;
- UI_icon_draw(v2d->cur.xmax-(float)offset, ymid, ((enabled)? ICON_LOCKED : ICON_UNLOCKED));
- }
- /* mute... */
- // XXX v2d might not be valid
- if (acf->has_setting(ac, ale, ACHANNEL_SETTING_MUTE)) {
- enabled= ANIM_channel_setting_get(ac, ale, ACHANNEL_SETTING_MUTE);
+ /* protect... */
+ if (acf->has_setting(ac, ale, ACHANNEL_SETTING_PROTECT)) {
+ enabled= ANIM_channel_setting_get(ac, ale, ACHANNEL_SETTING_PROTECT);
+
+ offset += ICON_WIDTH;
+ UI_icon_draw(v2d->cur.xmax-(float)offset, ymid, ((enabled)? ICON_LOCKED : ICON_UNLOCKED));
+ }
+ /* mute... */
+ if (acf->has_setting(ac, ale, ACHANNEL_SETTING_MUTE)) {
+ enabled= ANIM_channel_setting_get(ac, ale, ACHANNEL_SETTING_MUTE);
+
+ offset += ICON_WIDTH;
+ UI_icon_draw(v2d->cur.xmax-(float)offset, ymid, ((enabled)? ICON_MUTE_IPO_ON : ICON_MUTE_IPO_OFF));
+ }
- offset += ICON_WIDTH;
- UI_icon_draw(v2d->cur.xmax-(float)offset, ymid, ((enabled)? ICON_MUTE_IPO_ON : ICON_MUTE_IPO_OFF));
+ glDisable(GL_BLEND); /* End of blending with background */
}
-
- glDisable(GL_BLEND); /* End of blending with background */
}
/* *********************************************** */