diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-12-02 10:08:48 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-12-02 10:08:48 +0300 |
commit | a5c0964c70cc4c12e574ef7e51fcf6c0b5f38680 (patch) | |
tree | 294c583784a171dcc4cff46ea1a3e034f61960df /source/blender/makesrna | |
parent | 8d8bc24dd501511a1a8adfb011cd3dc447ff77e4 (diff) |
Cleanup: transform snap arguments
This was getting very hard to follow,
- mixing input/output args.
- mixing arg order between functions.
- arg names (mode, snap_mode) rename to (snap_to, snap_select)
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_scene_api.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c index 9d63dfe0f55..6c5a29c02cd 100644 --- a/source/blender/makesrna/intern/rna_scene_api.c +++ b/source/blender/makesrna/intern/rna_scene_api.c @@ -141,17 +141,18 @@ static void rna_Scene_ray_cast(Scene *scene, float ray_start[3], float ray_end[3 int *r_success, Object **r_ob, float r_obmat[16], float r_location[3], float r_normal[3]) { - float dummy_dist_px = 0; float ray_nor[3]; float ray_dist; sub_v3_v3v3(ray_nor, ray_end, ray_start); ray_dist = normalize_v3(ray_nor); - if (snapObjectsRayEx(scene, NULL, NULL, NULL, NULL, SCE_SNAP_MODE_FACE, - r_ob, (float(*)[4])r_obmat, - ray_start, ray_nor, &ray_dist, - NULL, &dummy_dist_px, r_location, r_normal, SNAP_ALL)) + if (snapObjectsRayEx( + scene, NULL, NULL, NULL, NULL, + NULL, SNAP_ALL, SCE_SNAP_MODE_FACE, + ray_start, ray_nor, &ray_dist, + r_location, r_normal, NULL, + r_ob, (float(*)[4])r_obmat)) { *r_success = true; } |