Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/armature/editarmature_sketch.c
| Context not available. | |||||
| * the ideal would be to call this function only at the beginning of the snap operation, | * the ideal would be to call this function only at the beginning of the snap operation, | ||||
| * or at the beginning of the operator itself */ | * or at the beginning of the operator itself */ | ||||
| struct SnapObjectContext *snap_context = ED_transform_snap_object_context_create_view3d( | struct SnapObjectContext *snap_context = ED_transform_snap_object_context_create_view3d( | ||||
| CTX_data_main(C), CTX_data_scene(C), CTX_data_scene_layer(C), 0, | CTX_data_main(C), CTX_data_scene(C), CTX_data_scene_layer(C), SNAP_NOT_SELECTED, false, | ||||
| CTX_wm_region(C), CTX_wm_view3d(C)); | CTX_wm_region(C), CTX_wm_view3d(C), SNAP_MIN_DISTANCE); | ||||
| float mvalf[2] = {UNPACK2(dd->mval)}; | float mvalf[2] = {UNPACK2(dd->mval)}; | ||||
| float loc[3], dummy_no[3]; | float loc[3], dummy_no[3]; | ||||
| Context not available. | |||||
| float size; | float size; | ||||
| if (peelObjectsSnapContext( | if (peelObjectsSnapContext( | ||||
| snap_context, mvalf, | snap_context, mvalf, | ||||
| &(const struct SnapObjectParams){ | |||||
| .snap_select = SNAP_NOT_SELECTED, | |||||
| .use_object_edit_cage = false, | |||||
| }, | |||||
| (ts->snap_flag & SCE_SNAP_PEEL_OBJECT) != 0, | (ts->snap_flag & SCE_SNAP_PEEL_OBJECT) != 0, | ||||
| loc, dummy_no, &size)) | loc, dummy_no, &size)) | ||||
| { | { | ||||
| Context not available. | |||||
| if (ED_transform_snap_object_project_view3d( | if (ED_transform_snap_object_project_view3d( | ||||
| snap_context, | snap_context, | ||||
| ts->snap_mode, | ts->snap_mode, | ||||
| &(const struct SnapObjectParams){ | |||||
| .snap_select = SNAP_NOT_SELECTED, | |||||
| .use_object_edit_cage = false, | |||||
| }, | |||||
| mvalf, &dist_px, NULL, | mvalf, &dist_px, NULL, | ||||
| loc, dummy_no)) | loc, dummy_no)) | ||||
| { | { | ||||
| Context not available. | |||||