Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-02-05 10:08:34 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-02-05 10:08:34 +0300
commit696b0366f5c46dcfcb50f53b4ca4f59c593b88fb (patch)
tree8dfbeb67383adc39b5742c661f61a55eb4066659 /space_view3d_panel_measure.py
parentdfd3febce161e76015beb0faac516724aceff453 (diff)
update for changes in mathutuils.
Diffstat (limited to 'space_view3d_panel_measure.py')
-rw-r--r--space_view3d_panel_measure.py10
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: