NLA: check that properties are animatable.
authorAlexander Gavrilov <angavrilov@gmail.com>
Sat, 20 Apr 2019 11:15:30 +0000 (14:15 +0300)
committerAlexander Gavrilov <angavrilov@gmail.com>
Sat, 20 Apr 2019 11:59:52 +0000 (14:59 +0300)
source/blender/blenkernel/intern/anim_sys.c

index 785c3ee..b4b699f 100644 (file)
@@ -2541,6 +2541,9 @@ static NlaEvalChannel *nlaevalchan_verify(PointerRNA *ptr, NlaEvalData *nlaeval,
     return *p_path_nec;
   }
 
+  /* Cache NULL result for now. */
+  *p_path_nec = NULL;
+
   /* Resolve the property and look it up in the key hash. */
   NlaEvalChannelKey key;
 
@@ -2553,8 +2556,11 @@ static NlaEvalChannel *nlaevalchan_verify(PointerRNA *ptr, NlaEvalData *nlaeval,
                 path);
     }
 
-    /* Cache NULL result. */
-    *p_path_nec = NULL;
+    return NULL;
+  }
+
+  /* Check that the property can be animated. */
+  if (ptr->id.data != NULL && !RNA_property_animateable(&key.ptr, key.prop)) {
     return NULL;
   }