Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import bpy
- from bpy import context
- import mathutils
- from mathutils import Vector,Quaternion,Matrix
- import math
- #obj = bpy.data.objects["Cube"] # particular object by name
- obj = bpy.context.scene.objects.active # active object
- # setup whatever matrix
- mx = Matrix([[0, 1, 0, 0],
- [0, 0, 1, 0],
- [1, 0, 0, 0],
- [2.94099, -0.32091, 0.92944, 1]])
- mx.transpose()
- bpy.ops.ed.undo_push()
- mesh = obj.data
- for vert in mesh.vertices:
- vert.co = mx * vert.co
Add Comment
Please, Sign In to add comment