diff options
author | Hans Goudey <h.goudey@me.com> | 2022-01-08 01:16:34 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-01-08 01:16:56 +0300 |
commit | 34e84d0ee8a238d1ce46dc06e30c2c56693285dd (patch) | |
tree | 930d8ca5b008a102f9dd7dcbf9a69d37adef47af /source/blender/blenkernel/intern | |
parent | 09d6846839e8e8140b80619171c7a2613bb3dbb5 (diff) |
Cleanup: Remove unused code from BKE_node.h
Remove a variety of unused functions, declarations without definitions,
incorrect comments, and defines that have been commented for years
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/node.cc | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/source/blender/blenkernel/intern/node.cc b/source/blender/blenkernel/intern/node.cc index f32db41f62d..bd199cff485 100644 --- a/source/blender/blenkernel/intern/node.cc +++ b/source/blender/blenkernel/intern/node.cc @@ -1700,23 +1700,6 @@ bNodeSocket *nodeAddSocket(bNodeTree *ntree, return sock; } -bNodeSocket *nodeInsertSocket(bNodeTree *ntree, - bNode *node, - eNodeSocketInOut in_out, - const char *idname, - bNodeSocket *next_sock, - const char *identifier, - const char *name) -{ - ListBase *lb = (in_out == SOCK_IN ? &node->inputs : &node->outputs); - bNodeSocket *sock = make_socket(ntree, node, in_out, lb, idname, identifier, name); - - BLI_remlink(lb, sock); /* does nothing for new socket */ - BLI_insertlinkbefore(lb, next_sock, sock); - - return sock; -} - bool nodeIsStaticSocketType(const struct bNodeSocketType *stype) { /* @@ -1933,27 +1916,6 @@ bNodeSocket *nodeAddStaticSocket(bNodeTree *ntree, return sock; } -bNodeSocket *nodeInsertStaticSocket(bNodeTree *ntree, - bNode *node, - eNodeSocketInOut in_out, - int type, - int subtype, - bNodeSocket *next_sock, - const char *identifier, - const char *name) -{ - const char *idname = nodeStaticSocketType(type, subtype); - - if (!idname) { - CLOG_ERROR(&LOG, "static node socket type %d undefined", type); - return nullptr; - } - - bNodeSocket *sock = nodeInsertSocket(ntree, node, in_out, idname, next_sock, identifier, name); - sock->type = type; - return sock; -} - static void node_socket_free(bNodeSocket *sock, const bool do_id_user) { if (sock->prop) { @@ -2305,14 +2267,6 @@ bNode *node_copy(bNodeTree *dst_tree, } // namespace blender::bke -bNode *BKE_node_copy(bNodeTree *dst_tree, - const bNode *src_node, - const int flag, - const bool unique_name) -{ - return blender::bke::node_copy(dst_tree, *src_node, flag, unique_name); -} - static int node_count_links(const bNodeTree *ntree, const bNodeSocket *socket) { int count = 0; @@ -2872,18 +2826,6 @@ void BKE_node_preview_remove_unused(bNodeTree *ntree) (bNodeInstanceValueFP)BKE_node_preview_free); } -void BKE_node_preview_free_tree(bNodeTree *ntree) -{ - if (!ntree) { - return; - } - - if (ntree->previews) { - BKE_node_instance_hash_free(ntree->previews, (bNodeInstanceValueFP)BKE_node_preview_free); - ntree->previews = nullptr; - } -} - void BKE_node_preview_clear(bNodePreview *preview) { if (preview && preview->rect) { @@ -3587,11 +3529,6 @@ bNode *ntreeFindType(const bNodeTree *ntree, int type) return nullptr; } -bool ntreeHasType(const bNodeTree *ntree, int type) -{ - return ntreeFindType(ntree, type) != nullptr; -} - bool ntreeHasTree(const bNodeTree *ntree, const bNodeTree *lookup) { if (ntree == lookup) { |