Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/transform/transform_snap_object.c
| Show First 20 Lines • Show All 885 Lines • ▼ Show 20 Lines | case OB_MESH: { | ||||
| r_no, | r_no, | ||||
| r_index, | r_index, | ||||
| r_hit_list); | r_hit_list); | ||||
| break; | break; | ||||
| } | } | ||||
| case OB_CURVE: | case OB_CURVE: | ||||
| case OB_SURF: | case OB_SURF: | ||||
| case OB_FONT: { | case OB_FONT: { | ||||
| if (ob->runtime.mesh_eval) { | Mesh *mesh_eval = BKE_object_get_evaluated_mesh(ob); | ||||
| if (mesh_eval) { | |||||
| retval = raycastMesh(sctx, | retval = raycastMesh(sctx, | ||||
| ray_start, | ray_start, | ||||
| ray_dir, | ray_dir, | ||||
| ob, | ob, | ||||
| ob->runtime.mesh_eval, | mesh_eval, | ||||
| obmat, | obmat, | ||||
| ob_index, | ob_index, | ||||
| false, | false, | ||||
| use_backface_culling, | use_backface_culling, | ||||
| ray_depth, | ray_depth, | ||||
| r_loc, | r_loc, | ||||
| r_no, | r_no, | ||||
| r_index, | r_index, | ||||
| ▲ Show 20 Lines • Show All 1,702 Lines • ▼ Show 20 Lines | switch (ob->type) { | ||||
| case OB_ARMATURE: | case OB_ARMATURE: | ||||
| retval = snapArmature(snapdata, ob, obmat, use_obedit, dist_px, r_loc, r_no, r_index); | retval = snapArmature(snapdata, ob, obmat, use_obedit, dist_px, r_loc, r_no, r_index); | ||||
| break; | break; | ||||
| case OB_CURVE: | case OB_CURVE: | ||||
| retval = snapCurve(snapdata, ob, obmat, use_obedit, dist_px, r_loc, r_no, r_index); | retval = snapCurve(snapdata, ob, obmat, use_obedit, dist_px, r_loc, r_no, r_index); | ||||
| break; /* Use ATTR_FALLTHROUGH if we want to snap to the generated mesh. */ | break; /* Use ATTR_FALLTHROUGH if we want to snap to the generated mesh. */ | ||||
| case OB_SURF: | case OB_SURF: | ||||
| case OB_FONT: { | case OB_FONT: { | ||||
| if (ob->runtime.mesh_eval) { | Mesh *mesh_eval = BKE_object_get_evaluated_mesh(ob); | ||||
| if (mesh_eval) { | |||||
| retval |= snapMesh(sctx, | retval |= snapMesh(sctx, | ||||
| snapdata, | snapdata, | ||||
| ob, | ob, | ||||
| ob->runtime.mesh_eval, | mesh_eval, | ||||
| obmat, | obmat, | ||||
| use_backface_culling, | use_backface_culling, | ||||
| dist_px, | dist_px, | ||||
| r_loc, | r_loc, | ||||
| r_no, | r_no, | ||||
| r_index); | r_index); | ||||
| } | } | ||||
| break; | break; | ||||
| ▲ Show 20 Lines • Show All 541 Lines • Show Last 20 Lines | |||||