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:
authorLukas Tönne <lukas.toenne@gmail.com>2021-06-21 23:08:29 +0300
committerLukas Tönne <lukas.toenne@gmail.com>2021-06-21 23:08:29 +0300
commita71af6fd2d9483dd24181b99ad4c21bc3ec97c1c (patch)
tree1e3a8dbf2312c46efc926760630669f727f4fefc /source/blender/nodes/geometry
parent083f2b1ae2a589abc4a16c2daa7cc4e057bf99d3 (diff)
Node socket type callback for display shape.
This can change the display shape per socket type instead of using per instance variable.
Diffstat (limited to 'source/blender/nodes/geometry')
-rw-r--r--source/blender/nodes/geometry/node_geometry_tree.cc17
1 files changed, 0 insertions, 17 deletions
diff --git a/source/blender/nodes/geometry/node_geometry_tree.cc b/source/blender/nodes/geometry/node_geometry_tree.cc
index adc3df9ffad..f36d5b3c9ca 100644
--- a/source/blender/nodes/geometry/node_geometry_tree.cc
+++ b/source/blender/nodes/geometry/node_geometry_tree.cc
@@ -108,22 +108,6 @@ static bool geometry_node_tree_validate_link(bNodeTree *UNUSED(ntree), bNodeLink
return (link->tosock->type == link->fromsock->type);
}
-/* Common initialization for nodes added to geometry node trees. */
-static void geometry_node_tree_node_add_init(bNodeTree *UNUSED(ntree), bNode *node)
-{
- /* Set the display shape for all attribute sockets. */
- LISTBASE_FOREACH (bNodeSocket *, socket, &node->inputs) {
- if (socket->type == SOCK_ATTRIBUTE) {
- socket->display_shape = SOCK_DISPLAY_SHAPE_SQUARE;
- }
- }
- LISTBASE_FOREACH (bNodeSocket *, socket, &node->outputs) {
- if (socket->type == SOCK_ATTRIBUTE) {
- socket->display_shape = SOCK_DISPLAY_SHAPE_SQUARE;
- }
- }
-}
-
static bool geometry_node_tree_socket_type_valid(eNodeSocketDatatype socket_type,
bNodeTreeType *UNUSED(ntreetype))
{
@@ -157,7 +141,6 @@ void register_node_tree_type_geo(void)
tt->foreach_nodeclass = foreach_nodeclass;
tt->valid_socket_type = geometry_node_tree_socket_type_valid;
tt->validate_link = geometry_node_tree_validate_link;
- tt->node_add_init = geometry_node_tree_node_add_init;
ntreeTypeAdd(tt);
}