[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [31812] trunk/blender/source/blender: Graph Editor tweaks:
Joshua Leung
aligorith at gmail.com
Tue Sep 7 14:03:09 CEST 2010
Revision: 31812
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=31812
Author: aligorith
Date: 2010-09-07 14:03:09 +0200 (Tue, 07 Sep 2010)
Log Message:
-----------
Graph Editor tweaks:
Buttons for editing RNA paths/array index for F-Curves that aren't working are now actually functional. This means that when invalid paths are present, they can be manually fixed up.
Modified Paths:
--------------
trunk/blender/source/blender/editors/animation/anim_ipo_utils.c
trunk/blender/source/blender/editors/space_graph/graph_buttons.c
trunk/blender/source/blender/makesrna/intern/rna_fcurve.c
Modified: trunk/blender/source/blender/editors/animation/anim_ipo_utils.c
===================================================================
--- trunk/blender/source/blender/editors/animation/anim_ipo_utils.c 2010-09-07 11:14:20 UTC (rev 31811)
+++ trunk/blender/source/blender/editors/animation/anim_ipo_utils.c 2010-09-07 12:03:09 UTC (rev 31812)
@@ -157,6 +157,9 @@
/* icon for this should be the icon for the base ID */
// TODO: or should we just use the error icon?
icon= RNA_struct_ui_icon(id_ptr.type);
+
+ /* tag F-Curve as disabled - as not usable path */
+ fcu->flag |= FCURVE_DISABLED;
}
}
Modified: trunk/blender/source/blender/editors/space_graph/graph_buttons.c
===================================================================
--- trunk/blender/source/blender/editors/space_graph/graph_buttons.c 2010-09-07 11:14:20 UTC (rev 31811)
+++ trunk/blender/source/blender/editors/space_graph/graph_buttons.c 2010-09-07 12:03:09 UTC (rev 31812)
@@ -184,7 +184,7 @@
/* RNA-Path Editing - only really should be enabled when things aren't working */
col= uiLayoutColumn(layout, 1);
- uiLayoutSetEnabled(col, (fcu->flag & FCURVE_DISABLED));
+ uiLayoutSetEnabled(col, (fcu->flag & FCURVE_DISABLED)!=0);
uiItemR(col, &fcu_ptr, "data_path", 0, "", ICON_RNA);
uiItemR(col, &fcu_ptr, "array_index", 0, NULL, 0);
Modified: trunk/blender/source/blender/makesrna/intern/rna_fcurve.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_fcurve.c 2010-09-07 11:14:20 UTC (rev 31811)
+++ trunk/blender/source/blender/makesrna/intern/rna_fcurve.c 2010-09-07 12:03:09 UTC (rev 31812)
@@ -324,8 +324,10 @@
if (fcu->rna_path)
MEM_freeN(fcu->rna_path);
- if (strlen(value))
+ if (strlen(value)) {
fcu->rna_path= BLI_strdup(value);
+ fcu->flag &= ~FCURVE_DISABLED;
+ }
else
fcu->rna_path= NULL;
}
More information about the Bf-blender-cvs
mailing list