Revision: 48466
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48466
Author:   campbellbarton
Date:     2012-07-01 11:05:11 +0000 (Sun, 01 Jul 2012)
Log Message:
-----------
fix for 2 errors in the template

Modified Paths:
--------------
    trunk/blender/release/scripts/templates/operator_modal_view3d_raycast.py

Modified: 
trunk/blender/release/scripts/templates/operator_modal_view3d_raycast.py
===================================================================
--- trunk/blender/release/scripts/templates/operator_modal_view3d_raycast.py    
2012-07-01 09:54:44 UTC (rev 48465)
+++ trunk/blender/release/scripts/templates/operator_modal_view3d_raycast.py    
2012-07-01 11:05:11 UTC (rev 48466)
@@ -9,7 +9,7 @@
     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 @@
 
     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:

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to