diff options
author | Joshua Leung <aligorith@gmail.com> | 2015-03-28 16:45:24 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2015-03-28 16:45:24 +0300 |
commit | b253be1a1964e9ce2684a8fa1d3fa487b1513f19 (patch) | |
tree | c677406d6dc1cec3937b161cd426ad5786c37cde /source/blender | |
parent | 0c5d0422b4fb8b058826db9a7b0f11868aedaa0d (diff) |
Nla Strip Keyframes: Active FCurve Keyframes panel displays names properly now (and doesn't disable the FCurves)
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/space_graph/graph_buttons.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c index a2b64afdb15..f1e094c31ed 100644 --- a/source/blender/editors/space_graph/graph_buttons.c +++ b/source/blender/editors/space_graph/graph_buttons.c @@ -165,9 +165,28 @@ static void graph_panel_properties(const bContext *C, Panel *pa) RNA_pointer_create(ale->id, &RNA_FCurve, fcu, &fcu_ptr); /* user-friendly 'name' for F-Curve */ - /* TODO: only show the path if this is invalid? */ col = uiLayoutColumn(layout, false); - icon = getname_anim_fcurve(name, ale->id, fcu); + if (ale->type == ANIMTYPE_FCURVE) { + /* get user-friendly name for F-Curve */ + icon = getname_anim_fcurve(name, ale->id, fcu); + } + else { + /* NLA Control Curve, etc. */ + bAnimChannelType *acf = ANIM_channel_get_typeinfo(ale); + + /* get name */ + if (acf && acf->name) { + acf->name(ale, name); + } + else { + strcpy(name, IFACE_("<invalid>")); + icon = ICON_ERROR; + } + + /* icon */ + if (ale->type == ANIMTYPE_NLACURVE) + icon = ICON_NLA; + } uiItemL(col, name, icon); /* RNA-Path Editing - only really should be enabled when things aren't working */ |