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:
authorJacques Lucke <jacques@blender.org>2021-03-22 14:23:25 +0300
committerJacques Lucke <jacques@blender.org>2021-03-22 14:23:25 +0300
commitc4c195672ddd5ab4ce912a3568974135a960f782 (patch)
tree4db1a94b3cafef93171650772405eb7879301115 /source/blender/nodes/function
parent77887f95cce06540dc5dcdb652546b798e826546 (diff)
Cleanup: remove unexposed nodes
Those nodes are leftovers from my work on particle nodes and are not needed currently. They can be added back easily if they become necessary.
Diffstat (limited to 'source/blender/nodes/function')
-rw-r--r--source/blender/nodes/function/nodes/node_fn_combine_strings.cc46
-rw-r--r--source/blender/nodes/function/nodes/node_fn_group_instance_id.cc46
-rw-r--r--source/blender/nodes/function/nodes/node_fn_object_transforms.cc95
-rw-r--r--source/blender/nodes/function/nodes/node_fn_switch.cc86
4 files changed, 0 insertions, 273 deletions
diff --git a/source/blender/nodes/function/nodes/node_fn_combine_strings.cc b/source/blender/nodes/function/nodes/node_fn_combine_strings.cc
deleted file mode 100644
index a545c4f0749..00000000000
--- a/source/blender/nodes/function/nodes/node_fn_combine_strings.cc
+++ /dev/null
@@ -1,46 +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_function_util.hh"
-
-static bNodeSocketTemplate fn_node_combine_strings_in[] = {
- {SOCK_STRING, N_("A")},
- {SOCK_STRING, N_("B")},
- {-1, ""},
-};
-
-static bNodeSocketTemplate fn_node_combine_strings_out[] = {
- {SOCK_STRING, N_("Result")},
- {-1, ""},
-};
-
-static void fn_node_combine_strings_expand_in_mf_network(
- blender::nodes::NodeMFNetworkBuilder &builder)
-{
- static blender::fn::CustomMF_SI_SI_SO<std::string, std::string, std::string> combine_fn{
- "Combine Strings", [](const std::string &a, const std::string &b) { return a + b; }};
- builder.set_matching_fn(combine_fn);
-}
-
-void register_node_type_fn_combine_strings()
-{
- static bNodeType ntype;
-
- fn_node_type_base(&ntype, FN_NODE_COMBINE_STRINGS, "Combine Strings", 0, 0);
- node_type_socket_templates(&ntype, fn_node_combine_strings_in, fn_node_combine_strings_out);
- ntype.expand_in_mf_network = fn_node_combine_strings_expand_in_mf_network;
- nodeRegisterType(&ntype);
-}
diff --git a/source/blender/nodes/function/nodes/node_fn_group_instance_id.cc b/source/blender/nodes/function/nodes/node_fn_group_instance_id.cc
deleted file mode 100644
index 3d0ea201239..00000000000
--- a/source/blender/nodes/function/nodes/node_fn_group_instance_id.cc
+++ /dev/null
@@ -1,46 +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_function_util.hh"
-
-static bNodeSocketTemplate fn_node_group_instance_id_out[] = {
- {SOCK_STRING, N_("Identifier")},
- {-1, ""},
-};
-
-static void fn_node_group_instance_id_expand_in_mf_network(
- blender::nodes::NodeMFNetworkBuilder &builder)
-{
- const blender::nodes::DNode &node = builder.dnode();
- std::string id = "/";
- for (const blender::nodes::DTreeContext *context = node.context();
- context->parent_node() != nullptr;
- context = context->parent_context()) {
- id = "/" + context->parent_node()->name() + id;
- }
- builder.construct_and_set_matching_fn<blender::fn::CustomMF_Constant<std::string>>(
- std::move(id));
-}
-
-void register_node_type_fn_group_instance_id()
-{
- static bNodeType ntype;
-
- fn_node_type_base(&ntype, FN_NODE_GROUP_INSTANCE_ID, "Group Instance ID", 0, 0);
- node_type_socket_templates(&ntype, nullptr, fn_node_group_instance_id_out);
- ntype.expand_in_mf_network = fn_node_group_instance_id_expand_in_mf_network;
- nodeRegisterType(&ntype);
-}
diff --git a/source/blender/nodes/function/nodes/node_fn_object_transforms.cc b/source/blender/nodes/function/nodes/node_fn_object_transforms.cc
deleted file mode 100644
index a73049776e5..00000000000
--- a/source/blender/nodes/function/nodes/node_fn_object_transforms.cc
+++ /dev/null
@@ -1,95 +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_function_util.hh"
-
-#include "BKE_persistent_data_handle.hh"
-
-static bNodeSocketTemplate fn_node_object_transforms_in[] = {
- {SOCK_OBJECT, N_("Object")},
- {-1, ""},
-};
-
-static bNodeSocketTemplate fn_node_object_transforms_out[] = {
- {SOCK_VECTOR, N_("Location")},
- {-1, ""},
-};
-
-class ObjectTransformsFunction : public blender::fn::MultiFunction {
- public:
- ObjectTransformsFunction()
- {
- static blender::fn::MFSignature signature = create_signature();
- this->set_signature(&signature);
- }
-
- static blender::fn::MFSignature create_signature()
- {
- blender::fn::MFSignatureBuilder signature{"Object Transforms"};
- signature.depends_on_context();
- signature.single_input<blender::bke::PersistentObjectHandle>("Object");
- signature.single_output<blender::float3>("Location");
- return signature.build();
- }
-
- void call(blender::IndexMask mask,
- blender::fn::MFParams params,
- blender::fn::MFContext context) const override
- {
- const blender::VArray<blender::bke::PersistentObjectHandle> &handles =
- params.readonly_single_input<blender::bke::PersistentObjectHandle>(0, "Object");
- blender::MutableSpan locations = params.uninitialized_single_output<blender::float3>(
- 1, "Location");
-
- const blender::bke::PersistentDataHandleMap *handle_map =
- context.get_global_context<blender::bke::PersistentDataHandleMap>(
- "PersistentDataHandleMap");
- if (handle_map == nullptr) {
- locations.fill_indices(mask, {0, 0, 0});
- return;
- }
-
- for (int64_t i : mask) {
- blender::bke::PersistentObjectHandle handle = handles[i];
- const Object *object = handle_map->lookup(handle);
- blender::float3 location;
- if (object == nullptr) {
- location = {0, 0, 0};
- }
- else {
- location = object->loc;
- }
- locations[i] = location;
- }
- }
-};
-
-static void fn_node_object_transforms_expand_in_mf_network(
- blender::nodes::NodeMFNetworkBuilder &builder)
-{
- static ObjectTransformsFunction fn;
- builder.set_matching_fn(fn);
-}
-
-void register_node_type_fn_object_transforms()
-{
- static bNodeType ntype;
-
- fn_node_type_base(&ntype, FN_NODE_OBJECT_TRANSFORMS, "Object Transforms", 0, 0);
- node_type_socket_templates(&ntype, fn_node_object_transforms_in, fn_node_object_transforms_out);
- ntype.expand_in_mf_network = fn_node_object_transforms_expand_in_mf_network;
- nodeRegisterType(&ntype);
-}
diff --git a/source/blender/nodes/function/nodes/node_fn_switch.cc b/source/blender/nodes/function/nodes/node_fn_switch.cc
deleted file mode 100644
index 5187decbbe5..00000000000
--- a/source/blender/nodes/function/nodes/node_fn_switch.cc
+++ /dev/null
@@ -1,86 +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 "UI_interface.h"
-#include "UI_resources.h"
-
-#include "node_function_util.hh"
-
-static void fn_node_switch_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
-{
- uiItemR(layout, ptr, "data_type", 0, "", ICON_NONE);
-}
-
-static bNodeSocketTemplate fn_node_switch_in[] = {
- {SOCK_BOOLEAN, N_("Switch")},
-
- {SOCK_FLOAT, N_("If False"), 0.0f, 0.0f, 0.0f, 0.0f, -10000.0f, 10000.0f},
- {SOCK_INT, N_("If False"), 0, 0, 0, 0, -10000, 10000},
- {SOCK_BOOLEAN, N_("If False")},
- {SOCK_VECTOR, N_("If False"), 0.0f, 0.0f, 0.0f, 0.0f, -10000.0f, 10000.0f},
- {SOCK_STRING, N_("If False")},
- {SOCK_RGBA, N_("If False"), 0.8f, 0.8f, 0.8f, 1.0f},
- {SOCK_OBJECT, N_("If False")},
- {SOCK_IMAGE, N_("If False")},
-
- {SOCK_FLOAT, N_("If True"), 0.0f, 0.0f, 0.0f, 0.0f, -10000.0f, 10000.0f},
- {SOCK_INT, N_("If True"), 0, 0, 0, 0, -10000, 10000},
- {SOCK_BOOLEAN, N_("If True")},
- {SOCK_VECTOR, N_("If True"), 0.0f, 0.0f, 0.0f, 0.0f, -10000.0f, 10000.0f},
- {SOCK_STRING, N_("If True")},
- {SOCK_RGBA, N_("If True"), 0.8f, 0.8f, 0.8f, 1.0f},
- {SOCK_OBJECT, N_("If True")},
- {SOCK_IMAGE, N_("If True")},
-
- {-1, ""},
-};
-
-static bNodeSocketTemplate fn_node_switch_out[] = {
- {SOCK_FLOAT, N_("Result")},
- {SOCK_INT, N_("Result")},
- {SOCK_BOOLEAN, N_("Result")},
- {SOCK_VECTOR, N_("Result")},
- {SOCK_STRING, N_("Result")},
- {SOCK_RGBA, N_("Result")},
- {SOCK_OBJECT, N_("Result")},
- {SOCK_IMAGE, N_("Result")},
- {-1, ""},
-};
-
-static void fn_node_switch_update(bNodeTree *UNUSED(ntree), bNode *node)
-{
- int index = 0;
- LISTBASE_FOREACH (bNodeSocket *, sock, &node->inputs) {
- nodeSetSocketAvailability(sock, index == 0 || sock->type == node->custom1);
- index++;
- }
- LISTBASE_FOREACH (bNodeSocket *, sock, &node->outputs) {
- nodeSetSocketAvailability(sock, sock->type == node->custom1);
- }
-}
-
-void register_node_type_fn_switch()
-{
- static bNodeType ntype;
-
- fn_node_type_base(&ntype, FN_NODE_SWITCH, "Switch", 0, 0);
- node_type_socket_templates(&ntype, fn_node_switch_in, fn_node_switch_out);
- node_type_update(&ntype, fn_node_switch_update);
- ntype.draw_buttons = fn_node_switch_layout;
- nodeRegisterType(&ntype);
-}