diff options
author | Sergej Reich <sergej.reich@googlemail.com> | 2013-11-23 20:17:12 +0400 |
---|---|---|
committer | Sergej Reich <sergej.reich@googlemail.com> | 2013-11-23 20:17:12 +0400 |
commit | 39dc956f593b3406bf1d81fb83c557b7b51f5327 (patch) | |
tree | 50b59815aad48902a6563aefc8b944daf34c401e /source/blender/editors/space_nla | |
parent | 5d5176095e82b34499e15d74f1fb76d56f4d9508 (diff) | |
parent | d846c9a3b75c3d6f20bc7ab7d2da6cdd18bbbef2 (diff) |
Merge branch 'master' into soc-2013-rigid_body_simsoc-2013-rigid_body_sim
Conflicts:
intern/rigidbody/CMakeLists.txt
release/datafiles/splash.png
source/blender/editors/space_view3d/drawobject.c
source/blender/makesdna/DNA_view3d_types.h
Diffstat (limited to 'source/blender/editors/space_nla')
-rw-r--r-- | source/blender/editors/space_nla/nla_draw.c | 75 | ||||
-rw-r--r-- | source/blender/editors/space_nla/space_nla.c | 2 |
2 files changed, 4 insertions, 73 deletions
diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c index b4c52a5b1ca..c9a86547984 100644 --- a/source/blender/editors/space_nla/nla_draw.c +++ b/source/blender/editors/space_nla/nla_draw.c @@ -638,53 +638,13 @@ static void draw_nla_channel_list_gl(bAnimContext *ac, ListBase *anim_data, View { AnimData *adt = ale->adt; - short indent = 0, offset = 0, sel = 0, group = 0, nonSolo = 0; - int expand = -1, protect = -1, special = -1, mute = -1; + short indent = 0, offset = 0, sel = 0, group = 0; + int special = -1; char name[128]; short do_draw = FALSE; /* determine what needs to be drawn */ switch (ale->type) { - case ANIMTYPE_NLATRACK: /* NLA Track */ - { - NlaTrack *nlt = (NlaTrack *)ale->data; - - /* 'solo' as the 'special' button? */ - if (nlt->flag & NLATRACK_SOLO) - special = ICON_SOLO_ON; - else - special = ICON_SOLO_OFF; - - /* if this track is active and we're tweaking it, don't draw these toggles */ - // TODO: need a special macro for this... - if (((nlt->flag & NLATRACK_ACTIVE) && (nlt->flag & NLATRACK_DISABLED)) == 0) { - if (nlt->flag & NLATRACK_MUTED) - mute = ICON_MUTE_IPO_ON; - else - mute = ICON_MUTE_IPO_OFF; - - if (EDITABLE_NLT(nlt)) - protect = ICON_UNLOCKED; - else - protect = ICON_LOCKED; - } - - /* is track enabled for solo drawing? */ - if ((adt) && (adt->flag & ADT_NLA_SOLO_TRACK)) { - if ((nlt->flag & NLATRACK_SOLO) == 0) { - /* tag for special non-solo handling; also hide the mute toggles */ - nonSolo = 1; - mute = 0; - } - } - - sel = SEL_NLT(nlt); - BLI_strncpy(name, nlt->name, sizeof(name)); - - /* draw manually still */ - do_draw = TRUE; - break; - } case ANIMTYPE_NLAACTION: /* NLA Action-Line */ { bAction *act = (bAction *)ale->data; @@ -700,7 +660,7 @@ static void draw_nla_channel_list_gl(bAnimContext *ac, ListBase *anim_data, View break; } default: /* handled by standard channel-drawing API */ - // draw backdrops only... + /* (draw backdrops only...) */ ANIM_channel_draw(ac, ale, yminc, ymaxc); break; } @@ -783,25 +743,7 @@ static void draw_nla_channel_list_gl(bAnimContext *ac, ListBase *anim_data, View /* clear group value, otherwise we cause errors... */ group = 0; } - else { - /* NLA tracks - darker color if not solo track when we're showing solo */ - UI_ThemeColorShade(TH_HEADER, ((nonSolo == 0) ? 20 : -20)); - - indent += group; - offset += 0.35f * U.widget_unit * indent; - glBegin(GL_QUADS); - glVertex2f(x + offset, yminc); - glVertex2f(x + offset, ymaxc); - glVertex2f((float)v2d->cur.xmax, ymaxc); - glVertex2f((float)v2d->cur.xmax, yminc); - glEnd(); - } - /* draw expand/collapse triangle */ - if (expand > 0) { - UI_icon_draw(x + offset, ydatac, expand); - offset += 0.85f * U.widget_unit; - } /* draw special icon indicating certain data-types */ if (special > -1) { @@ -826,17 +768,6 @@ static void draw_nla_channel_list_gl(bAnimContext *ac, ListBase *anim_data, View glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_BLEND); - /* draw protect 'lock' */ - if (protect > -1) { - offset = 0.8f * U.widget_unit; - UI_icon_draw((float)(v2d->cur.xmax - offset), ydatac, protect); - } - - /* draw mute 'eye' */ - if (mute > -1) { - offset += 0.8f * U.widget_unit; - UI_icon_draw((float)(v2d->cur.xmax - offset), ydatac, mute); - } /* draw NLA-action line 'status-icons' - only when there's an action */ if ((ale->type == ANIMTYPE_NLAACTION) && (ale->data)) { diff --git a/source/blender/editors/space_nla/space_nla.c b/source/blender/editors/space_nla/space_nla.c index 4d4f27cf1ad..d0ba33358e4 100644 --- a/source/blender/editors/space_nla/space_nla.c +++ b/source/blender/editors/space_nla/space_nla.c @@ -544,7 +544,7 @@ void ED_spacetype_nla(void) art = MEM_callocN(sizeof(ARegionType), "spacetype nla region"); art->regionid = RGN_TYPE_CHANNELS; art->prefsizex = 200; - art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D; + art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES; art->init = nla_channel_area_init; art->draw = nla_channel_area_draw; |