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:
-rw-r--r--source/blender/editors/gizmo_library/gizmo_types/snap3d_gizmo.c1
-rw-r--r--source/blender/editors/space_view3d/view3d_gizmo_ruler.c4
2 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/gizmo_library/gizmo_types/snap3d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/snap3d_gizmo.c
index 1d18c82d896..2561de3aca9 100644
--- a/source/blender/editors/gizmo_library/gizmo_types/snap3d_gizmo.c
+++ b/source/blender/editors/gizmo_library/gizmo_types/snap3d_gizmo.c
@@ -412,6 +412,7 @@ void ED_gizmotypes_snap_3d_data_get(
wmGizmo *gz, float r_loc[3], float r_nor[3], int r_elem_index[3], int *r_snap_elem)
{
SnapGizmo3D *snap_gizmo = (SnapGizmo3D *)gz;
+ BLI_assert(snap_gizmo->is_enabled);
if (r_loc) {
copy_v3_v3(r_loc, snap_gizmo->loc);
}
diff --git a/source/blender/editors/space_view3d/view3d_gizmo_ruler.c b/source/blender/editors/space_view3d/view3d_gizmo_ruler.c
index 833901b6770..e202276831c 100644
--- a/source/blender/editors/space_view3d/view3d_gizmo_ruler.c
+++ b/source/blender/editors/space_view3d/view3d_gizmo_ruler.c
@@ -389,7 +389,9 @@ static bool view3d_ruler_item_mousemove(struct Depsgraph *depsgraph,
ED_gizmotypes_snap_3d_update(
snap_gizmo, depsgraph, ruler_info->region, v3d, ruler_info->wm, mval_fl);
- ED_gizmotypes_snap_3d_data_get(snap_gizmo, co, NULL, NULL, NULL);
+ if (ED_gizmotypes_snap_3d_is_enabled(snap_gizmo)) {
+ ED_gizmotypes_snap_3d_data_get(snap_gizmo, co, NULL, NULL, NULL);
+ }
}
return true;
}