Fix for bug #8124: dupli particles were not rendering in some cases,
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 29 Jan 2008 18:29:14 +0000 (18:29 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 29 Jan 2008 18:29:14 +0000 (18:29 +0000)
now added dependencies so they are passed to the render engine in
the right order to detect the duplis.

source/blender/blenkernel/intern/depsgraph.c

index e1cecaa7a61068eea5a8753669b1d06da9b92ed1..5133381ba9fbc63866db9a9f14cb6d494968f8ad 100644 (file)
@@ -593,6 +593,7 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Object *ob, int
        psys= ob->particlesystem.first;
        if(psys) {
                ParticleEffectorCache *nec;
+               GroupObject *go;
 
                for(; psys; psys=psys->next) {
                        ParticleSettings *part= psys->part;
@@ -605,6 +606,18 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Object *ob, int
                                dag_add_relation(dag, node2, node, DAG_RL_DATA_DATA);
                        }
 
+                       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);
+                       }
+
+                       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);
+                               }
+                       }
+
                        if(psys->effectors.first)
                                psys_end_effectors(psys);
                        psys_init_effectors(ob,psys->part->eff_group,psys);