1
$\begingroup$

I'm trying to model a futurist tree. I would like to animate it as in first time it grows (so from the bottom to the top) and then smaller tree grow inside, but from the top to the bottom. I can't use a driver as the ramifications grows one after the other and do it manually would be awfully long as there is more than 200 ramifications. So I would like to know if there is a way to copy the bevel end keyframes values to the start bevel, or any other way to have a falling smaller instance inside the middle of a curve. Thanks in advance (sorry if my english is bad)

$\endgroup$
0
$\begingroup$

So I found a pretty good way, using bpy. I post it if someone needs

import bpy
from bpy import context



for obj in bpy.context.selected_objects:
    print(obj.name)
    bpy.context.view_layer.objects.active = obj
    obj = bpy.context.active_object
    for fc in obj.data.animation_data.action.fcurves:
        if fc.data_path == "bevel_factor_end":
            list_co = list()
            my_fc = fc
        for pt in my_fc.keyframe_points:
            print(pt.co.x, pt.co.y)
            list_co.append(pt)
my_fc = obj.data.animation_data.action.fcurves.new("bevel_factor_start", index=-1)
for pt in list_co:
    my_fc.keyframe_points.insert(pt.co.x, pt.co.y)
for fc in obj.data.animation_data.action.fcurves:
    if fc.data_path == "bevel_factor_end":
        obj.data.animation_data.action.fcurves.remove(fc)
| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.