diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/depsgraph_private.h | 3 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/depsgraph.c | 175 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/modifier.c | 42 | ||||
-rw-r--r-- | source/blender/src/drawdeps.c | 4 |
4 files changed, 145 insertions, 79 deletions
diff --git a/source/blender/blenkernel/depsgraph_private.h b/source/blender/blenkernel/depsgraph_private.h index 15c06b8ae79..b60c195a9af 100644 --- a/source/blender/blenkernel/depsgraph_private.h +++ b/source/blender/blenkernel/depsgraph_private.h @@ -54,6 +54,7 @@ typedef struct DagAdjList short type; int count; // number of identical arcs unsigned int lay; // for flushing redraw/rebuild events + char *name; struct DagAdjList *next; } DagAdjList; @@ -117,7 +118,7 @@ DagNode * dag_find_node (DagForest *forest,void * fob); DagNode * dag_add_node (DagForest *forest,void * fob); DagNode * dag_get_node (DagForest *forest,void * fob); DagNode * dag_get_sub_node (DagForest *forest,void * fob); -void dag_add_relation(DagForest *forest, DagNode *fob1, DagNode *fob2, short rel); +void dag_add_relation(DagForest *forest, DagNode *fob1, DagNode *fob2, short rel, char *name); void graph_bfs(void); diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c index f9687880d16..caf5c9e64b4 100644 --- a/source/blender/blenkernel/intern/depsgraph.c +++ b/source/blender/blenkernel/intern/depsgraph.c @@ -327,9 +327,9 @@ static void dag_add_driver_relation(Ipo *ipo, DagForest *dag, DagNode *node, int ob = *oba; node1 = dag_get_node(dag, ob); if (ob->type == OB_ARMATURE) - dag_add_relation(dag, node1, node, isdata?DAG_RL_DATA_DATA:DAG_RL_DATA_OB); + dag_add_relation(dag, node1, node, isdata?DAG_RL_DATA_DATA:DAG_RL_DATA_OB, "Python Ipo Driver"); else - dag_add_relation(dag, node1, node, isdata?DAG_RL_OB_DATA:DAG_RL_OB_OB); + dag_add_relation(dag, node1, node, isdata?DAG_RL_OB_DATA:DAG_RL_OB_OB, "Python Ipo Driver"); oba++; } @@ -340,9 +340,9 @@ static void dag_add_driver_relation(Ipo *ipo, DagForest *dag, DagNode *node, int else if (icu->driver->ob) { node1 = dag_get_node(dag, icu->driver->ob); if(icu->driver->blocktype==ID_AR) - dag_add_relation(dag, node1, node, isdata?DAG_RL_DATA_DATA:DAG_RL_DATA_OB); + dag_add_relation(dag, node1, node, isdata?DAG_RL_DATA_DATA:DAG_RL_DATA_OB, "Ipo Driver"); else - dag_add_relation(dag, node1, node, isdata?DAG_RL_OB_DATA:DAG_RL_OB_OB); + dag_add_relation(dag, node1, node, isdata?DAG_RL_OB_DATA:DAG_RL_OB_OB, "Ipo Driver"); } } } @@ -363,7 +363,7 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Object *ob, int if ((ob->data) && (mask&DAG_RL_DATA)) { node2 = dag_get_node(dag,ob->data); - dag_add_relation(dag,node,node2,DAG_RL_DATA); + dag_add_relation(dag,node,node2,DAG_RL_DATA, "Object-Data Relation"); node2->first_ancestor = ob; node2->ancestor_count += 1; } @@ -388,11 +388,11 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Object *ob, int node3 = dag_get_node(dag, ct->tar); if (ct->subtarget[0]) - dag_add_relation(dag,node3,node, DAG_RL_OB_DATA|DAG_RL_DATA_DATA); + dag_add_relation(dag,node3,node, DAG_RL_OB_DATA|DAG_RL_DATA_DATA, cti->name); else if(ELEM(con->type, CONSTRAINT_TYPE_FOLLOWPATH, CONSTRAINT_TYPE_CLAMPTO)) - dag_add_relation(dag,node3,node, DAG_RL_DATA_DATA|DAG_RL_OB_DATA); + dag_add_relation(dag,node3,node, DAG_RL_DATA_DATA|DAG_RL_OB_DATA, cti->name); else - dag_add_relation(dag,node3,node, DAG_RL_OB_DATA); + dag_add_relation(dag,node3,node, DAG_RL_OB_DATA, cti->name); } } @@ -440,7 +440,7 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Object *ob, int for(amod= strip->modifiers.first; amod; amod= amod->next) { if(amod->ob) { node2 = dag_get_node(dag, amod->ob); - dag_add_relation(dag, node2, node, DAG_RL_DATA_DATA|DAG_RL_OB_DATA); + dag_add_relation(dag, node2, node, DAG_RL_DATA_DATA|DAG_RL_OB_DATA, "NLA Strip Modifier"); } } } @@ -460,46 +460,46 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Object *ob, int switch(ob->partype) { case PARSKEL: - dag_add_relation(dag,node2,node,DAG_RL_DATA_DATA|DAG_RL_OB_OB); + dag_add_relation(dag,node2,node,DAG_RL_DATA_DATA|DAG_RL_OB_OB, "Parent"); break; case PARVERT1: case PARVERT3: case PARBONE: - dag_add_relation(dag,node2,node,DAG_RL_DATA_OB|DAG_RL_OB_OB); + dag_add_relation(dag,node2,node,DAG_RL_DATA_OB|DAG_RL_OB_OB, "Vertex Parent"); break; default: if(ob->parent->type==OB_LATTICE) - dag_add_relation(dag,node2,node,DAG_RL_DATA_DATA|DAG_RL_OB_OB); + dag_add_relation(dag,node2,node,DAG_RL_DATA_DATA|DAG_RL_OB_OB, "Lattice Parent"); else if(ob->parent->type==OB_CURVE) { Curve *cu= ob->parent->data; if(cu->flag & CU_PATH) - dag_add_relation(dag,node2,node,DAG_RL_DATA_OB|DAG_RL_OB_OB); + dag_add_relation(dag,node2,node,DAG_RL_DATA_OB|DAG_RL_OB_OB, "Curve Parent"); else - dag_add_relation(dag,node2,node,DAG_RL_OB_OB); + dag_add_relation(dag,node2,node,DAG_RL_OB_OB, "Curve Parent"); } else - dag_add_relation(dag,node2,node,DAG_RL_OB_OB); + dag_add_relation(dag,node2,node,DAG_RL_OB_OB, "Curve Parent"); } /* exception case: parent is duplivert */ if(ob->type==OB_MBALL && (ob->parent->transflag & OB_DUPLIVERTS)) { - dag_add_relation(dag, node2, node, DAG_RL_DATA_DATA|DAG_RL_OB_OB); + dag_add_relation(dag, node2, node, DAG_RL_DATA_DATA|DAG_RL_OB_OB, "Duplivert"); } addtoroot = 0; } if (ob->track) { node2 = dag_get_node(dag,ob->track); - dag_add_relation(dag,node2,node,DAG_RL_OB_OB); + dag_add_relation(dag,node2,node,DAG_RL_OB_OB, "Track To"); addtoroot = 0; } if (ob->proxy) { node2 = dag_get_node(dag, ob->proxy); - dag_add_relation(dag, node, node2, DAG_RL_DATA_DATA|DAG_RL_OB_OB); + dag_add_relation(dag, node, node2, DAG_RL_DATA_DATA|DAG_RL_OB_OB, "Proxy"); /* inverted relation, so addtoroot shouldn't be set to zero */ } if (ob->type==OB_CAMERA) { Camera *cam = (Camera *)ob->data; if (cam->dof_ob) { node2 = dag_get_node(dag, cam->dof_ob); - dag_add_relation(dag,node2,node,DAG_RL_OB_OB); + dag_add_relation(dag,node2,node,DAG_RL_OB_OB, "Camera DoF"); } } if (ob->transflag & OB_DUPLI) { @@ -509,7 +509,7 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Object *ob, int if(go->ob) { node2 = dag_get_node(dag, go->ob); /* node2 changes node1, this keeps animations updated in groups?? not logical? */ - dag_add_relation(dag, node2, node, DAG_RL_OB_OB); + dag_add_relation(dag, node2, node, DAG_RL_OB_OB, "Dupligroup"); } } } @@ -526,7 +526,7 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Object *ob, int Object *ob1= base->object; if((ob1->pd->deflect) && (ob1 != ob)) { node2 = dag_get_node(dag, ob1); - dag_add_relation(dag, node2, node, DAG_RL_DATA_DATA|DAG_RL_OB_DATA); + dag_add_relation(dag, node2, node, DAG_RL_DATA_DATA|DAG_RL_OB_DATA, "Softbody Collision"); } } } @@ -537,18 +537,18 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Object *ob, int Object *mom= find_basis_mball(ob); if(mom!=ob) { node2 = dag_get_node(dag, mom); - dag_add_relation(dag,node,node2,DAG_RL_DATA_DATA|DAG_RL_OB_DATA); // mom depends on children! + dag_add_relation(dag,node,node2,DAG_RL_DATA_DATA|DAG_RL_OB_DATA, "Metaball"); // mom depends on children! } } else if (ob->type==OB_CURVE) { Curve *cu= ob->data; if(cu->bevobj) { node2 = dag_get_node(dag, cu->bevobj); - dag_add_relation(dag,node2,node,DAG_RL_DATA_DATA|DAG_RL_OB_DATA); + dag_add_relation(dag,node2,node,DAG_RL_DATA_DATA|DAG_RL_OB_DATA, "Curve Bevel"); } if(cu->taperobj) { node2 = dag_get_node(dag, cu->taperobj); - dag_add_relation(dag,node2,node,DAG_RL_DATA_DATA|DAG_RL_OB_DATA); + dag_add_relation(dag,node2,node,DAG_RL_DATA_DATA|DAG_RL_OB_DATA, "Curve Taper"); } if(cu->ipo) dag_add_driver_relation(cu->ipo, dag, node, 1); @@ -558,7 +558,7 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Object *ob, int Curve *cu= ob->data; if(cu->textoncurve) { node2 = dag_get_node(dag, cu->textoncurve); - dag_add_relation(dag,node2,node,DAG_RL_DATA_DATA|DAG_RL_OB_DATA); + dag_add_relation(dag,node2,node,DAG_RL_DATA_DATA|DAG_RL_OB_DATA, "Texture On Curve"); } } else if(ob->type==OB_MESH) { @@ -569,7 +569,7 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Object *ob, int /* ob location depends on itself */ if((paf->flag & PAF_STATIC)==0) - dag_add_relation(dag, node, node, DAG_RL_OB_DATA); + dag_add_relation(dag, node, node, DAG_RL_OB_DATA, "Particle-Object Relation"); listb= pdInitEffectors(ob, paf->group); /* note, makes copy... */ if(listb) { @@ -580,9 +580,9 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Object *ob, int if(pd->forcefield) { node2 = dag_get_node(dag, ob1); if(pd->forcefield==PFIELD_GUIDE) - dag_add_relation(dag, node2, node, DAG_RL_DATA_DATA|DAG_RL_OB_DATA); + dag_add_relation(dag, node2, node, DAG_RL_DATA_DATA|DAG_RL_OB_DATA, "Particle Field"); else - dag_add_relation(dag, node2, node, DAG_RL_OB_DATA); + dag_add_relation(dag, node2, node, DAG_RL_OB_DATA, "Particle Field"); } } @@ -599,25 +599,25 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Object *ob, int for(; psys; psys=psys->next) { ParticleSettings *part= psys->part; - dag_add_relation(dag, node, node, DAG_RL_OB_DATA); + dag_add_relation(dag, node, node, DAG_RL_OB_DATA, "Particle-Object Relation"); if(part->phystype==PART_PHYS_KEYED && psys->keyed_ob && BLI_findlink(&psys->keyed_ob->particlesystem,psys->keyed_psys-1)) { node2 = dag_get_node(dag, psys->keyed_ob); - dag_add_relation(dag, node2, node, DAG_RL_DATA_DATA); + dag_add_relation(dag, node2, node, DAG_RL_DATA_DATA, "Particle Keyed Physics"); } if(part->draw_as == PART_DRAW_OB && part->dup_ob) { node2 = dag_get_node(dag, part->dup_ob); - dag_add_relation(dag, node, node2, DAG_RL_OB_OB); + dag_add_relation(dag, node, node2, DAG_RL_OB_OB, "Particle Object Visualisation"); if(part->dup_ob->type == OB_MBALL) - dag_add_relation(dag, node, node2, DAG_RL_DATA_DATA); + dag_add_relation(dag, node, node2, DAG_RL_DATA_DATA, "Particle Object Visualisation"); } if(part->draw_as == PART_DRAW_GR && part->dup_group) { for(go=part->dup_group->gobject.first; go; go=go->next) { node2 = dag_get_node(dag, go->ob); - dag_add_relation(dag, node, node2, DAG_RL_OB_OB); + dag_add_relation(dag, node, node2, DAG_RL_OB_OB, "Particle Group Visualisation"); } } @@ -632,22 +632,22 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Object *ob, int if(nec->type & PSYS_EC_EFFECTOR) { node2 = dag_get_node(dag, ob1); if(ob1->pd->forcefield==PFIELD_GUIDE) - dag_add_relation(dag, node2, node, DAG_RL_DATA_DATA|DAG_RL_OB_DATA); + dag_add_relation(dag, node2, node, DAG_RL_DATA_DATA|DAG_RL_OB_DATA, "Particle Field"); else - dag_add_relation(dag, node2, node, DAG_RL_OB_DATA); + dag_add_relation(dag, node2, node, DAG_RL_OB_DATA, "Particle Field"); } else if(nec->type & PSYS_EC_DEFLECT) { node2 = dag_get_node(dag, ob1); - dag_add_relation(dag, node2, node, DAG_RL_DATA_DATA|DAG_RL_OB_DATA); + dag_add_relation(dag, node2, node, DAG_RL_DATA_DATA|DAG_RL_OB_DATA, "Particle Collision"); } else if(nec->type & PSYS_EC_PARTICLE) { node2 = dag_get_node(dag, ob1); - dag_add_relation(dag, node2, node, DAG_RL_DATA_DATA); + dag_add_relation(dag, node2, node, DAG_RL_DATA_DATA, "Particle Field"); } if(nec->type & PSYS_EC_REACTOR) { node2 = dag_get_node(dag, ob1); - dag_add_relation(dag, node, node2, DAG_RL_DATA_DATA); + dag_add_relation(dag, node, node2, DAG_RL_DATA_DATA, "Particle Reactor"); } } } @@ -672,12 +672,12 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Object *ob, int node2 = dag_get_node(dag, obt); if (ELEM(con->type, CONSTRAINT_TYPE_FOLLOWPATH, CONSTRAINT_TYPE_CLAMPTO)) - dag_add_relation(dag, node2, node, DAG_RL_DATA_OB|DAG_RL_OB_OB); + dag_add_relation(dag, node2, node, DAG_RL_DATA_OB|DAG_RL_OB_OB, cti->name); else { if (ELEM3(obt->type, OB_ARMATURE, OB_MESH, OB_LATTICE) && (ct->subtarget[0])) - dag_add_relation(dag, node2, node, DAG_RL_DATA_OB|DAG_RL_OB_OB); + dag_add_relation(dag, node2, node, DAG_RL_DATA_OB|DAG_RL_OB_OB, cti->name); else - dag_add_relation(dag, node2, node, DAG_RL_OB_OB); + dag_add_relation(dag, node2, node, DAG_RL_OB_OB, cti->name); } addtoroot = 0; } @@ -688,7 +688,7 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Object *ob, int } if (addtoroot == 1 ) - dag_add_relation(dag,scenenode,node,DAG_RL_SCENE); + dag_add_relation(dag,scenenode,node,DAG_RL_SCENE, "Scene Relation"); } struct DagForest *build_dag(struct Scene *sce, short mask) @@ -879,7 +879,7 @@ DagNode * dag_get_sub_node (DagForest *forest,void * fob) return node; } -void dag_add_relation(DagForest *forest, DagNode *fob1, DagNode *fob2, short rel) +void dag_add_relation(DagForest *forest, DagNode *fob1, DagNode *fob2, short rel, char *name) { DagAdjList *itA = fob1->child; @@ -897,10 +897,11 @@ void dag_add_relation(DagForest *forest, DagNode *fob1, DagNode *fob2, short rel itA->type = rel; itA->count = 1; itA->next = fob1->child; + itA->name = name; fob1->child = itA; } -static void dag_add_parent_relation(DagForest *forest, DagNode *fob1, DagNode *fob2, short rel) +static void dag_add_parent_relation(DagForest *forest, DagNode *fob1, DagNode *fob2, short rel, char *name) { DagAdjList *itA = fob2->parent; @@ -918,9 +919,66 @@ static void dag_add_parent_relation(DagForest *forest, DagNode *fob1, DagNode *f itA->type = rel; itA->count = 1; itA->next = fob2->parent; + itA->name = name; fob2->parent = itA; } +static char *dag_node_name(DagNode *node) +{ + if(node->ob == NULL) + return "null"; + else if(ugly_hack_sorry) + return ((ID*)(node->ob))->name+2; + else + return ((bPoseChannel*)(node->ob))->name; +} + +#if 0 +static void dag_node_print_dependencies(DagNode *node) +{ + DagAdjList *itA; + + printf("%s depends on:\n", dag_node_name(node)); + + for(itA= node->parent; itA; itA= itA->next) + printf(" %s through %s\n", dag_node_name(itA->node), itA->name); + printf("\n"); +} +#endif + +static int dag_node_print_dependency_recurs(DagNode *node, DagNode *endnode) +{ + DagAdjList *itA; + + if(node->color == DAG_BLACK) + return 0; + + node->color= DAG_BLACK; + + if(node == endnode) + return 1; + + for(itA= node->parent; itA; itA= itA->next) { + if(dag_node_print_dependency_recurs(itA->node, endnode)) { + printf(" %s depends on %s through %s.\n", dag_node_name(node), dag_node_name(itA->node), itA->name); + return 1; + } + } + + return 0; +} + +static void dag_node_print_dependency_cycle(DagForest *dag, DagNode *startnode, DagNode *endnode, char *name) +{ + DagNode *node; + + for(node = dag->DagNode.first; node; node= node->next) + node->color= DAG_WHITE; + + printf(" %s depends on %s through %s.\n", dag_node_name(endnode), dag_node_name(startnode), name); + dag_node_print_dependency_recurs(startnode, endnode); + printf("\n"); +} /* * MainDAG is the DAG of all objects in current scene @@ -2204,9 +2262,10 @@ static void pose_check_cycle(DagForest *dag) bPoseChannel *pchan= (bPoseChannel *)node->ob; bPoseChannel *parchan= (bPoseChannel *)itA->node->ob; - if(pchan && parchan) - if(pchan->parent!=parchan) - printf("Cycle in %s to %s\n", pchan->name, parchan->name); + if(pchan && parchan) { + printf("Cycle detected:\n"); + dag_node_print_dependency_cycle(dag, itA->node, node, itA->name); + } } } } @@ -2240,8 +2299,8 @@ void DAG_pose_sort(Object *ob) if(pchan->parent) { node2 = dag_get_node(dag, pchan->parent); - dag_add_relation(dag, node2, node, 0); - dag_add_parent_relation(dag, node2, node, 0); + dag_add_relation(dag, node2, node, 0, "Parent Relation"); + dag_add_parent_relation(dag, node2, node, 0, "Parent Relation"); addtoroot = 0; } for (con = pchan->constraints.first; con; con=con->next) { @@ -2259,8 +2318,8 @@ void DAG_pose_sort(Object *ob) bPoseChannel *target= get_pose_channel(ob->pose, icu->driver->name); if(target) { node2 = dag_get_node(dag, target); - dag_add_relation(dag, node2, node, 0); - dag_add_parent_relation(dag, node2, node, 0); + dag_add_relation(dag, node2, node, 0, "Ipo Driver"); + dag_add_parent_relation(dag, node2, node, 0, "Ipo Driver"); /* uncommented this line, results in dependencies * not being added properly for this constraint, @@ -2279,9 +2338,9 @@ void DAG_pose_sort(Object *ob) bPoseChannel *target= get_pose_channel(ob->pose, ct->subtarget); if (target) { node2= dag_get_node(dag, target); - dag_add_relation(dag, node2, node, 0); - dag_add_parent_relation(dag, node2, node, 0); - + dag_add_relation(dag, node2, node, 0, "IK Constraint"); + dag_add_parent_relation(dag, node2, node, 0, "IK Constraint"); + if (con->type==CONSTRAINT_TYPE_KINEMATIC) { bKinematicConstraint *data = (bKinematicConstraint *)con->data; bPoseChannel *parchan; @@ -2296,8 +2355,8 @@ void DAG_pose_sort(Object *ob) /* Walk to the chain's root */ while (parchan) { node3= dag_get_node(dag, parchan); - dag_add_relation(dag, node2, node3, 0); - dag_add_parent_relation(dag, node2, node3, 0); + dag_add_relation(dag, node2, node3, 0, "IK Constraint"); + dag_add_parent_relation(dag, node2, node3, 0, "IK Constraint"); segcount++; if (segcount==data->rootbone || segcount>255) break; // 255 is weak @@ -2313,8 +2372,8 @@ void DAG_pose_sort(Object *ob) } } if (addtoroot == 1 ) { - dag_add_relation(dag, rootnode, node, 0); - dag_add_parent_relation(dag, rootnode, node, 0); + dag_add_relation(dag, rootnode, node, 0, "Root Bone Relation"); + dag_add_parent_relation(dag, rootnode, node, 0, "Root Bone Relation"); } } diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index 0f51c74c248..ecd396c22f3 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -169,7 +169,7 @@ static void curveModifier_updateDepgraph( DagNode *curNode = dag_get_node(forest, cmd->object); dag_add_relation(forest, curNode, obNode, - DAG_RL_DATA_DATA | DAG_RL_OB_DATA); + DAG_RL_DATA_DATA | DAG_RL_OB_DATA, "Curve Modifier"); } } @@ -244,7 +244,7 @@ static void latticeModifier_updateDepgraph(ModifierData *md, DagForest *forest, DagNode *latNode = dag_get_node(forest, lmd->object); dag_add_relation(forest, latNode, obNode, - DAG_RL_DATA_DATA | DAG_RL_OB_DATA); + DAG_RL_DATA_DATA | DAG_RL_OB_DATA, "Lattice Modifier"); } } @@ -644,25 +644,25 @@ static void arrayModifier_updateDepgraph(ModifierData *md, DagForest *forest, DagNode *curNode = dag_get_node(forest, amd->start_cap); dag_add_relation(forest, curNode, obNode, - DAG_RL_DATA_DATA | DAG_RL_OB_DATA); + DAG_RL_DATA_DATA | DAG_RL_OB_DATA, "Array Modifier"); } if (amd->end_cap) { DagNode *curNode = dag_get_node(forest, amd->end_cap); dag_add_relation(forest, curNode, obNode, - DAG_RL_DATA_DATA | DAG_RL_OB_DATA); + DAG_RL_DATA_DATA | DAG_RL_OB_DATA, "Array Modifier"); } if (amd->curve_ob) { DagNode *curNode = dag_get_node(forest, amd->curve_ob); dag_add_relation(forest, curNode, obNode, - DAG_RL_DATA_DATA | DAG_RL_OB_DATA); + DAG_RL_DATA_DATA | DAG_RL_OB_DATA, "Array Modifier"); } if (amd->offset_ob) { DagNode *curNode = dag_get_node(forest, amd->offset_ob); dag_add_relation(forest, curNode, obNode, - DAG_RL_DATA_DATA | DAG_RL_OB_DATA); + DAG_RL_DATA_DATA | DAG_RL_OB_DATA, "Array Modifier"); } } @@ -1298,7 +1298,7 @@ static void mirrorModifier_updateDepgraph(ModifierData *md, DagForest *forest, DagNode *latNode = dag_get_node(forest, mmd->mirror_ob); dag_add_relation(forest, latNode, obNode, - DAG_RL_DATA_DATA | DAG_RL_OB_DATA); + DAG_RL_DATA_DATA | DAG_RL_OB_DATA, "Mirror Modifier"); } } @@ -2842,7 +2842,7 @@ static void displaceModifier_updateDepgraph( DagNode *curNode = dag_get_node(forest, dmd->map_object); dag_add_relation(forest, curNode, obNode, - DAG_RL_DATA_DATA | DAG_RL_OB_DATA); + DAG_RL_DATA_DATA | DAG_RL_OB_DATA, "Displace Modifier"); } } @@ -3164,7 +3164,7 @@ static void uvprojectModifier_updateDepgraph(ModifierData *md, DagNode *curNode = dag_get_node(forest, umd->projectors[i]); dag_add_relation(forest, curNode, obNode, - DAG_RL_DATA_DATA | DAG_RL_OB_DATA); + DAG_RL_DATA_DATA | DAG_RL_OB_DATA, "UV Project Modifier"); } } } @@ -3841,7 +3841,8 @@ static void castModifier_updateDepgraph( if (cmd->object) { DagNode *curNode = dag_get_node(forest, cmd->object); - dag_add_relation(forest, curNode, obNode, DAG_RL_OB_DATA); + dag_add_relation(forest, curNode, obNode, DAG_RL_OB_DATA, + "Cast Modifier"); } } @@ -4427,13 +4428,15 @@ static void waveModifier_updateDepgraph( if(wmd->objectcenter) { DagNode *curNode = dag_get_node(forest, wmd->objectcenter); - dag_add_relation(forest, curNode, obNode, DAG_RL_OB_DATA); + dag_add_relation(forest, curNode, obNode, DAG_RL_OB_DATA, + "Wave Modifier"); } if(wmd->map_object) { DagNode *curNode = dag_get_node(forest, wmd->map_object); - dag_add_relation(forest, curNode, obNode, DAG_RL_OB_DATA); + dag_add_relation(forest, curNode, obNode, DAG_RL_OB_DATA, + "Wave Modifer"); } } @@ -4787,7 +4790,7 @@ static void armatureModifier_updateDepgraph( DagNode *curNode = dag_get_node(forest, amd->object); dag_add_relation(forest, curNode, obNode, - DAG_RL_DATA_DATA | DAG_RL_OB_DATA); + DAG_RL_DATA_DATA | DAG_RL_OB_DATA, "Armature Modifier"); } } @@ -4907,7 +4910,8 @@ static void hookModifier_updateDepgraph(ModifierData *md, DagForest *forest, if (hmd->object) { DagNode *curNode = dag_get_node(forest, hmd->object); - dag_add_relation(forest, curNode, obNode, DAG_RL_OB_DATA); + dag_add_relation(forest, curNode, obNode, DAG_RL_OB_DATA, + "Hook Modifier"); } } @@ -5110,7 +5114,7 @@ static void clothModifier_updateDepgraph( if(coll_clmd) { DagNode *curNode = dag_get_node(forest, ob1); - dag_add_relation(forest, curNode, obNode, DAG_RL_DATA_DATA|DAG_RL_OB_DATA); + dag_add_relation(forest, curNode, obNode, DAG_RL_DATA_DATA|DAG_RL_OB_DATA, "Cloth Collision"); } } } @@ -5390,7 +5394,7 @@ static void booleanModifier_updateDepgraph( DagNode *curNode = dag_get_node(forest, bmd->object); dag_add_relation(forest, curNode, obNode, - DAG_RL_DATA_DATA | DAG_RL_OB_DATA); + DAG_RL_DATA_DATA | DAG_RL_OB_DATA, "Boolean Modifier"); } } @@ -5644,7 +5648,8 @@ static void particleInstanceModifier_updateDepgraph(ModifierData *md, DagForest DagNode *curNode = dag_get_node(forest, pimd->ob); dag_add_relation(forest, curNode, obNode, - DAG_RL_DATA_DATA | DAG_RL_OB_DATA); + DAG_RL_DATA_DATA | DAG_RL_OB_DATA, + "Particle Instance Modifier"); } } @@ -6722,7 +6727,8 @@ static void meshdeformModifier_updateDepgraph( DagNode *curNode = dag_get_node(forest, mmd->object); dag_add_relation(forest, curNode, obNode, - DAG_RL_DATA_DATA|DAG_RL_OB_DATA|DAG_RL_DATA_OB|DAG_RL_OB_OB); + DAG_RL_DATA_DATA|DAG_RL_OB_DATA|DAG_RL_DATA_OB|DAG_RL_OB_OB, + "Mesh Deform Modifier"); } } diff --git a/source/blender/src/drawdeps.c b/source/blender/src/drawdeps.c index d948f31009b..153a5fc8b5a 100644 --- a/source/blender/src/drawdeps.c +++ b/source/blender/src/drawdeps.c @@ -272,14 +272,14 @@ DagNode * scenenode; if ((ob->data) && (mask&DAG_RL_DATA)) { node2 = dag_get_node(dag,ob->data); - dag_add_relation(dag,node,node2,DAG_RL_DATA); + dag_add_relation(dag,node,node2,DAG_RL_DATA, "Object-Data Relation"); node2->first_ancestor = ob; node2->ancestor_count += 1; } if (addtoroot == 1 ) - dag_add_relation(dag,scenenode,node,DAG_RL_SCENE); + dag_add_relation(dag,scenenode,node,DAG_RL_SCENE, "Scene Relation"); base= base->next; } |