diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-07-25 07:59:01 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-07-25 07:59:01 +0400 |
commit | 7f60ee6cb5f3a483cb244ab640967131017f3bcc (patch) | |
tree | 11ee0fa7a65861a1028165ebcee99441916f58ea /release/scripts/modules/bpy_extras | |
parent | ced8f1dffcb9b054d7197a21e2a0426056b2babf (diff) |
reverse vector multiplication order for some internal functions.
Diffstat (limited to 'release/scripts/modules/bpy_extras')
-rw-r--r-- | release/scripts/modules/bpy_extras/view3d_utils.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/release/scripts/modules/bpy_extras/view3d_utils.py b/release/scripts/modules/bpy_extras/view3d_utils.py index c0c0f9186bd..5796abce72c 100644 --- a/release/scripts/modules/bpy_extras/view3d_utils.py +++ b/release/scripts/modules/bpy_extras/view3d_utils.py @@ -50,11 +50,11 @@ def region_2d_to_vector_3d(region, rv3d, coord): -0.5 )) - w = (out[0] * persinv[0][3]) + \ - (out[1] * persinv[1][3]) + \ - (out[2] * persinv[2][3]) + persinv[3][3] + w = ((out[0] * persinv[0][3]) + + (out[1] * persinv[1][3]) + + (out[2] * persinv[2][3]) + persinv[3][3]) - return ((out * persinv) / w) - rv3d.view_matrix.inverted()[3].xyz + return ((persinv * out) / w) - rv3d.view_matrix.inverted()[3].xyz else: return rv3d.view_matrix.inverted()[2].xyz.normalized() @@ -116,7 +116,7 @@ def location_3d_to_region_2d(region, rv3d, coord): """ from mathutils import Vector - prj = Vector((coord[0], coord[1], coord[2], 1.0)) * rv3d.perspective_matrix + prj = rv3d.perspective_matrix * Vector((coord[0], coord[1], coord[2], 1.0)) if prj.w > 0.0: width_half = region.width / 2.0 height_half = region.height / 2.0 |