Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/transform/transform_snap.c
| Context not available. | |||||
| if (t->spacetype == SPACE_VIEW3D) { | if (t->spacetype == SPACE_VIEW3D) { | ||||
| if (t->tsnap.object_context == NULL) { | if (t->tsnap.object_context == NULL) { | ||||
| t->tsnap.object_context = ED_transform_snap_object_context_create_view3d( | t->tsnap.object_context = ED_transform_snap_object_context_create_view3d( | ||||
| G.main, t->scene, t->scene_layer, 0, | G.main, t->scene, t->scene_layer, t->tsnap.modeSelect, (t->flag & T_EDIT) != 0, | ||||
| t->ar, t->view); | t->ar, t->view, SNAP_MIN_DISTANCE); | ||||
| ED_transform_snap_object_context_set_editmesh_callbacks( | ED_transform_snap_object_context_set_editmesh_callbacks( | ||||
| t->tsnap.object_context, | t->tsnap.object_context, | ||||
| Context not available. | |||||
| float *dist_px, | float *dist_px, | ||||
| float r_loc[3], float r_no[3]) | float r_loc[3], float r_no[3]) | ||||
| { | { | ||||
| return ED_transform_snap_object_project_view3d_ex( | return ED_transform_snap_object_project_view3d( | ||||
| t->tsnap.object_context, | t->tsnap.object_context, | ||||
| t->scene->toolsettings->snap_mode, | t->scene->toolsettings->snap_mode, | ||||
| &(const struct SnapObjectParams){ | |||||
| .snap_select = t->tsnap.modeSelect, | |||||
| .use_object_edit_cage = (t->flag & T_EDIT) != 0, | |||||
| }, | |||||
| mval, dist_px, NULL, | mval, dist_px, NULL, | ||||
| r_loc, r_no, NULL); | r_loc, r_no); | ||||
| } | } | ||||
| Context not available. | |||||
| bool peelObjectsSnapContext( | bool peelObjectsSnapContext( | ||||
| SnapObjectContext *sctx, | SnapObjectContext *sctx, | ||||
| const float mval[2], | const float mval[2], | ||||
| const struct SnapObjectParams *params, | |||||
| const bool use_peel_object, | const bool use_peel_object, | ||||
| /* return args */ | /* return args */ | ||||
| float r_loc[3], float r_no[3], float *r_thickness) | float r_loc[3], float r_no[3], float *r_thickness) | ||||
| Context not available. | |||||
| ListBase depths_peel = {0}; | ListBase depths_peel = {0}; | ||||
| ED_transform_snap_object_project_all_view3d_ex( | ED_transform_snap_object_project_all_view3d_ex( | ||||
| sctx, | sctx, | ||||
| params, | |||||
| mval, -1.0f, false, | mval, -1.0f, false, | ||||
| &depths_peel); | &depths_peel); | ||||
| Context not available. | |||||
| return peelObjectsSnapContext( | return peelObjectsSnapContext( | ||||
| t->tsnap.object_context, | t->tsnap.object_context, | ||||
| mval, | mval, | ||||
| &(const struct SnapObjectParams){ | |||||
| .snap_select = t->tsnap.modeSelect, | |||||
| .use_object_edit_cage = (t->flag & T_EDIT) != 0, | |||||
| }, | |||||
| use_peel_object, | use_peel_object, | ||||
| r_loc, r_no, r_thickness); | r_loc, r_no, r_thickness); | ||||
| } | } | ||||
| Context not available. | |||||