diff options
Diffstat (limited to 'space_view3d_panel_measure.py')
-rw-r--r-- | space_view3d_panel_measure.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/space_view3d_panel_measure.py b/space_view3d_panel_measure.py index e137840f..8fd00712 100644 --- a/space_view3d_panel_measure.py +++ b/space_view3d_panel_measure.py @@ -237,7 +237,7 @@ def getMeasurePoints(context): # local ... the object center to the 3D cursor. # global ... the origin to the 3D cursor. cur_loc = sce.cursor_location - obj_loc = obj.matrix_world.translation_part() + obj_loc = obj.matrix_world.to_translation() # Convert to local space, if needed. if measureLocal(sce): @@ -272,7 +272,7 @@ def getMeasurePoints(context): # Two vertices selected. # We measure the distance between the # two selected vertices. - obj_loc = obj.matrix_world.translation_part() + obj_loc = obj.matrix_world.to_translation() vert1_loc = verts_selected[0].co.copy() vert2_loc = verts_selected[1].co.copy() @@ -299,15 +299,15 @@ def getMeasurePoints(context): # 2 objects selected. # We measure the distance between the 2 selected objects. obj1, obj2 = context.selected_objects - obj1_loc = obj1.matrix_world.translation_part() - obj2_loc = obj2.matrix_world.translation_part() + obj1_loc = obj1.matrix_world.to_translation() + obj2_loc = obj2.matrix_world.to_translation() return (obj1_loc, obj2_loc, COLOR_GLOBAL) elif (obj): # One object selected. # We measure the distance from the object to the 3D cursor. cur_loc = sce.cursor_location - obj_loc = obj.matrix_world.translation_part() + obj_loc = obj.matrix_world.to_translation() return (obj_loc, cur_loc, COLOR_GLOBAL) elif not context.selected_objects: |