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>2010-01-25 12:44:04 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-01-25 12:44:04 +0300
commit0a0f4c9d81cfa2a4b4a9999e1dc976bc417d7d54 (patch)
tree367f259b695955a514530d125ab495344724eafb /release/scripts/op
parenteed13d859b67185996569178ede9241a5695f215 (diff)
Mathutils refactor & include in sphinx generated docs, (TODO, include getset'ers in docs)
- Mathutils.MidpointVecs --> vector.lerp(other, fac) - Mathutils.AngleBetweenVecs --> vector.angle(other) - Mathutils.ProjectVecs --> vector.project(other) - Mathutils.DifferenceQuats --> quat.difference(other) - Mathutils.Slerp --> quat.slerp(other, fac) - Mathutils.Rand: removed, use pythons random module - Mathutils.RotationMatrix(angle, size, axis_flag, axis) --> Mathutils.RotationMatrix(angle, size, axis); merge axis & axis_flag args - Matrix.scalePart --> Matrix.scale_part - Matrix.translationPart --> Matrix.translation_part - Matrix.rotationPart --> Matrix.rotation_part - toMatrix --> to_matrix - toEuler --> to_euler - toQuat --> to_quat - Vector.toTrackQuat --> Vector.to_track_quat
Diffstat (limited to 'release/scripts/op')
-rw-r--r--release/scripts/op/mesh.py2
-rw-r--r--release/scripts/op/mesh_skin.py7
-rw-r--r--release/scripts/op/uvcalc_smart_project.py2
3 files changed, 5 insertions, 6 deletions
diff --git a/release/scripts/op/mesh.py b/release/scripts/op/mesh.py
index f9b0b4d75b8..88b70509dee 100644
--- a/release/scripts/op/mesh.py
+++ b/release/scripts/op/mesh.py
@@ -90,7 +90,7 @@ class MeshMirrorUV(bpy.types.Operator):
mirror_gt = {}
mirror_lt = {}
- vcos = [v.co.toTuple(5) for v in mesh.verts]
+ vcos = [v.co.to_tuple(5) for v in mesh.verts]
for i, co in enumerate(vcos):
if co[0] > 0.0:
diff --git a/release/scripts/op/mesh_skin.py b/release/scripts/op/mesh_skin.py
index 6f62924ec02..15bf22d38b9 100644
--- a/release/scripts/op/mesh_skin.py
+++ b/release/scripts/op/mesh_skin.py
@@ -22,8 +22,7 @@
import time, functools
import bpy
# from Blender import Window
-from Mathutils import MidpointVecs, Vector
-from Mathutils import AngleBetweenVecs as _AngleBetweenVecs_
+from Mathutils import Vector
# import BPyMessages
# from Blender.Draw import PupMenu
@@ -36,7 +35,7 @@ CULL_METHOD = 0
def AngleBetweenVecs(a1,a2):
import math
try:
- return math.degrees(_AngleBetweenVecs_(a1,a2))
+ return math.degrees(a1.angle(a2))
except:
return 180.0
@@ -54,7 +53,7 @@ class edge(object):
self.removed = 0 # Have we been culled from the eloop
self.match = None # The other edge were making a face with
- self.cent= MidpointVecs(co1, co2)
+ self.cent= co1.lerp(co2, 0.5)
self.angle= 0.0
self.fake= False
diff --git a/release/scripts/op/uvcalc_smart_project.py b/release/scripts/op/uvcalc_smart_project.py
index 0cf2a650973..5efbbf25c32 100644
--- a/release/scripts/op/uvcalc_smart_project.py
+++ b/release/scripts/op/uvcalc_smart_project.py
@@ -936,7 +936,7 @@ def main(context, island_margin, projection_limit):
# Initialize projectVecs
if USER_VIEW_INIT:
# Generate Projection
- projectVecs = [Vector(Window.GetViewVector()) * ob.matrixWorld.copy().invert().rotationPart()] # We add to this allong the way
+ projectVecs = [Vector(Window.GetViewVector()) * ob.matrixWorld.copy().invert().rotation_part()] # We add to this allong the way
else:
projectVecs = []