Fix #106097: Don't offset child nodes when pasting #106099

Merged
Hans Goudey merged 1 commits from lone_noel/blender:fix-frame-paste-offset into blender-v3.5-release 2023-03-24 12:48:06 +01:00
1 changed files with 5 additions and 2 deletions

View File

@ -263,8 +263,11 @@ static int node_clipboard_paste_exec(bContext *C, wmOperator *op)
const float2 offset = (mouse_location - center) / UI_DPI_FAC;
for (bNode *new_node : node_map.values()) {
new_node->locx += offset.x;
new_node->locy += offset.y;
/* Skip the offset for parented nodes since the location is in parent space. */
if (new_node->parent == nullptr) {
new_node->locx += offset.x;
new_node->locy += offset.y;
}
}
}