Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. import bpy
  2. from bpy import context
  3.  
  4. scene= context.scene
  5.  
  6. obj = bpy.context.active_object
  7. face = obj.data.polygons[0]
  8.  
  9. scene.cursor.location = face.normal
  10. scene.cursor.rotation_euler = face.normal
  11.  
  12. rot = context.scene.cursor.rotation_euler.copy()
  13. loc = context.scene.cursor.location.copy()
  14.  
  15. bpy.ops.mesh.primitive_plane_add(location=loc, rotation= rot)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement