diff options
author | Jacques Lucke <jacques@blender.org> | 2020-07-27 17:26:32 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-07-27 17:26:43 +0300 |
commit | 38e65331a8345054874e81668772dc8c66ad1a1e (patch) | |
tree | d30764b2b9193a01d01dcba5efc19a308a3f31fa /source/blender/nodes | |
parent | a83bb170b09d109b93e80002112e4a28ce5d6ff9 (diff) |
Particles: initial support for events and actions
The following nodes work now (although things can still be improved of course):
Particle Birth Event, Praticle Time Step Event, Set Particle Attribute and Execute Condition.
Multiple Set Particle Attribute nodes can be chained using the "Execute" sockets.
They will be executed from left to right.
Diffstat (limited to 'source/blender/nodes')
-rw-r--r-- | source/blender/nodes/simulation/nodes/node_sim_set_particle_attribute.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/nodes/simulation/nodes/node_sim_set_particle_attribute.cc b/source/blender/nodes/simulation/nodes/node_sim_set_particle_attribute.cc index 8696dbe340c..8f5c6818cb4 100644 --- a/source/blender/nodes/simulation/nodes/node_sim_set_particle_attribute.cc +++ b/source/blender/nodes/simulation/nodes/node_sim_set_particle_attribute.cc @@ -18,6 +18,7 @@ #include "node_simulation_util.h" static bNodeSocketTemplate sim_node_set_particle_attribute_in[] = { + {SOCK_CONTROL_FLOW, N_("Execute")}, {SOCK_STRING, N_("Name")}, {SOCK_FLOAT, N_("Float"), 0.0f, 0.0f, 0.0f, 0.0f, -10000.0f, 10000.0f}, {SOCK_INT, N_("Int"), 0, 0, 0, 0, -10000, 10000}, @@ -38,7 +39,7 @@ static void sim_node_set_particle_attribute_update(bNodeTree *UNUSED(ntree), bNo { int index = 0; LISTBASE_FOREACH (bNodeSocket *, sock, &node->inputs) { - if (index >= 1) { + if (index >= 2) { nodeSetSocketAvailability(sock, sock->type == node->custom1); } index++; |