diff options
Diffstat (limited to 'source/blender/depsgraph/intern/depsgraph_build_relations.cc')
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph_build_relations.cc | 134 |
1 files changed, 0 insertions, 134 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_build_relations.cc b/source/blender/depsgraph/intern/depsgraph_build_relations.cc index 226991e7b11..f0f1f83c264 100644 --- a/source/blender/depsgraph/intern/depsgraph_build_relations.cc +++ b/source/blender/depsgraph/intern/depsgraph_build_relations.cc @@ -79,7 +79,6 @@ extern "C" { #include "BKE_modifier.h" #include "BKE_node.h" #include "BKE_object.h" -#include "BKE_particle.h" #include "BKE_rigidbody.h" #include "BKE_sound.h" #include "BKE_texture.h" @@ -434,11 +433,6 @@ void DepsgraphRelationBuilder::build_object(Main *bmain, Scene *scene, Object *o } } - /* particle systems */ - if (ob->particlesystem.first) { - build_particles(scene, ob); - } - /* grease pencil */ if (ob->gpd) { build_gpencil(&ob->id, ob->gpd); @@ -1020,134 +1014,6 @@ void DepsgraphRelationBuilder::build_rigidbody(Scene *scene) } } -void DepsgraphRelationBuilder::build_particles(Scene *scene, Object *ob) -{ - TimeSourceKey time_src_key; - OperationKey obdata_ubereval_key(&ob->id, - DEPSNODE_TYPE_GEOMETRY, - DEG_OPCODE_GEOMETRY_UBEREVAL); - - /* particle systems */ - for (ParticleSystem *psys = (ParticleSystem *)ob->particlesystem.first; psys; psys = psys->next) { - ParticleSettings *part = psys->part; - - /* particle settings */ - build_animdata(&part->id); - - /* this particle system */ - OperationKey psys_key(&ob->id, DEPSNODE_TYPE_EVAL_PARTICLES, DEG_OPCODE_PSYS_EVAL, psys->name); - - /* XXX: if particle system is later re-enabled, we must do full rebuild? */ - if (!psys_check_enabled(ob, psys)) - continue; - - /* TODO(sergey): Are all particle systems depends on time? - * Hair without dynamics i.e. - */ - add_relation(time_src_key, psys_key, - DEPSREL_TYPE_TIME, - "TimeSrc -> PSys"); - - /* TODO(sergey): Currently particle update is just a placeholder, - * hook it to the ubereval node so particle system is getting updated - * on playback. - */ - add_relation(psys_key, - obdata_ubereval_key, - DEPSREL_TYPE_OPERATION, - "PSys -> UberEval"); - -#if 0 - if (ELEM(part->phystype, PART_PHYS_KEYED, PART_PHYS_BOIDS)) { - ParticleTarget *pt; - - for (pt = psys->targets.first; pt; pt = pt->next) { - if (pt->ob && BLI_findlink(&pt->ob->particlesystem, pt->psys - 1)) { - node2 = dag_get_node(dag, pt->ob); - dag_add_relation(dag, node2, node, DAG_RL_DATA_DATA | DAG_RL_OB_DATA, "Particle Targets"); - } - } - } - - if (part->ren_as == PART_DRAW_OB && part->dup_ob) { - node2 = dag_get_node(dag, part->dup_ob); - /* note that this relation actually runs in the wrong direction, the problem - * is that dupli system all have this (due to parenting), and the render - * engine instancing assumes particular ordering of objects in list */ - dag_add_relation(dag, node, node2, DAG_RL_OB_OB, "Particle Object Visualization"); - if (part->dup_ob->type == OB_MBALL) - dag_add_relation(dag, node, node2, DAG_RL_DATA_DATA, "Particle Object Visualization"); - } - - if (part->ren_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, node2, node, DAG_RL_OB_OB, "Particle Group Visualization"); - } - } -#endif - - /* effectors */ - ListBase *effectors = pdInitEffectors(scene, ob, psys, part->effector_weights, false); - - if (effectors) { - for (EffectorCache *eff = (EffectorCache *)effectors->first; eff; eff = eff->next) { - if (eff->psys) { - // XXX: DAG_RL_DATA_DATA | DAG_RL_OB_DATA - ComponentKey eff_key(&eff->ob->id, DEPSNODE_TYPE_GEOMETRY); // xxx: particles instead? - add_relation(eff_key, psys_key, DEPSREL_TYPE_STANDARD, "Particle Field"); - } - } - } - - pdEndEffectors(&effectors); - - /* boids */ - if (part->boids) { - BoidRule *rule = NULL; - BoidState *state = NULL; - - for (state = (BoidState *)part->boids->states.first; state; state = state->next) { - for (rule = (BoidRule *)state->rules.first; rule; rule = rule->next) { - Object *ruleob = NULL; - if (rule->type == eBoidRuleType_Avoid) - ruleob = ((BoidRuleGoalAvoid *)rule)->ob; - else if (rule->type == eBoidRuleType_FollowLeader) - ruleob = ((BoidRuleFollowLeader *)rule)->ob; - - if (ruleob) { - ComponentKey ruleob_key(&ruleob->id, DEPSNODE_TYPE_TRANSFORM); - add_relation(ruleob_key, psys_key, DEPSREL_TYPE_TRANSFORM, "Boid Rule"); - } - } - } - } - - if (part->ren_as == PART_DRAW_OB && part->dup_ob) { - ComponentKey dup_ob_key(&part->dup_ob->id, DEPSNODE_TYPE_TRANSFORM); - add_relation(dup_ob_key, - psys_key, - DEPSREL_TYPE_TRANSFORM, - "Particle Object Visualization"); - } - } - - /* Particle depends on the object transform, so that channel is to be ready - * first. - * - * TODO(sergey): This relation should be altered once real granular update - * is implemented. - */ - ComponentKey transform_key(&ob->id, DEPSNODE_TYPE_TRANSFORM); - add_relation(transform_key, - obdata_ubereval_key, - DEPSREL_TYPE_GEOMETRY_EVAL, - "Partcile Eval"); - - /* pointcache */ - // TODO... -} - /* IK Solver Eval Steps */ void DepsgraphRelationBuilder::build_ik_pose(Object *ob, bPoseChannel *pchan, |