Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2015-07-02 04:19:42 +0300
committerJoshua Leung <aligorith@gmail.com>2015-07-02 14:39:34 +0300
commitd96842bf1961f7feeef2e9fb93bcf119f75f53a8 (patch)
treef9612c4c70f5a9d50779a8181f5145d8b6b21e20 /source/blender/blenkernel/intern/fcurve.c
parentfabc4fc720dd477f1b08fa996b3dd3426c2fd81b (diff)
Fix: Keyframe indicators for NLA Strip properties fails if the AnimData has an active action
Diffstat (limited to 'source/blender/blenkernel/intern/fcurve.c')
-rw-r--r--source/blender/blenkernel/intern/fcurve.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c
index 09fbf392590..077afe5ef62 100644
--- a/source/blender/blenkernel/intern/fcurve.c
+++ b/source/blender/blenkernel/intern/fcurve.c
@@ -335,6 +335,7 @@ FCurve *rna_get_fcurve_context_ui(bContext *C, PointerRNA *ptr, PropertyRNA *pro
/* there must be some RNA-pointer + property combon */
if (prop && tptr.id.data && RNA_property_animateable(&tptr, prop)) {
AnimData *adt = BKE_animdata_from_id(tptr.id.data);
+ AnimData *adt_initial = adt;
int step = C ? 2 : 1; /* Always 1 in case we have no context (can't check in 'ancestors' of given RNA ptr). */
char *path = NULL;
@@ -391,11 +392,15 @@ FCurve *rna_get_fcurve_context_ui(bContext *C, PointerRNA *ptr, PropertyRNA *pro
}
/* if we still haven't found anything, check whether it's a "special" property */
- if ((fcu == NULL) && (adt && adt->nla_tracks.first)) {
+ /* NOTE: Need to go back to the original AnimData (vs one further up the chain,
+ * that we'd get after the loop above failed), or else this check will not
+ * work for Materials
+ */
+ if ((fcu == NULL) && (adt_initial && adt_initial->nla_tracks.first)) {
NlaTrack *nlt;
const char *propname = RNA_property_identifier(prop);
- for (nlt = adt->nla_tracks.first; nlt; nlt = nlt->next) {
+ for (nlt = adt_initial->nla_tracks.first; nlt; nlt = nlt->next) {
NlaStrip *strip;
if (fcu)