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>2010-07-03 21:39:45 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-07-03 21:39:45 +0400
commitf95f6ed04f447afe4ba0bab6ad9a54c5b0dd699c (patch)
treece05db8d58b408a09ee8332bb4ed9b9781d93467 /space_view3d_panel_measure.py
parentd79a2dc29ca7d42b446086214b7b853f6837dd71 (diff)
update for changes in blender
Diffstat (limited to 'space_view3d_panel_measure.py')
-rw-r--r--space_view3d_panel_measure.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/space_view3d_panel_measure.py b/space_view3d_panel_measure.py
index b893b271..a790a104 100644
--- a/space_view3d_panel_measure.py
+++ b/space_view3d_panel_measure.py
@@ -180,10 +180,9 @@ def getMeasurePoints(context):
mesh = obj.data
# Get transformation matrix from object.
- ob_mat = obj.matrix
+ ob_mat = obj.matrix_world
# Also make an inversed copy! of the matrix.
- ob_mat_inv = ob_mat.copy()
- Matrix.invert(ob_mat_inv)
+ ob_mat_inv = ob_mat.copy().invert()
# Get the selected vertices.
# @todo: Better (more efficient) way to do this?
@@ -282,14 +281,14 @@ def getMeasurePoints(context):
# Return the area of a face (in global space).
# @note Copies the functionality of the following functions,
-# but also respects the scaling (via the "obj.matrix" parameter):
+# but also respects the scaling (via the "obj.matrix_world" parameter):
# @sa: rna_mesh.c:rna_MeshFace_area_get
# @sa: math_geom.c:area_quad_v3
# @sa: math_geom.c:area_tri_v3
def faceAreaGlobal(face, obj):
area = 0.0
- mat = obj.matrix
+ mat = obj.matrix_world
if len(face.verts) == 4:
# Quad
@@ -665,7 +664,7 @@ class VIEW3D_PT_measure(bpy.types.Panel):
mesh = obj.data
# Get transformation matrix from object.
- ob_mat = obj.matrix
+ ob_mat = obj.matrix_world
# Also make an inversed copy! of the matrix.
ob_mat_inv = ob_mat.copy()
Matrix.invert(ob_mat_inv)