Blender Git Commit Log

Git Commits -> Revision 9001dd7

Revision 9001dd7 by Germano Cavalcante (master)
October 20, 2021, 11:28 (GMT)
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

Commit Details:

Full Hash: 9001dd7f29a2f22534cf5549bc500422b1243c97
Parent Commit: 690e1ba
Lines Changed: +439, -378

6 Modified Paths:

/source/blender/editors/gizmo_library/gizmo_types/snap3d_gizmo.c (+48, -64) (Diff)
/source/blender/editors/include/ED_view3d.h (+26, -22) (Diff)
/source/blender/editors/space_view3d/space_view3d.c (+0, -4) (Diff)
/source/blender/editors/space_view3d/view3d_cursor_snap.c (+219, -182) (Diff)
/source/blender/editors/space_view3d/view3d_placement.c (+144, -106) (Diff)
/source/blender/windowmanager/intern/wm_init_exit.c (+2, -0) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021