diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-02-05 10:08:34 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-02-05 10:08:34 +0300 |
commit | 696b0366f5c46dcfcb50f53b4ca4f59c593b88fb (patch) | |
tree | 8dfbeb67383adc39b5742c661f61a55eb4066659 /modules | |
parent | dfd3febce161e76015beb0faac516724aceff453 (diff) |
update for changes in mathutuils.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/add_utils.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/add_utils.py b/modules/add_utils.py index 62bd5f78..bc54abc6 100644 --- a/modules/add_utils.py +++ b/modules/add_utils.py @@ -47,19 +47,19 @@ def add_object_align_init(context, operator): and operator.properties.is_property_set("location") and operator.properties.is_property_set("rotation")): location = mathutils.Matrix.Translation(mathutils.Vector(operator.properties.location)) - rotation = mathutils.Euler(operator.properties.rotation).to_matrix().resize4x4() + rotation = mathutils.Euler(operator.properties.rotation).to_matrix().to_4x4() else: # TODO, local view cursor! location = mathutils.Matrix.Translation(context.scene.cursor_location) if context.user_preferences.edit.object_align == 'VIEW' and context.space_data.type == 'VIEW_3D': - rotation = context.space_data.region_3d.view_matrix.rotation_part().invert().resize4x4() + rotation = context.space_data.region_3d.view_matrix.to_3x3().inverted().to_4x4() else: rotation = mathutils.Matrix() # set the operator properties if operator: - operator.properties.location = location.translation_part() + operator.properties.location = location.to_translation() operator.properties.rotation = rotation.to_euler() return location * rotation |