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:
authorFabian Schempp <fabian_schempp>2021-02-11 10:16:17 +0300
committerHans Goudey <h.goudey@me.com>2021-02-11 10:16:17 +0300
commit8f707a72e81833bb835324ddc635b29dfbe87a9f (patch)
tree6628941c09c3a46be9b1c0f36751ed8c6669feee /source/blender/blenkernel/intern/node.cc
parent9a9e19fdcc48622dba8f98c9afb10a6750ff22b0 (diff)
UI: Multi-input node socket spacing and interaction
This commit makes links connected to multi-input sockets spread verticaly along the socket. Sockets grow if more links are connected and the node layout updates accordingly. Links are sorted by their incoming angle to avoid crossing links. Also, link picking is updated to work with spread links and bezier links. Currently the multi-input sockets are used in the join geometry node. The mutli-input sockets look like a vertical rounded rectangle. Currently they do not support the other custom socket shapes. Reviewed By Hans Goudey, with cleanup and additional edits Differential Revision: https://developer.blender.org/D10181
Diffstat (limited to 'source/blender/blenkernel/intern/node.cc')
-rw-r--r--source/blender/blenkernel/intern/node.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/node.cc b/source/blender/blenkernel/intern/node.cc
index ed8dd84a9bb..e34afd1ce17 100644
--- a/source/blender/blenkernel/intern/node.cc
+++ b/source/blender/blenkernel/intern/node.cc
@@ -573,6 +573,7 @@ static void direct_link_node_socket(BlendDataReader *reader, bNodeSocket *sock)
sock->typeinfo = nullptr;
BLO_read_data_address(reader, &sock->storage);
BLO_read_data_address(reader, &sock->default_value);
+ sock->total_inputs = 0; /* Clear runtime data set before drawing. */
sock->cache = nullptr;
}