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-07-21 12:16:37 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-07-21 12:18:02 +0300
commit9fbef5d5d5cd172aa8225134213fb0c3eeea1009 (patch)
tree401bec7b8d0d069a8769e77c1951cdd81ecc943c /source/blender/depsgraph
parentc425653f1647d094583b29f004eee5cd4f6e9446 (diff)
parent4d67034076f58905f03d947af7cfe3455b4f33ab (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_nodes.cc13
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations.cc12
-rw-r--r--source/blender/depsgraph/intern/depsgraph_type_defines.cc1
-rw-r--r--source/blender/depsgraph/intern/depsgraph_types.h1
4 files changed, 18 insertions, 9 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
index 5a552414cd3..93db8724dce 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
@@ -711,6 +711,13 @@ void DepsgraphNodeBuilder::build_particles(Scene *scene, Object *ob)
Scene *scene_cow = get_cow_datablock(scene);
Object *ob_cow = get_cow_datablock(ob);
+ add_operation_node(psys_comp,
+ function_bind(BKE_particle_system_eval_init,
+ _1,
+ scene_cow,
+ ob_cow),
+ DEG_OPCODE_PARTICLE_SYSTEM_EVAL_INIT);
+
/* particle systems */
LINKLIST_FOREACH (ParticleSystem *, psys, &ob->particlesystem) {
ParticleSettings *part = psys->part;
@@ -731,11 +738,7 @@ void DepsgraphNodeBuilder::build_particles(Scene *scene, Object *ob)
/* Particle system evaluation. */
add_operation_node(psys_comp,
- function_bind(BKE_particle_system_eval,
- _1,
- scene_cow,
- ob_cow,
- psys),
+ NULL,
DEG_OPCODE_PARTICLE_SYSTEM_EVAL,
psys->name);
}
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index 03cae598d24..93d9aab1898 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -1244,6 +1244,13 @@ void DepsgraphRelationBuilder::build_particles(Scene *scene, Object *ob)
OperationKey obdata_ubereval_key(&ob->id,
DEG_NODE_TYPE_GEOMETRY,
DEG_OPCODE_GEOMETRY_UBEREVAL);
+ 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");
/* particle systems */
LINKLIST_FOREACH (ParticleSystem *, psys, &ob->particlesystem) {
@@ -1283,10 +1290,7 @@ void DepsgraphRelationBuilder::build_particles(Scene *scene, Object *ob)
if (!psys_check_enabled(ob, psys, G.is_rendering))
continue;
- /* TODO(sergey): Are all particle systems depends on time?
- * Hair without dynamics i.e.
- */
- add_relation(time_src_key, psys_key, "TimeSrc -> PSys");
+ add_relation(eval_init_key, psys_key, "Init -> PSys");
/* TODO(sergey): Currently particle update is just a placeholder,
* hook it to the ubereval node so particle system is getting updated
diff --git a/source/blender/depsgraph/intern/depsgraph_type_defines.cc b/source/blender/depsgraph/intern/depsgraph_type_defines.cc
index be2630384ea..405c8e87339 100644
--- a/source/blender/depsgraph/intern/depsgraph_type_defines.cc
+++ b/source/blender/depsgraph/intern/depsgraph_type_defines.cc
@@ -130,6 +130,7 @@ static const char *stringify_opcode(eDepsOperation_Code opcode)
STRINGIFY_OPCODE(BONE_READY);
STRINGIFY_OPCODE(BONE_DONE);
/* Particles. */
+ STRINGIFY_OPCODE(PARTICLE_SYSTEM_EVAL_INIT);
STRINGIFY_OPCODE(PARTICLE_SYSTEM_EVAL);
STRINGIFY_OPCODE(PARTICLE_SETTINGS_EVAL);
STRINGIFY_OPCODE(PARTICLE_SETTINGS_RECALC_CLEAR);
diff --git a/source/blender/depsgraph/intern/depsgraph_types.h b/source/blender/depsgraph/intern/depsgraph_types.h
index af18abdb684..ba776d5ebd5 100644
--- a/source/blender/depsgraph/intern/depsgraph_types.h
+++ b/source/blender/depsgraph/intern/depsgraph_types.h
@@ -210,6 +210,7 @@ typedef enum eDepsOperation_Code {
/* Particles. --------------------------------------- */
/* Particle System evaluation. */
+ DEG_OPCODE_PARTICLE_SYSTEM_EVAL_INIT,
DEG_OPCODE_PARTICLE_SYSTEM_EVAL,
DEG_OPCODE_PARTICLE_SETTINGS_EVAL,
DEG_OPCODE_PARTICLE_SETTINGS_RECALC_CLEAR,