diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-05-27 17:22:23 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-05-27 17:22:52 +0300 |
commit | 9fc1033429bffbaa9fa3bea106e9f5a4c5a3cf65 (patch) | |
tree | eb12d46f329db32a3084f8ee0c54e1c1c9371819 /source/blender/depsgraph | |
parent | b52af946cd92993dd6918797214d956070813878 (diff) |
Fix T44748: Particle is not displayed definitely when I use a new dependence graph
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph_build_relations.cc | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_build_relations.cc b/source/blender/depsgraph/intern/depsgraph_build_relations.cc index 5d51bfe750d..b59d845f60c 100644 --- a/source/blender/depsgraph/intern/depsgraph_build_relations.cc +++ b/source/blender/depsgraph/intern/depsgraph_build_relations.cc @@ -998,6 +998,11 @@ 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; @@ -1012,6 +1017,22 @@ void DepsgraphRelationBuilder::build_particles(Scene *scene, Object *ob) 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; |