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:
Diffstat (limited to 'source/blender/editors/space_node/node_draw.cc')
-rw-r--r--source/blender/editors/space_node/node_draw.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/space_node/node_draw.cc b/source/blender/editors/space_node/node_draw.cc
index 2c47883d831..e290316af1f 100644
--- a/source/blender/editors/space_node/node_draw.cc
+++ b/source/blender/editors/space_node/node_draw.cc
@@ -397,7 +397,7 @@ static void node_update_basis(const bContext &C, bNodeTree &ntree, bNode &node,
/* Round the socket location to stop it from jiggling. */
nsock->locx = round(loc.x + NODE_WIDTH(node));
- nsock->locy = round(0.5f * (dy + buty));
+ nsock->locy = round(dy - NODE_DYS);
dy = buty;
if (nsock->next) {
@@ -527,7 +527,7 @@ static void node_update_basis(const bContext &C, bNodeTree &ntree, bNode &node,
nsock->locx = loc.x;
/* Round the socket vertical position to stop it from jiggling. */
- nsock->locy = round(0.5f * (dy + buty));
+ nsock->locy = round(dy - NODE_DYS);
dy = buty - multi_input_socket_offset * 0.5;
if (nsock->next) {
@@ -626,7 +626,9 @@ static void node_update_hidden(bNode &node, uiBlock &block)
static int node_get_colorid(const bNode &node)
{
- switch (node.typeinfo->nclass) {
+ const int nclass = (node.typeinfo->ui_class == nullptr) ? node.typeinfo->nclass :
+ node.typeinfo->ui_class(&node);
+ switch (nclass) {
case NODE_CLASS_INPUT:
return TH_NODE_INPUT;
case NODE_CLASS_OUTPUT: