Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_view3d/view3d_placement.c
| Show First 20 Lines • Show All 1,509 Lines • ▼ Show 20 Lines | |||||
| * \{ */ | * \{ */ | ||||
| static void preview_plane_free_fn(void *customdata) | static void preview_plane_free_fn(void *customdata) | ||||
| { | { | ||||
| V3DSnapCursorState *snap_state = customdata; | V3DSnapCursorState *snap_state = customdata; | ||||
| ED_view3d_cursor_snap_deactive(snap_state); | ED_view3d_cursor_snap_deactive(snap_state); | ||||
| } | } | ||||
| static void WIDGETGROUP_placement_setup(const bContext *UNUSED(C), wmGizmoGroup *gzgroup) | static void WIDGETGROUP_placement_setup(const bContext *C, wmGizmoGroup *gzgroup) | ||||
| { | { | ||||
| V3DSnapCursorState *snap_state = ED_view3d_cursor_snap_active(); | V3DSnapCursorState *snap_state = ED_view3d_cursor_snap_active(); | ||||
| if (snap_state) { | if (snap_state) { | ||||
| snap_state->region = CTX_wm_region(C); | |||||
| snap_state->draw_plane = true; | snap_state->draw_plane = true; | ||||
| gzgroup->customdata = snap_state; | gzgroup->customdata = snap_state; | ||||
| gzgroup->customdata_free = preview_plane_free_fn; | gzgroup->customdata_free = preview_plane_free_fn; | ||||
| } | } | ||||
| } | } | ||||
| void VIEW3D_GGT_placement(wmGizmoGroupType *gzgt) | void VIEW3D_GGT_placement(wmGizmoGroupType *gzgt) | ||||
| Show All 14 Lines | |||||