Merging r39397 through r39434 from trunk into soc-2011-tomato
[blender-staging.git] / source / blender / blenkernel / intern / depsgraph.c
index e78666faebb3c59ccb6860b0b26698a5073e7300..0585400038133655d78119383413b55bd9aa94bd 100644 (file)
@@ -302,6 +302,7 @@ static void dag_add_driver_relation(AnimData *adt, DagForest *dag, DagNode *node
        for (fcu= adt->drivers.first; fcu; fcu= fcu->next) {
                ChannelDriver *driver= fcu->driver;
                DriverVar *dvar;
+               int isdata_fcu = isdata || (fcu->rna_path && strstr(fcu->rna_path, "modifiers["));
                
                /* loop over variables to get the target relationships */
                for (dvar= driver->variables.first; dvar; dvar= dvar->next) {
@@ -321,14 +322,14 @@ static void dag_add_driver_relation(AnimData *adt, DagForest *dag, DagNode *node
                                                        ( ((dtar->rna_path) && strstr(dtar->rna_path, "pose.bones[")) || 
                                                          ((dtar->flag & DTAR_FLAG_STRUCT_REF) && (dtar->pchan_name[0])) )) 
                                                {
-                                                       dag_add_relation(dag, node1, node, isdata?DAG_RL_DATA_DATA:DAG_RL_DATA_OB, "Driver");
+                                                       dag_add_relation(dag, node1, node, isdata_fcu?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");
+                                                       dag_add_relation(dag, node1, node, isdata_fcu?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");
+                                                       dag_add_relation(dag, node1, node, isdata_fcu?DAG_RL_OB_DATA:DAG_RL_OB_OB, "Driver");
                                        }
                                }
                        }