Node Border Select: only frames inside border

Without this you can't easily select a few nodes inside a frame,
without selecting the whole frame, noted in T46540
This commit is contained in:
Campbell Barton 2015-10-24 01:06:28 +11:00
parent 0870612268
commit 4ff10119f7
Notes: blender-bot 2023-02-14 08:31:09 +01:00
Referenced by issue #46540, In-frame node selection issue
1 changed files with 9 additions and 1 deletions

View File

@ -531,7 +531,15 @@ static int node_borderselect_exec(bContext *C, wmOperator *op)
UI_view2d_region_to_view_rctf(&ar->v2d, &rectf, &rectf);
for (node = snode->edittree->nodes.first; node; node = node->next) {
if (BLI_rctf_isect(&rectf, &node->totr, NULL)) {
bool select;
if (node->type == NODE_FRAME) {
select = BLI_rctf_inside_rctf(&rectf, &node->totr);
}
else {
select = BLI_rctf_isect(&rectf, &node->totr, NULL);
}
if (select) {
nodeSetSelected(node, (gesture_mode == GESTURE_MODAL_SELECT));
}
else if (!extend) {