Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-11-17 17:27:02 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-11-17 17:27:02 +0300
commit9c0a38ee338f0eb2f878df3dc5a1b8c493c4b9ac (patch)
tree2f92fbfa59b205ffbad46382eb2ab6b77231d73a /source/blender/depsgraph
parentc45afcfa81e67c7b560a5ee0a3e599902e3dfee9 (diff)
Depsgraph: Add missing checks from previous commit
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index f03cf679833..40fb4c9fe69 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -190,7 +190,7 @@ static bool particle_system_depends_on_time(ParticleSystem *psys)
return false;
}
-static bool object_particles_depends_oin_time(Object *object)
+static bool object_particles_depends_on_time(Object *object)
{
LINKLIST_FOREACH (ParticleSystem *, psys, &object->particlesystem) {
if (particle_system_depends_on_time(psys)) {
@@ -1354,10 +1354,9 @@ void DepsgraphRelationBuilder::build_particles(Object *ob)
OperationKey eval_init_key(&ob->id,
DEG_NODE_TYPE_EVAL_PARTICLES,
DEG_OPCODE_PARTICLE_SYSTEM_EVAL_INIT);
- /* TODO(sergey): Are all particle systems depends on time?
- * Hair without dynamics i.e.
- */
- add_relation(time_src_key, eval_init_key, "TimeSrc -> PSys");
+ if (object_particles_depends_on_time(ob)) {
+ add_relation(time_src_key, eval_init_key, "TimeSrc -> PSys");
+ }
/* particle systems */
LINKLIST_FOREACH (ParticleSystem *, psys, &ob->particlesystem) {
@@ -1587,7 +1586,7 @@ void DepsgraphRelationBuilder::build_obdata_geom(Object *ob)
*
* Ideally we need to get rid of this relation.
*/
- if (object_particles_depends_oin_time(ob)) {
+ if (object_particles_depends_on_time(ob)) {
TimeSourceKey time_key;
OperationKey obdata_ubereval_key(&ob->id,
DEG_NODE_TYPE_GEOMETRY,