[Bf-blender-cvs] [008d06d133e] builtin-simulation-nodes: rename Custom Force node to just Force
Jacques Lucke
noreply at git.blender.org
Thu Mar 5 13:15:46 CET 2020
Commit: 008d06d133e99e5a7b2ff40eede0730586dd088c
Author: Jacques Lucke
Date: Thu Mar 5 13:15:18 2020 +0100
Branches: builtin-simulation-nodes
https://developer.blender.org/rB008d06d133e99e5a7b2ff40eede0730586dd088c
rename Custom Force node to just Force
===================================================================
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
D source/blender/nodes/simulation/nodes/node_sim_custom_force.cc
A source/blender/nodes/simulation/nodes/node_sim_force.cc
===================================================================
diff --git a/release/scripts/startup/nodeitems_builtins.py b/release/scripts/startup/nodeitems_builtins.py
index 73fae1fd729..af0d52eb3c5 100644
--- a/release/scripts/startup/nodeitems_builtins.py
+++ b/release/scripts/startup/nodeitems_builtins.py
@@ -483,7 +483,7 @@ simulation_node_categories = [
NodeItem("SimulationNodeParticleTimeStepEvent"),
]),
SimulationNodeCategory("FORCES", "Forces", items=[
- NodeItem("SimulationNodeCustomForce"),
+ NodeItem("SimulationNodeForce"),
]),
SimulationNodeCategory("EXECUTE", "Execute", items=[
NodeItem("SimulationNodeSetParticleAttribute"),
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h
index d1230045120..887d56d27a6 100644
--- a/source/blender/blenkernel/BKE_node.h
+++ b/source/blender/blenkernel/BKE_node.h
@@ -1007,7 +1007,7 @@ void BKE_nodetree_remove_layer_n(struct bNodeTree *ntree,
#define SH_NODE_VECTOR_ROTATE 708
#define SIM_NODE_PARTICLE_SIMULATION 1000
-#define SIM_NODE_CUSTOM_FORCE 1001
+#define SIM_NODE_FORCE 1001
#define SIM_NODE_SET_PARTICLE_ATTRIBUTE 1002
#define SIM_NODE_PARTICLE_BIRTH_EVENT 1003
#define SIM_NODE_PARTICLE_TIME_STEP_EVENT 1004
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c
index 725b6a68939..0b7c5f5bf41 100644
--- a/source/blender/blenkernel/intern/node.c
+++ b/source/blender/blenkernel/intern/node.c
@@ -4124,7 +4124,7 @@ static void registerSimulationNodes(void)
register_node_type_sim_group();
register_node_type_sim_particle_simulation();
- register_node_type_sim_custom_force();
+ register_node_type_sim_force();
register_node_type_set_particle_attribute();
register_node_type_sim_particle_birth_event();
register_node_type_sim_particle_time_step_event();
diff --git a/source/blender/nodes/CMakeLists.txt b/source/blender/nodes/CMakeLists.txt
index d94067da25a..8ad8a31a479 100644
--- a/source/blender/nodes/CMakeLists.txt
+++ b/source/blender/nodes/CMakeLists.txt
@@ -222,8 +222,8 @@ set(SRC
shader/node_shader_util.c
simulation/nodes/node_sim_common.cc
- simulation/nodes/node_sim_custom_force.cc
simulation/nodes/node_sim_execute_condition.cc
+ simulation/nodes/node_sim_force.cc
simulation/nodes/node_sim_multi_execute.cc
simulation/nodes/node_sim_particle_birth_event.cc
simulation/nodes/node_sim_particle_simulation.cc
diff --git a/source/blender/nodes/NOD_simulation.h b/source/blender/nodes/NOD_simulation.h
index a0760d2f174..8a21b7253db 100644
--- a/source/blender/nodes/NOD_simulation.h
+++ b/source/blender/nodes/NOD_simulation.h
@@ -12,7 +12,7 @@ void register_node_tree_type_sim(void);
void register_node_type_sim_group(void);
void register_node_type_sim_particle_simulation(void);
-void register_node_type_sim_custom_force(void);
+void register_node_type_sim_force(void);
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);
diff --git a/source/blender/nodes/NOD_static_types.h b/source/blender/nodes/NOD_static_types.h
index 25091cf4511..dab7c26fceb 100644
--- a/source/blender/nodes/NOD_static_types.h
+++ b/source/blender/nodes/NOD_static_types.h
@@ -259,7 +259,7 @@ DefNode(TextureNode, TEX_NODE_PROC+TEX_STUCCI, 0, "TEX_ST
DefNode(TextureNode, TEX_NODE_PROC+TEX_DISTNOISE, 0, "TEX_DISTNOISE", TexDistNoise, "Distorted Noise", "" )
DefNode(SimulationNode, SIM_NODE_PARTICLE_SIMULATION, 0, "PARTICLE_SIMULATION", ParticleSimulation, "Particle Simulation", "")
-DefNode(SimulationNode, SIM_NODE_CUSTOM_FORCE, 0, "CUSTOM_FORCE", CustomForce, "Custom Force", "")
+DefNode(SimulationNode, SIM_NODE_FORCE, 0, "FORCE", Force, "Force", "")
DefNode(SimulationNode, SIM_NODE_SET_PARTICLE_ATTRIBUTE, 0, "SET_PARTICLE_ATTRIBUTE", SetParticleAttribute, "Set Particle Attribute", "")
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", "")
diff --git a/source/blender/nodes/simulation/nodes/node_sim_custom_force.cc b/source/blender/nodes/simulation/nodes/node_sim_custom_force.cc
deleted file mode 100644
index 553463df268..00000000000
--- a/source/blender/nodes/simulation/nodes/node_sim_custom_force.cc
+++ /dev/null
@@ -1,20 +0,0 @@
-#include "node_sim_util.h"
-
-static bNodeSocketTemplate sim_node_custom_force_in[] = {
- {SOCK_VECTOR, 1, N_("Force"), 0.0f, 0.0f, 0.0f, 0.0f, -10000.0f, 10000.0f},
- {-1, 0, ""},
-};
-
-static bNodeSocketTemplate sim_node_custom_force_out[] = {
- {SOCK_FORCES, 0, N_("Force")},
- {-1, 0, ""},
-};
-
-void register_node_type_sim_custom_force()
-{
- static bNodeType ntype;
-
- sim_node_type_base(&ntype, SIM_NODE_CUSTOM_FORCE, "Custom Force", 0, 0);
- node_type_socket_templates(&ntype, sim_node_custom_force_in, sim_node_custom_force_out);
- nodeRegisterType(&ntype);
-}
diff --git a/source/blender/nodes/simulation/nodes/node_sim_force.cc b/source/blender/nodes/simulation/nodes/node_sim_force.cc
new file mode 100644
index 00000000000..2b14e37b99b
--- /dev/null
+++ b/source/blender/nodes/simulation/nodes/node_sim_force.cc
@@ -0,0 +1,20 @@
+#include "node_sim_util.h"
+
+static bNodeSocketTemplate sim_node_force_in[] = {
+ {SOCK_VECTOR, 1, N_("Force"), 0.0f, 0.0f, 0.0f, 0.0f, -10000.0f, 10000.0f},
+ {-1, 0, ""},
+};
+
+static bNodeSocketTemplate sim_node_force_out[] = {
+ {SOCK_FORCES, 0, N_("Force")},
+ {-1, 0, ""},
+};
+
+void register_node_type_sim_force()
+{
+ static bNodeType ntype;
+
+ sim_node_type_base(&ntype, SIM_NODE_FORCE, "Force", 0, 0);
+ node_type_socket_templates(&ntype, sim_node_force_in, sim_node_force_out);
+ nodeRegisterType(&ntype);
+}
More information about the Bf-blender-cvs
mailing list