Advertisement
Guest User

Untitled

a guest
Mar 6th, 2015
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. import bpy
  2.  
  3. obj = bpy.context.scene.objects["Cube"]
  4. action = obj.animation_data.action
  5.  
  6. fcurves = action.fcurves
  7. for f in fcurves:
  8. print(f.data_path)
  9.  
  10. coords = []
  11. for vert in obj.data.vertices:
  12. if vert.co.z > 0:
  13. coords.append( vert.co )
  14. print( vert.co )
  15.  
  16. ysorted = sorted(coords, key=lambda element: (element[1] ))
  17.  
  18. cidx=0
  19. for i in range(200,250):
  20. curve_val = f.evaluate(i)
  21. ysorted[cidx].z = curve_val
  22. cidx = cidx + 1
  23. ysorted[cidx].z = curve_val
  24. cidx = cidx + 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement