[Bf-blender-cvs] [35d28e47f03] builtin-simulation-nodes: new multi execute node
Jacques Lucke
noreply at git.blender.org
Thu Mar 5 13:15:43 CET 2020
Commit: 35d28e47f03d614cc1d8ad44476603dca305a700
Author: Jacques Lucke
Date: Thu Mar 5 13:10:48 2020 +0100
Branches: builtin-simulation-nodes
https://developer.blender.org/rB35d28e47f03d614cc1d8ad44476603dca305a700
new multi execute node
===================================================================
M release/scripts/startup/nodeitems_builtins.py
M source/blender/blenkernel/BKE_node.h
M source/blender/blenkernel/intern/node.c
M source/blender/nodes/CMakeLists.txt
M source/blender/nodes/NOD_simulation.h
M source/blender/nodes/NOD_static_types.h
A source/blender/nodes/simulation/nodes/node_sim_multi_execute.cc
===================================================================
diff --git a/release/scripts/startup/nodeitems_builtins.py b/release/scripts/startup/nodeitems_builtins.py
index de920aa4b4b..73fae1fd729 100644
--- a/release/scripts/startup/nodeitems_builtins.py
+++ b/release/scripts/startup/nodeitems_builtins.py
@@ -488,6 +488,7 @@ simulation_node_categories = [
SimulationNodeCategory("EXECUTE", "Execute", items=[
NodeItem("SimulationNodeSetParticleAttribute"),
NodeItem("SimulationNodeExecuteCondition"),
+ NodeItem("SimulationNodeMultiExecute"),
]),
]
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h
index 20e2624c84c..d1230045120 100644
--- a/source/blender/blenkernel/BKE_node.h
+++ b/source/blender/blenkernel/BKE_node.h
@@ -1012,6 +1012,7 @@ void BKE_nodetree_remove_layer_n(struct bNodeTree *ntree,
#define SIM_NODE_PARTICLE_BIRTH_EVENT 1003
#define SIM_NODE_PARTICLE_TIME_STEP_EVENT 1004
#define SIM_NODE_EXECUTE_CONDITION 1005
+#define SIM_NODE_MULTI_EXECUTE 1006
/* custom defines options for Material node */
// #define SH_NODE_MAT_DIFF 1
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c
index 4ef3d64e3df..725b6a68939 100644
--- a/source/blender/blenkernel/intern/node.c
+++ b/source/blender/blenkernel/intern/node.c
@@ -4129,6 +4129,7 @@ static void registerSimulationNodes(void)
register_node_type_sim_particle_birth_event();
register_node_type_sim_particle_time_step_event();
register_node_type_sim_execute_condition();
+ register_node_type_sim_multi_execute();
}
void init_nodesystem(void)
diff --git a/source/blender/nodes/CMakeLists.txt b/source/blender/nodes/CMakeLists.txt
index d8cd5cbe4c2..d94067da25a 100644
--- a/source/blender/nodes/CMakeLists.txt
+++ b/source/blender/nodes/CMakeLists.txt
@@ -224,6 +224,7 @@ set(SRC
simulation/nodes/node_sim_common.cc
simulation/nodes/node_sim_custom_force.cc
simulation/nodes/node_sim_execute_condition.cc
+ simulation/nodes/node_sim_multi_execute.cc
simulation/nodes/node_sim_particle_birth_event.cc
simulation/nodes/node_sim_particle_simulation.cc
simulation/nodes/node_sim_particle_time_step_event.cc
diff --git a/source/blender/nodes/NOD_simulation.h b/source/blender/nodes/NOD_simulation.h
index 0a636a0ec49..a0760d2f174 100644
--- a/source/blender/nodes/NOD_simulation.h
+++ b/source/blender/nodes/NOD_simulation.h
@@ -17,6 +17,7 @@ void register_node_type_set_particle_attribute(void);
void register_node_type_sim_particle_birth_event(void);
void register_node_type_sim_particle_time_step_event(void);
void register_node_type_sim_execute_condition(void);
+void register_node_type_sim_multi_execute(void);
#ifdef __cplusplus
}
diff --git a/source/blender/nodes/NOD_static_types.h b/source/blender/nodes/NOD_static_types.h
index 7c602960192..25091cf4511 100644
--- a/source/blender/nodes/NOD_static_types.h
+++ b/source/blender/nodes/NOD_static_types.h
@@ -264,6 +264,7 @@ DefNode(SimulationNode, SIM_NODE_SET_PARTICLE_ATTRIBUTE, 0, "SET_PA
DefNode(SimulationNode, SIM_NODE_PARTICLE_BIRTH_EVENT, 0, "PARTICLE_BIRTH_EVENT", ParticleBirthEvent, "Particle Birth Event", "")
DefNode(SimulationNode, SIM_NODE_PARTICLE_TIME_STEP_EVENT, def_sim_particle_time_step_event, "PARTICLE_TIME_STEP_EVENT", ParticleTimeStepEvent, "Particle Time Step Event", "")
DefNode(SimulationNode, SIM_NODE_EXECUTE_CONDITION, 0, "EXECUTE_CONDITION", ExecuteCondition, "Execute Condition", "")
+DefNode(SimulationNode, SIM_NODE_MULTI_EXECUTE, 0, "MULTI_EXECUTE", MultiExecute, "Multi Execute", "")
/* undefine macros */
#undef DefNode
diff --git a/source/blender/nodes/simulation/nodes/node_sim_multi_execute.cc b/source/blender/nodes/simulation/nodes/node_sim_multi_execute.cc
new file mode 100644
index 00000000000..dcfa9cb656e
--- /dev/null
+++ b/source/blender/nodes/simulation/nodes/node_sim_multi_execute.cc
@@ -0,0 +1,22 @@
+#include "node_sim_util.h"
+
+static bNodeSocketTemplate sim_node_multi_execute_in[] = {
+ {SOCK_CONTROL_FLOW, 1, "1"},
+ {SOCK_CONTROL_FLOW, 1, "2"},
+ {SOCK_CONTROL_FLOW, 1, "3"},
+ {-1, 0, ""},
+};
+
+static bNodeSocketTemplate sim_node_multi_execute_out[] = {
+ {SOCK_CONTROL_FLOW, 0, N_("Execute")},
+ {-1, 0, ""},
+};
+
+void register_node_type_sim_multi_execute()
+{
+ static bNodeType ntype;
+
+ sim_node_type_base(&ntype, SIM_NODE_MULTI_EXECUTE, "Multi Execute", 0, 0);
+ node_type_socket_templates(&ntype, sim_node_multi_execute_in, sim_node_multi_execute_out);
+ nodeRegisterType(&ntype);
+}
More information about the Bf-blender-cvs
mailing list