Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_view3d/view3d_snap.c
| Show First 20 Lines • Show All 425 Lines • ▼ Show 20 Lines | void VIEW3D_OT_snap_selected_to_cursor(wmOperatorType *ot) | ||||
| /* api callbacks */ | /* api callbacks */ | ||||
| ot->exec = snap_selected_to_cursor_exec; | ot->exec = snap_selected_to_cursor_exec; | ||||
| ot->poll = ED_operator_view3d_active; | ot->poll = ED_operator_view3d_active; | ||||
| /* flags */ | /* flags */ | ||||
| ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; | ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; | ||||
| /* rna */ | /* rna */ | ||||
| WM_operatortype_props_advanced(ot); | |||||
| RNA_def_boolean(ot->srna, "use_offset", 1, "Offset", ""); | RNA_def_boolean(ot->srna, "use_offset", 1, "Offset", ""); | ||||
| } | } | ||||
| static int snap_selected_to_active_exec(bContext *C, wmOperator *op) | static int snap_selected_to_active_exec(bContext *C, wmOperator *op) | ||||
| { | { | ||||
| float snap_target_global[3]; | float snap_target_global[3]; | ||||
| if (snap_calc_active_center(C, false, snap_target_global) == false) { | if (snap_calc_active_center(C, false, snap_target_global) == false) { | ||||
| ▲ Show 20 Lines • Show All 391 Lines • Show Last 20 Lines | |||||