Skip to content

Commit

Permalink
Fix T94846: AnimAll does not keyframe bezier curve handle type
Browse files Browse the repository at this point in the history
Add option to export Bezier curves' left and right handle types
  • Loading branch information
PiOverFour committed Jan 16, 2022
1 parent 3012911 commit d4fcda5
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions animation_animall.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@ class AnimallProperties(bpy.types.PropertyGroup):
description="Insert keyframes on point locations",
default=False
)
key_handle_type: BoolProperty(
name="Handle Types",
description="Insert keyframes on Bezier point types",
default=False
)
key_radius: BoolProperty(
name="Radius",
description="Insert keyframes on point radius (Shrink/Fatten)",
Expand Down Expand Up @@ -181,6 +186,8 @@ def draw(self, context):
row = col.row()
row.prop(animall_properties, "key_radius")
row.prop(animall_properties, "key_tilt")
row = col.row()
row.prop(animall_properties, "key_handle_type")

elif obj.type == 'SURFACE':
row.prop(animall_properties, "key_points")
Expand Down Expand Up @@ -271,6 +278,10 @@ def execute(op, context):
if animall_properties.key_radius:
insert_key(CV, 'radius', group="Spline %s CV %s" % (s_i, v_i))

if animall_properties.key_handle_type:
insert_key(CV, 'handle_left_type', group="spline %s CV %s" % (s_i, v_i))
insert_key(CV, 'handle_right_type', group="spline %s CV %s" % (s_i, v_i))

if animall_properties.key_tilt:
insert_key(CV, 'tilt', group="Spline %s CV %s" % (s_i, v_i))

Expand Down Expand Up @@ -468,6 +479,9 @@ def execute(op, context):
delete_key(CV, 'co')
delete_key(CV, 'handle_left')
delete_key(CV, 'handle_right')
if animall_properties.key_handle_type:
delete_key(CV, 'handle_left_type')
delete_key(CV, 'handle_right_type')
if animall_properties.key_radius:
delete_key(CV, 'radius')
if animall_properties.key_tilt:
Expand Down

0 comments on commit d4fcda5

Please sign in to comment.