Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import bpy
- obj = bpy.context.scene.objects["Cube"]
- action = obj.animation_data.action
- fcurves = action.fcurves
- for f in fcurves:
- print(f.data_path)
- coords = []
- for vert in obj.data.vertices:
- if vert.co.z > 0:
- coords.append( vert.co )
- print( vert.co )
- ysorted = sorted(coords, key=lambda element: (element[1] ))
- cidx=0
- for i in range(200,250):
- curve_val = f.evaluate(i)
- ysorted[cidx].z = curve_val
- cidx = cidx + 1
- ysorted[cidx].z = curve_val
- cidx = cidx + 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement