small merge needed for testing new animsys in 2.5 BGE, mixing own changes with merge...
[blender.git] / source / blender / blenkernel / intern / depsgraph.c
index a34f99d253fb0f514bf1dbf7965a254ad6761812..dfe3b7ea27943f5d2ca8301c4290a21f683c7709 100644 (file)
@@ -33,8 +33,6 @@
 #include "BLI_winstuff.h"
 #endif
 
-//#include "BMF_Api.h"
-
 #include "BLI_blenlib.h"
 #include "BLI_arithb.h"
 
@@ -326,6 +324,10 @@ static void dag_add_driver_relation(AnimData *adt, DagForest *dag, DagNode *node
                                        /* check if bone... */
                                        if ((ob->type==OB_ARMATURE) && dtar->rna_path && strstr(dtar->rna_path, "pose.pose_channels["))
                                                dag_add_relation(dag, node1, node, isdata?DAG_RL_DATA_DATA:DAG_RL_DATA_OB, "Driver");
+                                       /* check if ob data */
+                                       else if (dtar->rna_path && strstr(dtar->rna_path, "data."))
+                                               dag_add_relation(dag, node1, node, isdata?DAG_RL_DATA_DATA:DAG_RL_DATA_OB, "Driver");
+                                       /* normal */
                                        else
                                                dag_add_relation(dag, node1, node, isdata?DAG_RL_OB_DATA:DAG_RL_OB_OB, "Driver");
                                }