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

git.blender.org/blender.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:04:23 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-02-05 10:04:23 +0300
commit8b52087d837ac035e2645c09ad780c45fccb9d89 (patch)
tree5982081187260e2544378a24a74a897072030a96 /release/scripts/modules
parentdd08305e7506233611315dc6c60013fbac30b53d (diff)
update for changes in mathutils.
Diffstat (limited to 'release/scripts/modules')
-rw-r--r--release/scripts/modules/add_object_utils.py6
-rw-r--r--release/scripts/modules/bpy_types.py8
2 files changed, 7 insertions, 7 deletions
diff --git a/release/scripts/modules/add_object_utils.py b/release/scripts/modules/add_object_utils.py
index 01a1a73aedf..10707734bc4 100644
--- a/release/scripts/modules/add_object_utils.py
+++ b/release/scripts/modules/add_object_utils.py
@@ -37,7 +37,7 @@ def add_object_align_init(context, operator):
location = mathutils.Matrix.Translation(context.scene.cursor_location)
if operator:
- operator.properties.location = location.translation_part()
+ operator.properties.location = location.to_translation()
# rotation
view_align = (context.user_preferences.edit.object_align == 'VIEW')
@@ -49,10 +49,10 @@ def add_object_align_init(context, operator):
operator.properties.view_align = view_align
if operator and operator.properties.is_property_set("rotation") and not view_align_force:
- rotation = mathutils.Euler(operator.properties.rotation).to_matrix().resize4x4()
+ rotation = mathutils.Euler(operator.properties.rotation).to_matrix().to_4x4()
else:
if view_align and space_data:
- rotation = space_data.region_3d.view_matrix.rotation_part().invert().resize4x4()
+ rotation = space_data.region_3d.view_matrix.to_3x3().inverted().to_4x4()
else:
rotation = mathutils.Matrix()
diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py
index 61c3f11ccef..1cb30765bf0 100644
--- a/release/scripts/modules/bpy_types.py
+++ b/release/scripts/modules/bpy_types.py
@@ -142,19 +142,19 @@ class _GenericBone:
def x_axis(self):
""" Vector pointing down the x-axis of the bone.
"""
- return Vector((1.0, 0.0, 0.0)) * self.matrix.rotation_part()
+ return Vector((1.0, 0.0, 0.0)) * self.matrix.to_3x3()
@property
def y_axis(self):
""" Vector pointing down the x-axis of the bone.
"""
- return Vector((0.0, 1.0, 0.0)) * self.matrix.rotation_part()
+ return Vector((0.0, 1.0, 0.0)) * self.matrix.to_3x3()
@property
def z_axis(self):
""" Vector pointing down the x-axis of the bone.
"""
- return Vector((0.0, 0.0, 1.0)) * self.matrix.rotation_part()
+ return Vector((0.0, 0.0, 1.0)) * self.matrix.to_3x3()
@property
def basename(self):
@@ -284,7 +284,7 @@ class EditBone(StructRNA, _GenericBone, metaclass=StructMetaIDProp):
Expects a 4x4 or 3x3 matrix.
"""
from mathutils import Vector
- z_vec = Vector((0.0, 0.0, 1.0)) * self.matrix.rotation_part()
+ z_vec = Vector((0.0, 0.0, 1.0)) * self.matrix.to_3x3()
self.tail = self.tail * matrix
self.head = self.head * matrix
scalar = matrix.median_scale