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:
authorHans Goudey <h.goudey@me.com>2021-12-06 00:45:41 +0300
committerHans Goudey <h.goudey@me.com>2021-12-06 00:45:41 +0300
commit338c1060d5d7b6a8bd3ec5632f543738de4c103c (patch)
treeb8ca72de9e4381dca31f681e604c2469e3a5a74e /source/blender/editors/space_node/node_edit.cc
parent0578921063fbb081239439062215f2538a31af4b (diff)
Cleanup: Remove unnecessary node type callbacks for drawing
Currently there are a few callbacks on `bNodeType` that do the same thing for every node type except reroutes and frame nodes. Having a callback for basic things complicates code and makes it harder to understand, and reroutes and frames are special cases in larger way. Arguably frame nodes shouldn't even be drawn like regular nodes, given that it adds a case of O(N^2) looping through all nodes. "Unrolling" the callbacks makes it easier to see what's happening, and therefore easier to optimize. Differential Revision: https://developer.blender.org/D13463
Diffstat (limited to 'source/blender/editors/space_node/node_edit.cc')
-rw-r--r--source/blender/editors/space_node/node_edit.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/space_node/node_edit.cc b/source/blender/editors/space_node/node_edit.cc
index f856347e09a..5a598a1bd04 100644
--- a/source/blender/editors/space_node/node_edit.cc
+++ b/source/blender/editors/space_node/node_edit.cc
@@ -1099,7 +1099,7 @@ static int node_resize_invoke(bContext *C, wmOperator *op, const wmEvent *event)
/* convert mouse coordinates to v2d space */
float cursor[2];
UI_view2d_region_to_view(&region->v2d, event->mval[0], event->mval[1], &cursor[0], &cursor[1]);
- const NodeResizeDirection dir = node->typeinfo->resize_area_func(node, cursor[0], cursor[1]);
+ const NodeResizeDirection dir = node_get_resize_direction(node, cursor[0], cursor[1]);
if (dir == NODE_RESIZE_NONE) {
return OPERATOR_CANCELLED | OPERATOR_PASS_THROUGH;
}