From 3d8dea9ff92d242174613063527f4add98688bac Mon Sep 17 00:00:00 2001 From: Germano Cavalcante Date: Sun, 5 Dec 2021 22:39:04 -0300 Subject: Fix T93732: Snap Cursor not working after changing Add Object settings `g_data_intern.state_default.gzgrp_type` is a very specific member and cannot be set to default. --- source/blender/editors/space_view3d/view3d_cursor_snap.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source/blender/editors') diff --git a/source/blender/editors/space_view3d/view3d_cursor_snap.c b/source/blender/editors/space_view3d/view3d_cursor_snap.c index 47e7d452585..af3425111a3 100644 --- a/source/blender/editors/space_view3d/view3d_cursor_snap.c +++ b/source/blender/editors/space_view3d/view3d_cursor_snap.c @@ -919,6 +919,14 @@ static void v3d_cursor_snap_free(void) void ED_view3d_cursor_snap_state_default_set(V3DSnapCursorState *state) { g_data_intern.state_default = *state; + + /* These values are temporarily set by the tool. + * They are not convenient as default values. + * So reset to null. */ + g_data_intern.state_default.gzgrp_type = NULL; + g_data_intern.state_default.prevpoint = NULL; + g_data_intern.state_default.draw_plane = false; + g_data_intern.state_default.draw_box = false; } V3DSnapCursorState *ED_view3d_cursor_snap_active(void) -- cgit v1.2.3