[Bf-blender-cvs] [b2fb0251535] functions: rename FunctionNodeTree to FunctionTree
Jacques Lucke
noreply at git.blender.org
Sat Jan 4 16:38:55 CET 2020
Commit: b2fb02515356bcf906888fed7a82cf78b13d8e01
Author: Jacques Lucke
Date: Sat Jan 4 13:24:29 2020 +0100
Branches: functions
https://developer.blender.org/rBb2fb02515356bcf906888fed7a82cf78b13d8e01
rename FunctionNodeTree to FunctionTree
===================================================================
M source/blender/functions/FN_multi_function_dependencies.h
M source/blender/functions/FN_node_tree.h
M source/blender/functions/FN_node_tree_multi_function_network.h
M source/blender/functions/FN_node_tree_multi_function_network_generation.h
M source/blender/functions/intern/node_tree.cc
M source/blender/functions/intern/node_tree_multi_function_network/builder.h
M source/blender/functions/intern/node_tree_multi_function_network/generate.cc
M source/blender/modifiers/intern/MOD_functiondeform_cxx.cc
M source/blender/modifiers/intern/MOD_functionpoints_cxx.cc
M source/blender/simulations/bparticles/node_frontend.cpp
M source/blender/simulations/bparticles/node_frontend.hpp
===================================================================
diff --git a/source/blender/functions/FN_multi_function_dependencies.h b/source/blender/functions/FN_multi_function_dependencies.h
index faa8be55776..c73b3a03378 100644
--- a/source/blender/functions/FN_multi_function_dependencies.h
+++ b/source/blender/functions/FN_multi_function_dependencies.h
@@ -12,7 +12,7 @@ namespace FN {
using BLI::Set;
-inline Set<Object *> get_objects_used_by_sockets(const FunctionNodeTree &function_tree)
+inline Set<Object *> get_objects_used_by_sockets(const FunctionTree &function_tree)
{
Set<Object *> objects;
for (const FSocket *fsocket : function_tree.all_sockets()) {
@@ -34,7 +34,7 @@ inline Set<Object *> get_objects_used_by_sockets(const FunctionNodeTree &functio
return objects;
}
-inline Set<Image *> get_images_used_by_sockets(const FunctionNodeTree &function_tree)
+inline Set<Image *> get_images_used_by_sockets(const FunctionTree &function_tree)
{
Set<Image *> images;
for (const FSocket *fsocket : function_tree.all_sockets()) {
@@ -57,7 +57,7 @@ inline Set<Image *> get_images_used_by_sockets(const FunctionNodeTree &function_
}
inline void add_ids_used_by_nodes(IDHandleLookup &id_handle_lookup,
- const FunctionNodeTree &function_tree)
+ const FunctionTree &function_tree)
{
for (Object *object : get_objects_used_by_sockets(function_tree)) {
id_handle_lookup.add(object->id);
diff --git a/source/blender/functions/FN_node_tree.h b/source/blender/functions/FN_node_tree.h
index 6f60b4da577..12c3087c6b5 100644
--- a/source/blender/functions/FN_node_tree.h
+++ b/source/blender/functions/FN_node_tree.h
@@ -29,7 +29,7 @@ class FSocket;
class FInputSocket;
class FOutputSocket;
class FGroupInput;
-class FunctionNodeTree;
+class FunctionTree;
class FSocket : BLI::NonCopyable, BLI::NonMovable {
protected:
@@ -40,7 +40,7 @@ class FSocket : BLI::NonCopyable, BLI::NonMovable {
/* Input and output sockets share the same id-space. */
uint m_id;
- friend FunctionNodeTree;
+ friend FunctionTree;
public:
const FNode &node() const;
@@ -64,7 +64,7 @@ class FInputSocket : public FSocket {
Vector<FOutputSocket *> m_linked_sockets;
Vector<FGroupInput *> m_linked_group_inputs;
- friend FunctionNodeTree;
+ friend FunctionTree;
public:
const VInputSocket &vsocket() const;
@@ -78,7 +78,7 @@ class FOutputSocket : public FSocket {
private:
Vector<FInputSocket *> m_linked_sockets;
- friend FunctionNodeTree;
+ friend FunctionTree;
public:
const VOutputSocket &vsocket() const;
@@ -92,7 +92,7 @@ class FGroupInput : BLI::NonCopyable, BLI::NonMovable {
Vector<FInputSocket *> m_linked_sockets;
uint m_id;
- friend FunctionNodeTree;
+ friend FunctionTree;
public:
const VInputSocket &vsocket() const;
@@ -112,7 +112,7 @@ class FNode : BLI::NonCopyable, BLI::NonMovable {
/* Uniquely identifies this node in the inlined node tree. */
uint m_id;
- friend FunctionNodeTree;
+ friend FunctionTree;
void destruct_with_sockets();
@@ -143,7 +143,7 @@ class FParentNode : BLI::NonCopyable, BLI::NonMovable {
FParentNode *m_parent;
uint m_id;
- friend FunctionNodeTree;
+ friend FunctionTree;
public:
const FParentNode *parent() const;
@@ -153,7 +153,7 @@ class FParentNode : BLI::NonCopyable, BLI::NonMovable {
using BTreeVTreeMap = Map<bNodeTree *, std::unique_ptr<const VirtualNodeTree>>;
-class FunctionNodeTree : BLI::NonCopyable, BLI::NonMovable {
+class FunctionTree : BLI::NonCopyable, BLI::NonMovable {
private:
BLI::MonotonicAllocator<> m_allocator;
bNodeTree *m_btree;
@@ -168,8 +168,8 @@ class FunctionNodeTree : BLI::NonCopyable, BLI::NonMovable {
StringMultiMap<FNode *> m_nodes_by_idname;
public:
- FunctionNodeTree(bNodeTree *btree, BTreeVTreeMap &vtrees);
- ~FunctionNodeTree();
+ FunctionTree(bNodeTree *btree, BTreeVTreeMap &vtrees);
+ ~FunctionTree();
std::string to_dot() const;
void to_dot__clipboard() const;
@@ -404,47 +404,47 @@ inline uint FGroupInput::id() const
return m_id;
}
-inline const FSocket &FunctionNodeTree::socket_by_id(uint id) const
+inline const FSocket &FunctionTree::socket_by_id(uint id) const
{
return *m_sockets_by_id[id];
}
-inline uint FunctionNodeTree::socket_count() const
+inline uint FunctionTree::socket_count() const
{
return m_sockets_by_id.size();
}
-inline uint FunctionNodeTree::node_count() const
+inline uint FunctionTree::node_count() const
{
return m_node_by_id.size();
}
-inline ArrayRef<const FSocket *> FunctionNodeTree::all_sockets() const
+inline ArrayRef<const FSocket *> FunctionTree::all_sockets() const
{
return m_sockets_by_id.as_ref();
}
-inline ArrayRef<const FNode *> FunctionNodeTree::all_nodes() const
+inline ArrayRef<const FNode *> FunctionTree::all_nodes() const
{
return m_node_by_id.as_ref();
}
-inline ArrayRef<const FInputSocket *> FunctionNodeTree::all_input_sockets() const
+inline ArrayRef<const FInputSocket *> FunctionTree::all_input_sockets() const
{
return m_input_sockets.as_ref();
}
-inline ArrayRef<const FOutputSocket *> FunctionNodeTree::all_output_sockets() const
+inline ArrayRef<const FOutputSocket *> FunctionTree::all_output_sockets() const
{
return m_output_sockets.as_ref();
}
-inline ArrayRef<const FGroupInput *> FunctionNodeTree::all_group_inputs() const
+inline ArrayRef<const FGroupInput *> FunctionTree::all_group_inputs() const
{
return m_group_inputs.as_ref();
}
-inline ArrayRef<const FNode *> FunctionNodeTree::nodes_with_idname(StringRef idname) const
+inline ArrayRef<const FNode *> FunctionTree::nodes_with_idname(StringRef idname) const
{
return m_nodes_by_idname.lookup_default(idname);
}
diff --git a/source/blender/functions/FN_node_tree_multi_function_network.h b/source/blender/functions/FN_node_tree_multi_function_network.h
index dc768858d99..05ae1517520 100644
--- a/source/blender/functions/FN_node_tree_multi_function_network.h
+++ b/source/blender/functions/FN_node_tree_multi_function_network.h
@@ -15,14 +15,14 @@ using BLI::MultiMap;
class DummySocketMap {
private:
- const FunctionNodeTree *m_function_tree;
+ const FunctionTree *m_function_tree;
const MFNetwork *m_network;
IndexToRefMap<const MFSocket> m_dummy_socket_by_fsocket_id;
IndexToRefMap<const FSocket> m_fsocket_by_dummy_socket_id;
public:
- DummySocketMap(const FunctionNodeTree &function_tree,
+ DummySocketMap(const FunctionTree &function_tree,
const MFNetwork &network,
IndexToRefMap<const MFSocket> dummy_socket_by_fsocket_id,
IndexToRefMap<const FSocket> fsocket_by_dummy_socket_id)
@@ -68,12 +68,12 @@ class DummySocketMap {
class FunctionTreeMFNetwork {
private:
- const FunctionNodeTree &m_function_tree;
+ const FunctionTree &m_function_tree;
std::unique_ptr<MFNetwork> m_network;
DummySocketMap m_socket_map;
public:
- FunctionTreeMFNetwork(const FunctionNodeTree &function_tree,
+ FunctionTreeMFNetwork(const FunctionTree &function_tree,
std::unique_ptr<MFNetwork> network,
DummySocketMap socket_map)
: m_function_tree(function_tree),
@@ -82,7 +82,7 @@ class FunctionTreeMFNetwork {
{
}
- const FunctionNodeTree &function_tree() const
+ const FunctionTree &function_tree() const
{
return m_function_tree;
}
diff --git a/source/blender/functions/FN_node_tree_multi_function_network_generation.h b/source/blender/functions/FN_node_tree_multi_function_network_generation.h
index def011b2007..9173b9d40b0 100644
--- a/source/blender/functions/FN_node_tree_multi_function_network_generation.h
+++ b/source/blender/functions/FN_node_tree_multi_function_network_generation.h
@@ -11,10 +11,10 @@ namespace MFGeneration {
using BLI::ResourceCollector;
std::unique_ptr<FunctionTreeMFNetwork> generate_node_tree_multi_function_network(
- const FunctionNodeTree &function_tree, ResourceCollector &resources);
+ const FunctionTree &function_tree, ResourceCollector &resources);
std::unique_ptr<MF_EvaluateNetwork> generate_node_tree_multi_function(
- const FunctionNodeTree &function_tree, ResourceCollector &resources);
+ const FunctionTree &function_tree, ResourceCollector &resources);
} // namespace MFGeneration
} // namespace FN
diff --git a/source/blender/functions/intern/node_tree.cc b/source/blender/functions/intern/node_tree.cc
index c8e34bd14b6..a72542575d1 100644
--- a/source/blender/functions/intern/node_tree.cc
+++ b/source/blender/functions/intern/node_tree.cc
@@ -76,7 +76,7 @@ static bool is_group_node(const VNode &vnode)
return vnode.idname() == "fn_GroupNode";
}
-FunctionNodeTree::~FunctionNodeTree()
+FunctionTree::~FunctionTree()
{
for (FNode *fnode : m_node_by_id) {
fnode->~FNode();
@@ -106,8 +106,7 @@ void FNode::destruct_with_sockets()
this->~FNode();
}
-BLI_NOINLINE FunctionNodeTree::FunctionNodeTree(bNodeTree *btree, BTreeVTreeMap &vtrees)
- : m_btree(btree)
+BLI_NOINLINE FunctionTree::FunctionTree(bNodeTree *btree, BTreeVTreeMap &vtrees) : m_btree(btree)
{
const VirtualNodeTree &main_vtree = get_vtree(vtrees, btree);
@@ -122,10 +121,10 @@ BLI_NOINLINE FunctionNodeTree::FunctionNodeTree(bNodeTree *btree, BTreeVTreeMap
std::move(all_nodes), std::move(all_group_inputs), std::move(all_parent_nodes));
}
-BLI_NOINLINE void FunctionNodeTree::expand_groups(Vector<FNode *> &all_nodes,
- Vector<FGroupInput *> &all_group_inputs,
- Vector<FParentNode *> &all_parent_nodes,
- BTreeVTreeMap &vtrees)
+BLI_NOINLINE void FunctionTree::expand_groups(Vector<FNode *> &all_nodes,
+ Vector<FGroupInput *> &all_group_inputs,
+ Vector<FParentNode *> &all_parent_nodes,
+ BTreeVTreeMap &vtrees)
{
for (uint i = 0; i < all_nodes.size(); i++) {
FNode ¤t_node = *all_nodes[i];
@@ -135,11 +134,11 @@ BLI_NOINLINE void FunctionNodeTree::expand_group
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list