diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-04-14 09:37:43 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-04-14 09:37:43 +0400 |
commit | ba283d6c9be1d678210e08233916268f48ef4ee1 (patch) | |
tree | 979ed657034ae3e6df69b4e428fe2694ccee867e /source/blender/makesrna/intern/rna_scene_api.c | |
parent | d2b14ed4f007d7eb1160b67c6b3722cec52df375 (diff) |
modify snapObjectsRayEx() to use a pointer to 'ray_dist' rather then passing the dist, this is to better support multiple calls to ray-cast where only closer distances are accepted.
Diffstat (limited to 'source/blender/makesrna/intern/rna_scene_api.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_scene_api.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c index a028be14cc7..9d920ff2519 100644 --- a/source/blender/makesrna/intern/rna_scene_api.c +++ b/source/blender/makesrna/intern/rna_scene_api.c @@ -96,13 +96,13 @@ static void rna_Scene_ray_cast(Scene *scene, ReportList *reports, float ray_star { float dummy_dist_px = 0; float ray_nor[3]; - float dist; + float ray_dist; sub_v3_v3v3(ray_nor, ray_end, ray_start); - dist = normalize_v3(ray_nor); + ray_dist = normalize_v3(ray_nor); if (snapObjectsRayEx(scene, NULL, NULL, NULL, NULL, SCE_SNAP_MODE_FACE, - ray_start, ray_nor, dist, + ray_start, ray_nor, &ray_dist, NULL, &dummy_dist_px, r_location, r_normal, SNAP_ALL)) { *r_success = true; |