diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-07-01 15:05:11 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-07-01 15:05:11 +0400 |
commit | 1eae6b5fb54906ce6b13d1ff2bcf9f85f2ffb7ad (patch) | |
tree | b69eef09cb63428235c7dcc4ec4b6faea8514e70 /release/scripts/templates | |
parent | 1597ad9377460453845b48af69ea888e32297cc1 (diff) |
fix for 2 errors in the template
Diffstat (limited to 'release/scripts/templates')
-rw-r--r-- | release/scripts/templates/operator_modal_view3d_raycast.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/release/scripts/templates/operator_modal_view3d_raycast.py b/release/scripts/templates/operator_modal_view3d_raycast.py index 5d6b66a5188..6df423e3717 100644 --- a/release/scripts/templates/operator_modal_view3d_raycast.py +++ b/release/scripts/templates/operator_modal_view3d_raycast.py @@ -9,7 +9,7 @@ def main(context, event, ray_max=10000.0): scene = context.scene region = context.region rv3d = context.region_data - coord = event.mouse_x, event.mouse_y + coord = event.mouse_region_x, event.mouse_region_y # get the ray from the viewport and mouse view_vector = view3d_utils.region_2d_to_vector_3d(region, rv3d, coord) @@ -56,7 +56,7 @@ def main(context, event, ray_max=10000.0): for obj, matrix in visible_objects_and_duplis(): if obj.type == 'MESH': - hit, normal, face_index = obj_ray_cast(obj, obj.matrix_world) + hit, normal, face_index = obj_ray_cast(obj, matrix) if hit is not None: length_squared = (hit - ray_origin).length_squared if length_squared < best_length_squared: |