[Bf-blender-cvs] [59b2316] master: Code Cleanup / Preemptive Bug Fixing: "action" parameter may get set when it shouldn't be
Joshua Leung
noreply at git.blender.org
Sat Mar 28 15:08:00 CET 2015
Commit: 59b2316e82a97cecd55a8089cc3fa89003cdbb12
Author: Joshua Leung
Date: Fri Jan 24 16:10:26 2014 +1300
Branches: master
https://developer.blender.org/rB59b2316e82a97cecd55a8089cc3fa89003cdbb12
Code Cleanup / Preemptive Bug Fixing: "action" parameter may get set when it shouldn't be
Logically, it makes sense that this parameter only gets used to describe the action
that the F-Curve actually belongs to (if it belongs to one). Otherwise, it should not
be set at all.
===================================================================
M source/blender/blenkernel/intern/fcurve.c
===================================================================
diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c
index 81321b9..b46958a 100644
--- a/source/blender/blenkernel/intern/fcurve.c
+++ b/source/blender/blenkernel/intern/fcurve.c
@@ -322,6 +322,7 @@ FCurve *rna_get_fcurve_context_ui(bContext *C, PointerRNA *ptr, PropertyRNA *pro
if (animdata) *animdata = NULL;
*r_driven = false;
+ if (action) *action = NULL;
/* there must be some RNA-pointer + property combon */
if (prop && tptr.id.data && RNA_property_animateable(&tptr, prop)) {
@@ -344,8 +345,12 @@ FCurve *rna_get_fcurve_context_ui(bContext *C, PointerRNA *ptr, PropertyRNA *pro
if (path) {
/* animation takes priority over drivers */
- if (adt->action && adt->action->curves.first)
+ if (adt->action && adt->action->curves.first) {
fcu = list_find_fcurve(&adt->action->curves, path, rnaindex);
+
+ if (fcu && action)
+ *action = adt->action;
+ }
/* if not animated, check if driven */
if (!fcu && (adt->drivers.first)) {
More information about the Bf-blender-cvs
mailing list