[Bf-blender-cvs] [9fc1033] master: Fix T44748: Particle is not displayed definitely when I use a new dependence graph
Sergey Sharybin
noreply at git.blender.org
Wed May 27 16:23:11 CEST 2015
Commit: 9fc1033429bffbaa9fa3bea106e9f5a4c5a3cf65
Author: Sergey Sharybin
Date: Wed May 27 19:22:23 2015 +0500
Branches: master
https://developer.blender.org/rB9fc1033429bffbaa9fa3bea106e9f5a4c5a3cf65
Fix T44748: Particle is not displayed definitely when I use a new dependence graph
===================================================================
M source/blender/depsgraph/intern/depsgraph_build_relations.cc
===================================================================
diff --git a/source/blender/depsgraph/intern/depsgraph_build_relations.cc b/source/blender/depsgraph/intern/depsgraph_build_relations.cc
index 5d51bfe..b59d845 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;
More information about the Bf-blender-cvs
mailing list