From 1995aae6e3bf3c51b3945d6d31b4ad20fd11fb73 Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Wed, 5 Jan 2022 12:32:00 +0100 Subject: Fix T94415: Nodes: poor selection behavior inside frame nodes Previously, node selection made no distinction between a frame node and other nodes. So a frame node would be selected by their whole rect or center (depending on box/lasso/circle select). As a consequence of this, box and lasso could not pratically be started inside a frame node (with the intention to select a subset of contained child nodes) because the frame would be selected immediately and tweak-transforming started. Circle selecting would always contain the frame node as well (making transforming a subset of nodes without also transforming the whole frame impossible). Now change selection behavior so that for all selection modes only the border [the margin area that is automatically added around all nodes, see note below] of a frame node is considered in selection. This makes for a much more intuitive experience when arranging nodes inside frames. note: to make the area of interest for selection/moving more obvious, the cursor changes when hovering over (as is done for resizing). note: this also makes the resize margin consistent with other nodes. note: this also fixes right resize border (was exclusive instead of inclusive as every other border) Also fixes T46540. --- source/blender/editors/space_node/node_intern.hh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/editors/space_node/node_intern.hh') diff --git a/source/blender/editors/space_node/node_intern.hh b/source/blender/editors/space_node/node_intern.hh index c161fc70402..95f771cc00b 100644 --- a/source/blender/editors/space_node/node_intern.hh +++ b/source/blender/editors/space_node/node_intern.hh @@ -119,6 +119,8 @@ float2 node_link_calculate_multi_input_position(const float2 &socket_position, int index, int total_inputs); +rctf node_frame_rect_inside(const bNode &node); + int node_get_resize_cursor(NodeResizeDirection directions); NodeResizeDirection node_get_resize_direction(const bNode *node, int x, int y); /** -- cgit v1.2.3