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-09-19 17:03:43 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-09-19 17:03:43 +0400
commit0dd81203a3982e55af012cfcc9a232c78ce631b9 (patch)
tree12ba9965069454c829f0b5a015745d967ece9331 /space_view3d_math_vis
parentd64686a4e37a56f8c94fda4f818ea0ffc37b2d3d (diff)
fix for mathvis addon
Diffstat (limited to 'space_view3d_math_vis')
-rw-r--r--space_view3d_math_vis/draw.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/space_view3d_math_vis/draw.py b/space_view3d_math_vis/draw.py
index dd544d38..6636ea68 100644
--- a/space_view3d_math_vis/draw.py
+++ b/space_view3d_math_vis/draw.py
@@ -59,8 +59,7 @@ def draw_callback_px(self, context):
perspective_matrix = region3d.perspective_matrix.copy()
def draw_text(text, vec):
- vec_4d = vec.to_4d()
- vec_4d *= perspective_matrix
+ vec_4d = perspective_matrix * vec.to_4d()
if vec_4d.w > 0.0:
x = region_mid_width + region_mid_width * (vec_4d.x / vec_4d.w)
y = region_mid_height + region_mid_height * (vec_4d.y / vec_4d.w)
@@ -160,7 +159,7 @@ def draw_callback_view(self, context):
for y in (-1.0, 1.0):
for z in (-1.0, 1.0):
bb[i][:] = x, y, z
- bb[i] *= mat
+ bb[i] = mat * bb[i]
i += 1
# strip