Guest User

Untitled

a guest
Jun 20th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. import bpy
  2. from bpy import context
  3. import mathutils
  4. from mathutils import Vector,Quaternion,Matrix
  5. import math
  6.  
  7. #obj = bpy.data.objects["Cube"] # particular object by name
  8. obj = bpy.context.scene.objects.active # active object
  9.  
  10. # setup whatever matrix
  11. mx = Matrix([[0, 1, 0, 0],
  12. [0, 0, 1, 0],
  13. [1, 0, 0, 0],
  14. [2.94099, -0.32091, 0.92944, 1]])
  15. mx.transpose()
  16.  
  17. bpy.ops.ed.undo_push()
  18.  
  19. mesh = obj.data
  20. for vert in mesh.vertices:
  21. vert.co = mx * vert.co
Add Comment
Please, Sign In to add comment