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:
authorGermano Cavalcante <germano.costa@ig.com.br>2021-10-19 18:55:20 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2021-10-20 14:28:58 +0300
commit9001dd7f29a2f22534cf5549bc500422b1243c97 (patch)
tree4722af399c6b7144d2db49222dd08e4ce623c01a /source/blender/editors/space_view3d/space_view3d.c
parent690e1baf722c6c79ec6a7eaa548cff4c0538f5d3 (diff)
View3D: Cursor Snap Refactor
Make the snap system consistent with the placement tool and leak-safe. **Changes:** - Store `SnapCursorDataIntern` in a `static` variable; - Initialize (lazily) `SnapCursorDataIntern` only once (for the keymap). - Move setup members of `V3DSnapCursorData` to a new struct `V3DSnapCursorState` - Merge `ED_view3d_cursor_snap_activate_point` and `ED_view3d_cursor_snap_activate_plane` into `state = ED_view3d_cursor_snap_active()` - Merge `ED_view3d_cursor_snap_deactivate_point` and `ED_view3d_cursor_snap_deactivate_plane` into `ED_view3d_cursor_snap_deactive(state)` - Be sure to free the snap context when closing via `ED_view3d_cursor_snap_exit` - Use RNA properties callbacks to update the properties of the `"Add Primitive Object"` operator
Diffstat (limited to 'source/blender/editors/space_view3d/space_view3d.c')
-rw-r--r--source/blender/editors/space_view3d/space_view3d.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index 83aa2d93fbb..787cf529483 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -355,10 +355,6 @@ static void view3d_exit(wmWindowManager *UNUSED(wm), ScrArea *area)
BLI_assert(area->spacetype == SPACE_VIEW3D);
View3D *v3d = area->spacedata.first;
MEM_SAFE_FREE(v3d->runtime.local_stats);
-
- /* Be sure to release the #V3DSnapCursorData from the cursor, or it will get lost. */
- ED_view3d_cursor_snap_deactivate_point();
- ED_view3d_cursor_snap_deactivate_plane();
}
static SpaceLink *view3d_duplicate(SpaceLink *sl)