[Bf-extensions-cvs] [487fef6] master: Fix rotation scale location.

Eugenio Pignataro noreply at git.blender.org
Mon Apr 7 19:50:21 CEST 2014


Commit: 487fef6d171f3f0297cbafd54d29f9af6c9bffeb
Author: Eugenio Pignataro
Date:   Mon Apr 7 14:50:11 2014 -0300
https://developer.blender.org/rBAC487fef6d171f3f0297cbafd54d29f9af6c9bffeb

Fix rotation scale location.

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

M	oscurart_tools/oscurart_meshes.py

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

diff --git a/oscurart_tools/oscurart_meshes.py b/oscurart_tools/oscurart_meshes.py
index bc51467..b9ab76f 100644
--- a/oscurart_tools/oscurart_meshes.py
+++ b/oscurart_tools/oscurart_meshes.py
@@ -343,7 +343,7 @@ def dibuja_callback(self, context):
     font_id = 0     
     bm = bmesh.from_edit_mesh(bpy.context.object.data)    
     for v in bm.verts:
-        cord = location_3d_to_region_2d(context.region, context.space_data.region_3d, v.co)
+        cord = location_3d_to_region_2d(context.region, context.space_data.region_3d, self.matr * v.co)
         blf.position(font_id, cord[0], cord[1], 0)
         blf.size(font_id, self.tsize, 72)
         blf.draw(font_id, str(v.index))
@@ -361,6 +361,7 @@ class ModalIndexOperator(bpy.types.Operator):
         context.area.tag_redraw()        
         if event.type == 'MOUSEMOVE':
             self.x = event.mouse_region_x
+            self.matr = context.object.matrix_world
         elif event.type == 'LEFTMOUSE':
             bpy.types.SpaceView3D.draw_handler_remove(self._handle, 'WINDOW')
             return {'FINISHED'}



More information about the Bf-extensions-cvs mailing list