[Bf-blender-cvs] [3baf1f7ffa9] functions-experimental-refactor: remove unused code
Jacques Lucke
noreply at git.blender.org
Wed Oct 30 16:35:06 CET 2019
Commit: 3baf1f7ffa94155e6734d52278d8336ae976bb92
Author: Jacques Lucke
Date: Wed Oct 30 16:31:23 2019 +0100
Branches: functions-experimental-refactor
https://developer.blender.org/rB3baf1f7ffa94155e6734d52278d8336ae976bb92
remove unused code
===================================================================
M release/scripts/startup/nodes/function_nodes/list.py
M source/blender/blenkernel/BKE_multi_functions.h
M source/blender/blenkernel/intern/multi_functions.cc
M source/blender/modifiers/intern/MOD_functiondeform_cxx.cc
===================================================================
diff --git a/release/scripts/startup/nodes/function_nodes/list.py b/release/scripts/startup/nodes/function_nodes/list.py
index dc93dd7ca33..26991fb6119 100644
--- a/release/scripts/startup/nodes/function_nodes/list.py
+++ b/release/scripts/startup/nodes/function_nodes/list.py
@@ -29,18 +29,6 @@ class ListLengthNode(bpy.types.Node, FunctionNode):
builder.fixed_output("length", "Length", "Integer")
-class AppendToListNode(bpy.types.Node, FunctionNode):
- bl_idname = "fn_AppendToListNode"
- bl_label = "Append to List"
-
- active_type: NodeBuilder.DynamicListProperty()
-
- def declaration(self, builder: NodeBuilder):
- builder.dynamic_list_input("list", "List", "active_type")
- builder.dynamic_base_input("value", "Value", "active_type")
- builder.dynamic_list_output("list", "List", "active_type")
-
-
class PackListNode(bpy.types.Node, FunctionNode):
bl_idname = "fn_PackListNode"
bl_label = "Pack List"
diff --git a/source/blender/blenkernel/BKE_multi_functions.h b/source/blender/blenkernel/BKE_multi_functions.h
index f10e2e34ab5..27477a990a7 100644
--- a/source/blender/blenkernel/BKE_multi_functions.h
+++ b/source/blender/blenkernel/BKE_multi_functions.h
@@ -47,15 +47,6 @@ class MultiFunction_FloatRange final : public MultiFunction {
void call(ArrayRef<uint> mask_indices, MFParams ¶ms, MFContext &context) const override;
};
-class MultiFunction_AppendToList final : public MultiFunction {
- private:
- const CPPType &m_base_type;
-
- public:
- MultiFunction_AppendToList(const CPPType &base_type);
- void call(ArrayRef<uint> mask_indices, MFParams ¶ms, MFContext &context) const override;
-};
-
class MultiFunction_GetListElement final : public MultiFunction {
private:
const CPPType &m_base_type;
@@ -74,15 +65,6 @@ class MultiFunction_ListLength final : public MultiFunction {
void call(ArrayRef<uint> mask_indices, MFParams ¶ms, MFContext &context) const override;
};
-class MultiFunction_CombineLists final : public MultiFunction {
- private:
- const CPPType &m_base_type;
-
- public:
- MultiFunction_CombineLists(const CPPType &base_type);
- void call(ArrayRef<uint> mask_indices, MFParams ¶ms, MFContext &context) const override;
-};
-
class MultiFunction_PackList final : public MultiFunction {
private:
const CPPType &m_base_type;
diff --git a/source/blender/blenkernel/intern/multi_functions.cc b/source/blender/blenkernel/intern/multi_functions.cc
index 7dd9088075f..a5f205cce45 100644
--- a/source/blender/blenkernel/intern/multi_functions.cc
+++ b/source/blender/blenkernel/intern/multi_functions.cc
@@ -179,27 +179,6 @@ void MultiFunction_FloatRange::call(ArrayRef<uint> mask_indices,
}
}
-MultiFunction_AppendToList::MultiFunction_AppendToList(const CPPType &base_type)
- : m_base_type(base_type)
-{
- MFSignatureBuilder signature;
- signature.mutable_vector("List", m_base_type);
- signature.readonly_single_input("Value", m_base_type);
- this->set_signature(signature);
-}
-
-void MultiFunction_AppendToList::call(ArrayRef<uint> mask_indices,
- MFParams ¶ms,
- MFContext &UNUSED(context)) const
-{
- GenericVectorArray &lists = params.mutable_vector(0, "List");
- GenericVirtualListRef values = params.readonly_single_input(1, "Value");
-
- for (uint i : mask_indices) {
- lists.append_single__copy(i, values[i]);
- }
-}
-
MultiFunction_PackList::MultiFunction_PackList(const CPPType &base_type,
ArrayRef<bool> input_list_status)
: m_base_type(base_type), m_input_list_status(input_list_status)
@@ -332,25 +311,4 @@ void MultiFunction_ListLength::call(ArrayRef<uint> mask_indices,
}
}
-MultiFunction_CombineLists::MultiFunction_CombineLists(const CPPType &base_type)
- : m_base_type(base_type)
-{
- MFSignatureBuilder signature;
- signature.mutable_vector("List", m_base_type);
- signature.readonly_vector_input("Other", m_base_type);
- this->set_signature(signature);
-}
-
-void MultiFunction_CombineLists::call(ArrayRef<uint> mask_indices,
- MFParams ¶ms,
- MFContext &UNUSED(context)) const
-{
- GenericVectorArray &lists = params.mutable_vector(0, "List");
- GenericVirtualListListRef others = params.readonly_vector_input(1, "Other");
-
- for (uint i : mask_indices) {
- lists.extend_single__copy(i, others[i]);
- }
-}
-
} // namespace BKE
diff --git a/source/blender/modifiers/intern/MOD_functiondeform_cxx.cc b/source/blender/modifiers/intern/MOD_functiondeform_cxx.cc
index 9693647a0c0..6de8c723255 100644
--- a/source/blender/modifiers/intern/MOD_functiondeform_cxx.cc
+++ b/source/blender/modifiers/intern/MOD_functiondeform_cxx.cc
@@ -396,20 +396,6 @@ static void INSERT_separate_vector(VTreeMFNetworkBuilder &builder,
resources.add(std::move(function), "separate vector function");
}
-static void INSERT_append_to_list(VTreeMFNetworkBuilder &builder,
- OwnedResources &resources,
- const VirtualNode &vnode)
-{
- PointerRNA rna = vnode.rna();
- char *type_name = RNA_string_get_alloc(&rna, "active_type", nullptr, 0);
- const CPPType &type = get_cpp_type_by_name(type_name);
- MEM_freeN(type_name);
-
- auto function = BLI::make_unique<BKE::MultiFunction_AppendToList>(type);
- builder.add_function(*function, {0, 1}, {0}, vnode);
- resources.add(std::move(function), "append to list function");
-}
-
static void INSERT_list_length(VTreeMFNetworkBuilder &builder,
OwnedResources &resources,
const VirtualNode &vnode)
@@ -486,7 +472,6 @@ static StringMap<InsertVNodeFunction> get_node_inserters()
inserters.add_new("fn_VectorMathNode", INSERT_vector_math);
inserters.add_new("fn_CombineVectorNode", INSERT_combine_vector);
inserters.add_new("fn_SeparateVectorNode", INSERT_separate_vector);
- inserters.add_new("fn_AppendToListNode", INSERT_append_to_list);
inserters.add_new("fn_ListLengthNode", INSERT_list_length);
inserters.add_new("fn_PackListNode", INSERT_pack_list);
return inserters;
More information about the Bf-blender-cvs
mailing list