[Bf-blender-cvs] [b253be1] master: Nla Strip Keyframes: Active FCurve Keyframes panel displays names properly now (and doesn't disable the FCurves)
Joshua Leung
noreply at git.blender.org
Sat Mar 28 15:08:15 CET 2015
Commit: b253be1a1964e9ce2684a8fa1d3fa487b1513f19
Author: Joshua Leung
Date: Sun Mar 29 02:45:24 2015 +1300
Branches: master
https://developer.blender.org/rBb253be1a1964e9ce2684a8fa1d3fa487b1513f19
Nla Strip Keyframes: Active FCurve Keyframes panel displays names properly now (and doesn't disable the FCurves)
===================================================================
M source/blender/editors/space_graph/graph_buttons.c
===================================================================
diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c
index a2b64af..f1e094c31 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 */
More information about the Bf-blender-cvs
mailing list