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')
-rw-r--r--source/blender/editors/space_node/node_group.cc2
-rw-r--r--source/blender/editors/space_node/node_intern.hh5
-rw-r--r--source/blender/editors/space_node/node_select.cc4
3 files changed, 5 insertions, 6 deletions
diff --git a/source/blender/editors/space_node/node_group.cc b/source/blender/editors/space_node/node_group.cc
index 4834ca3174a..02d68189997 100644
--- a/source/blender/editors/space_node/node_group.cc
+++ b/source/blender/editors/space_node/node_group.cc
@@ -28,9 +28,9 @@
#include "DNA_anim_types.h"
#include "DNA_node_types.h"
-#include "BLI_float2.hh"
#include "BLI_linklist.h"
#include "BLI_listbase.h"
+#include "BLI_math_vec_types.hh"
#include "BLI_string.h"
#include "BLI_vector.hh"
diff --git a/source/blender/editors/space_node/node_intern.hh b/source/blender/editors/space_node/node_intern.hh
index 0f542734f66..740d1fbb6f9 100644
--- a/source/blender/editors/space_node/node_intern.hh
+++ b/source/blender/editors/space_node/node_intern.hh
@@ -23,7 +23,7 @@
#pragma once
-#include "BLI_float2.hh"
+#include "BLI_math_vec_types.hh"
#include "BLI_vector.hh"
#include "BKE_node.h"
@@ -43,9 +43,6 @@ struct bNodeLink;
struct bNodeSocket;
struct wmGizmoGroupType;
struct wmKeyConfig;
-namespace blender {
-struct float2;
-}
struct wmWindow;
/** Temporary data used in node link drag modal operator. */
diff --git a/source/blender/editors/space_node/node_select.cc b/source/blender/editors/space_node/node_select.cc
index 334ca1f76ee..803cf38c53a 100644
--- a/source/blender/editors/space_node/node_select.cc
+++ b/source/blender/editors/space_node/node_select.cc
@@ -111,11 +111,13 @@ static bNode *node_under_mouse_select(bNodeTree &ntree, int mx, int my)
static bNode *node_under_mouse_tweak(bNodeTree &ntree, const float2 &mouse)
{
+ using namespace blender::math;
+
LISTBASE_FOREACH_BACKWARD (bNode *, node, &ntree.nodes) {
if (node->type == NODE_REROUTE) {
bNodeSocket *socket = (bNodeSocket *)node->inputs.first;
const float2 location{socket->locx, socket->locy};
- if (float2::distance(mouse, location) < 24.0f) {
+ if (distance(mouse, location) < 24.0f) {
return node;
}
}