diff options
author | Jacques Lucke <jacques@blender.org> | 2020-10-20 13:07:42 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-10-20 13:07:42 +0300 |
commit | 6ced026ae1547ac28c88516a0d061315aeacc913 (patch) | |
tree | 60c61867746df72e8cf87efd47d5d27fbbb27109 /source/blender/nodes/simulation | |
parent | 63a9f24b55d0b5d84d625bdbb44d498fb1f2ae01 (diff) |
Simulation: remove particle nodes with outdated design
The design for how we approach the "Everything Nodes" project
has changed. We will focus on a different part of the project initially.
While future me will likely refer back to some of the code I remove here,
there is no point in keeping this code around in master currently.
It would just confuse other developers working on the project.
This does not remove the simulation modifier and data block. Those are
just cleaned up, so that the boilerplate code can be reused in the future.
Diffstat (limited to 'source/blender/nodes/simulation')
14 files changed, 0 insertions, 560 deletions
diff --git a/source/blender/nodes/simulation/nodes/node_sim_age_reached_event.cc b/source/blender/nodes/simulation/nodes/node_sim_age_reached_event.cc deleted file mode 100644 index add8c4eba4d..00000000000 --- a/source/blender/nodes/simulation/nodes/node_sim_age_reached_event.cc +++ /dev/null @@ -1,38 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#include "node_simulation_util.h" - -static bNodeSocketTemplate sim_node_age_reached_event_in[] = { - {SOCK_FLOAT, N_("Age"), 3, 0, 0, 0, 0, 10000000}, - {SOCK_CONTROL_FLOW, N_("Execute")}, - {-1, ""}, -}; - -static bNodeSocketTemplate sim_node_age_reached_event_out[] = { - {SOCK_EVENTS, N_("Event")}, - {-1, ""}, -}; - -void register_node_type_sim_age_reached_event() -{ - static bNodeType ntype; - - sim_node_type_base(&ntype, SIM_NODE_AGE_REACHED_EVENT, "Age Reached Event", 0, 0); - node_type_socket_templates( - &ntype, sim_node_age_reached_event_in, sim_node_age_reached_event_out); - nodeRegisterType(&ntype); -} diff --git a/source/blender/nodes/simulation/nodes/node_sim_emit_particles.cc b/source/blender/nodes/simulation/nodes/node_sim_emit_particles.cc deleted file mode 100644 index e23984dbf34..00000000000 --- a/source/blender/nodes/simulation/nodes/node_sim_emit_particles.cc +++ /dev/null @@ -1,38 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#include "node_simulation_util.h" - -static bNodeSocketTemplate sim_node_emit_particle_in[] = { - {SOCK_INT, N_("Amount"), 10, 0, 0, 0, 0, 10000000}, - {SOCK_CONTROL_FLOW, N_("Execute")}, - {-1, ""}, -}; - -static bNodeSocketTemplate sim_node_emit_particle_out[] = { - {SOCK_CONTROL_FLOW, N_("Execute")}, - {SOCK_EMITTERS, N_("Emitter")}, - {-1, ""}, -}; - -void register_node_type_sim_emit_particles() -{ - static bNodeType ntype; - - sim_node_type_base(&ntype, SIM_NODE_EMIT_PARTICLES, "Emit Particles", 0, 0); - node_type_socket_templates(&ntype, sim_node_emit_particle_in, sim_node_emit_particle_out); - nodeRegisterType(&ntype); -} diff --git a/source/blender/nodes/simulation/nodes/node_sim_execute_condition.cc b/source/blender/nodes/simulation/nodes/node_sim_execute_condition.cc deleted file mode 100644 index 69f30d1ad0d..00000000000 --- a/source/blender/nodes/simulation/nodes/node_sim_execute_condition.cc +++ /dev/null @@ -1,39 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#include "node_simulation_util.h" - -static bNodeSocketTemplate sim_node_execute_condition_in[] = { - {SOCK_BOOLEAN, N_("Condition")}, - {SOCK_CONTROL_FLOW, N_("If True")}, - {SOCK_CONTROL_FLOW, N_("If False")}, - {-1, ""}, -}; - -static bNodeSocketTemplate sim_node_execute_condition_out[] = { - {SOCK_CONTROL_FLOW, N_("Execute")}, - {-1, ""}, -}; - -void register_node_type_sim_execute_condition() -{ - static bNodeType ntype; - - sim_node_type_base(&ntype, SIM_NODE_EXECUTE_CONDITION, "Execute Condition", 0, 0); - node_type_socket_templates( - &ntype, sim_node_execute_condition_in, sim_node_execute_condition_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 deleted file mode 100644 index eccd2e4e2ab..00000000000 --- a/source/blender/nodes/simulation/nodes/node_sim_force.cc +++ /dev/null @@ -1,36 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#include "node_simulation_util.h" - -static bNodeSocketTemplate sim_node_force_in[] = { - {SOCK_VECTOR, N_("Force"), 0.0f, 0.0f, 0.0f, 0.0f, -10000.0f, 10000.0f}, - {-1, ""}, -}; - -static bNodeSocketTemplate sim_node_force_out[] = { - {SOCK_FORCES, N_("Force")}, - {-1, ""}, -}; - -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); -} diff --git a/source/blender/nodes/simulation/nodes/node_sim_kill_particle.cc b/source/blender/nodes/simulation/nodes/node_sim_kill_particle.cc deleted file mode 100644 index 793b40d9365..00000000000 --- a/source/blender/nodes/simulation/nodes/node_sim_kill_particle.cc +++ /dev/null @@ -1,36 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#include "node_simulation_util.h" - -static bNodeSocketTemplate sim_node_kill_particle_in[] = { - {SOCK_CONTROL_FLOW, N_("Execute")}, - {-1, ""}, -}; - -static bNodeSocketTemplate sim_node_kill_particle_out[] = { - {SOCK_CONTROL_FLOW, N_("Execute")}, - {-1, ""}, -}; - -void register_node_type_sim_kill_particle() -{ - static bNodeType ntype; - - sim_node_type_base(&ntype, SIM_NODE_KILL_PARTICLE, "Kill Particle", 0, 0); - node_type_socket_templates(&ntype, sim_node_kill_particle_in, sim_node_kill_particle_out); - nodeRegisterType(&ntype); -} diff --git a/source/blender/nodes/simulation/nodes/node_sim_multi_execute.cc b/source/blender/nodes/simulation/nodes/node_sim_multi_execute.cc deleted file mode 100644 index 5944db7e2bc..00000000000 --- a/source/blender/nodes/simulation/nodes/node_sim_multi_execute.cc +++ /dev/null @@ -1,38 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#include "node_simulation_util.h" - -static bNodeSocketTemplate sim_node_multi_execute_in[] = { - {SOCK_CONTROL_FLOW, "1"}, - {SOCK_CONTROL_FLOW, "2"}, - {SOCK_CONTROL_FLOW, "3"}, - {-1, ""}, -}; - -static bNodeSocketTemplate sim_node_multi_execute_out[] = { - {SOCK_CONTROL_FLOW, N_("Execute")}, - {-1, ""}, -}; - -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); -} diff --git a/source/blender/nodes/simulation/nodes/node_sim_particle_attribute.cc b/source/blender/nodes/simulation/nodes/node_sim_particle_attribute.cc deleted file mode 100644 index b6b67ee334e..00000000000 --- a/source/blender/nodes/simulation/nodes/node_sim_particle_attribute.cc +++ /dev/null @@ -1,52 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#include "BLI_listbase.h" -#include "node_simulation_util.h" - -static bNodeSocketTemplate sim_node_particle_attribute_in[] = { - {SOCK_STRING, N_("Name")}, - {-1, ""}, -}; - -static bNodeSocketTemplate sim_node_particle_attribute_out[] = { - {SOCK_FLOAT, N_("Float")}, - {SOCK_INT, N_("Int")}, - {SOCK_BOOLEAN, N_("Boolean")}, - {SOCK_VECTOR, N_("Vector")}, - {SOCK_RGBA, N_("Color")}, - {SOCK_OBJECT, N_("Object")}, - {SOCK_IMAGE, N_("Image")}, - {-1, ""}, -}; - -static void sim_node_particle_attribute_update(bNodeTree *UNUSED(ntree), bNode *node) -{ - LISTBASE_FOREACH (bNodeSocket *, sock, &node->outputs) { - nodeSetSocketAvailability(sock, sock->type == node->custom1); - } -} - -void register_node_type_sim_particle_attribute() -{ - static bNodeType ntype; - - sim_node_type_base(&ntype, SIM_NODE_PARTICLE_ATTRIBUTE, "Particle Attribute", 0, 0); - node_type_socket_templates( - &ntype, sim_node_particle_attribute_in, sim_node_particle_attribute_out); - node_type_update(&ntype, sim_node_particle_attribute_update); - nodeRegisterType(&ntype); -} diff --git a/source/blender/nodes/simulation/nodes/node_sim_particle_birth_event.cc b/source/blender/nodes/simulation/nodes/node_sim_particle_birth_event.cc deleted file mode 100644 index 8332a3ecd9f..00000000000 --- a/source/blender/nodes/simulation/nodes/node_sim_particle_birth_event.cc +++ /dev/null @@ -1,37 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#include "node_simulation_util.h" - -static bNodeSocketTemplate sim_node_particle_birth_event_in[] = { - {SOCK_CONTROL_FLOW, N_("Execute")}, - {-1, ""}, -}; - -static bNodeSocketTemplate sim_node_particle_birth_event_out[] = { - {SOCK_EVENTS, N_("Event")}, - {-1, ""}, -}; - -void register_node_type_sim_particle_birth_event() -{ - static bNodeType ntype; - - sim_node_type_base(&ntype, SIM_NODE_PARTICLE_BIRTH_EVENT, "Particle Birth Event", 0, 0); - node_type_socket_templates( - &ntype, sim_node_particle_birth_event_in, sim_node_particle_birth_event_out); - nodeRegisterType(&ntype); -} diff --git a/source/blender/nodes/simulation/nodes/node_sim_particle_mesh_collision_event.cc b/source/blender/nodes/simulation/nodes/node_sim_particle_mesh_collision_event.cc deleted file mode 100644 index 48671172136..00000000000 --- a/source/blender/nodes/simulation/nodes/node_sim_particle_mesh_collision_event.cc +++ /dev/null @@ -1,40 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#include "node_simulation_util.h" - -static bNodeSocketTemplate sim_node_particle_mesh_collision_event_in[] = { - {SOCK_OBJECT, N_("Object")}, - {SOCK_CONTROL_FLOW, N_("Execute")}, - {-1, ""}, -}; - -static bNodeSocketTemplate sim_node_particle_mesh_collision_event_out[] = { - {SOCK_EVENTS, N_("Event")}, - {-1, ""}, -}; - -void register_node_type_sim_particle_mesh_collision_event() -{ - static bNodeType ntype; - - sim_node_type_base( - &ntype, SIM_NODE_PARTICLE_MESH_COLLISION_EVENT, "Particle Mesh Collision Event", 0, 0); - node_type_socket_templates(&ntype, - sim_node_particle_mesh_collision_event_in, - sim_node_particle_mesh_collision_event_out); - nodeRegisterType(&ntype); -} diff --git a/source/blender/nodes/simulation/nodes/node_sim_particle_mesh_emitter.cc b/source/blender/nodes/simulation/nodes/node_sim_particle_mesh_emitter.cc deleted file mode 100644 index 5e1a6c35d52..00000000000 --- a/source/blender/nodes/simulation/nodes/node_sim_particle_mesh_emitter.cc +++ /dev/null @@ -1,41 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#include "node_simulation_util.h" - -#include "float.h" - -static bNodeSocketTemplate sim_node_particle_mesh_emitter_in[] = { - {SOCK_OBJECT, N_("Object")}, - {SOCK_FLOAT, N_("Rate"), 100.0f, 0.0f, 0.0f, 0.0f, 0.0f, FLT_MAX}, - {SOCK_CONTROL_FLOW, N_("Execute")}, - {-1, ""}, -}; - -static bNodeSocketTemplate sim_node_particle_mesh_emitter_out[] = { - {SOCK_EMITTERS, N_("Emitter")}, - {-1, ""}, -}; - -void register_node_type_sim_particle_mesh_emitter() -{ - static bNodeType ntype; - - sim_node_type_base(&ntype, SIM_NODE_PARTICLE_MESH_EMITTER, "Mesh Emitter", 0, 0); - node_type_socket_templates( - &ntype, sim_node_particle_mesh_emitter_in, sim_node_particle_mesh_emitter_out); - nodeRegisterType(&ntype); -} diff --git a/source/blender/nodes/simulation/nodes/node_sim_particle_simulation.cc b/source/blender/nodes/simulation/nodes/node_sim_particle_simulation.cc deleted file mode 100644 index 159c9b23da1..00000000000 --- a/source/blender/nodes/simulation/nodes/node_sim_particle_simulation.cc +++ /dev/null @@ -1,39 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#include "node_simulation_util.h" - -static bNodeSocketTemplate sim_node_particle_simulation_in[] = { - {SOCK_EMITTERS, N_("Emitters")}, - {SOCK_EVENTS, N_("Events")}, - {SOCK_FORCES, N_("Forces")}, - {-1, ""}, -}; - -static bNodeSocketTemplate sim_node_particle_simulation_out[] = { - {-1, ""}, -}; - -void register_node_type_sim_particle_simulation() -{ - static bNodeType ntype; - - sim_node_type_base( - &ntype, SIM_NODE_PARTICLE_SIMULATION, "Particle Simulation", NODE_CLASS_OUTPUT, 0); - node_type_socket_templates( - &ntype, sim_node_particle_simulation_in, sim_node_particle_simulation_out); - nodeRegisterType(&ntype); -} diff --git a/source/blender/nodes/simulation/nodes/node_sim_particle_time_step_event.cc b/source/blender/nodes/simulation/nodes/node_sim_particle_time_step_event.cc deleted file mode 100644 index cda8ddeb644..00000000000 --- a/source/blender/nodes/simulation/nodes/node_sim_particle_time_step_event.cc +++ /dev/null @@ -1,37 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#include "node_simulation_util.h" - -static bNodeSocketTemplate sim_node_particle_time_step_event_in[] = { - {SOCK_CONTROL_FLOW, N_("Execute")}, - {-1, ""}, -}; - -static bNodeSocketTemplate sim_node_particle_time_step_event_out[] = { - {SOCK_EVENTS, N_("Event")}, - {-1, ""}, -}; - -void register_node_type_sim_particle_time_step_event() -{ - static bNodeType ntype; - - sim_node_type_base(&ntype, SIM_NODE_PARTICLE_TIME_STEP_EVENT, "Particle Time Step Event", 0, 0); - node_type_socket_templates( - &ntype, sim_node_particle_time_step_event_in, sim_node_particle_time_step_event_out); - nodeRegisterType(&ntype); -} 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 deleted file mode 100644 index 8f5c6818cb4..00000000000 --- a/source/blender/nodes/simulation/nodes/node_sim_set_particle_attribute.cc +++ /dev/null @@ -1,58 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#include "BLI_listbase.h" -#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}, - {SOCK_BOOLEAN, N_("Boolean")}, - {SOCK_VECTOR, N_("Vector")}, - {SOCK_RGBA, N_("Color")}, - {SOCK_OBJECT, N_("Object")}, - {SOCK_IMAGE, N_("Image")}, - {-1, ""}, -}; - -static bNodeSocketTemplate sim_node_set_particle_attribute_out[] = { - {SOCK_CONTROL_FLOW, N_("Execute")}, - {-1, ""}, -}; - -static void sim_node_set_particle_attribute_update(bNodeTree *UNUSED(ntree), bNode *node) -{ - int index = 0; - LISTBASE_FOREACH (bNodeSocket *, sock, &node->inputs) { - if (index >= 2) { - nodeSetSocketAvailability(sock, sock->type == node->custom1); - } - index++; - } -} - -void register_node_type_sim_set_particle_attribute() -{ - static bNodeType ntype; - - sim_node_type_base(&ntype, SIM_NODE_SET_PARTICLE_ATTRIBUTE, "Set Particle Attribute", 0, 0); - node_type_socket_templates( - &ntype, sim_node_set_particle_attribute_in, sim_node_set_particle_attribute_out); - node_type_update(&ntype, sim_node_set_particle_attribute_update); - nodeRegisterType(&ntype); -} diff --git a/source/blender/nodes/simulation/nodes/node_sim_simulation_time.cc b/source/blender/nodes/simulation/nodes/node_sim_simulation_time.cc deleted file mode 100644 index 40e1c43fb69..00000000000 --- a/source/blender/nodes/simulation/nodes/node_sim_simulation_time.cc +++ /dev/null @@ -1,31 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#include "node_simulation_util.h" - -static bNodeSocketTemplate sim_node_time_out[] = { - {SOCK_FLOAT, N_("Time")}, - {-1, ""}, -}; - -void register_node_type_sim_time() -{ - static bNodeType ntype; - - sim_node_type_base(&ntype, SIM_NODE_TIME, "Time", 0, 0); - node_type_socket_templates(&ntype, nullptr, sim_node_time_out); - nodeRegisterType(&ntype); -} |