[Bf-extensions-cvs] [e2e252da] master: snap_context module: Fix local ray_dir calculation

Germano noreply at git.blender.org
Fri Sep 29 22:46:10 CEST 2017


Commit: e2e252da28a157bdfb935fbe1086050a3db05c2e
Author: Germano
Date:   Fri Sep 29 17:45:56 2017 -0300
Branches: master
https://developer.blender.org/rBAe2e252da28a157bdfb935fbe1086050a3db05c2e

snap_context module: Fix local ray_dir calculation

===================================================================

M	modules/snap_context/__init__.py

===================================================================

diff --git a/modules/snap_context/__init__.py b/modules/snap_context/__init__.py
index 35fe13f8..b7bdf17d 100644
--- a/modules/snap_context/__init__.py
+++ b/modules/snap_context/__init__.py
@@ -276,7 +276,7 @@ class SnapContext():
                 MVP = proj_mat * snap_obj.mat
                 mat_inv = snap_obj.mat.inverted()
                 ray_orig_local = mat_inv * ray_orig
-                ray_dir_local = ray_dir * snap_obj.mat
+                ray_dir_local = mat_inv.to_3x3() * ray_dir
                 in_threshold = _Internal.intersect_boundbox_threshold(self, MVP, ray_orig_local, ray_dir_local, bbmin, bbmax)
             else:
                 proj_co = _Internal.project_co_v3(self, snap_obj.mat.translation)



More information about the Bf-extensions-cvs mailing list