From 45dc6171705fd074657b0ed5bde2502431b74c4b Mon Sep 17 00:00:00 2001 From: Owl Date: Thu, 28 Aug 2025 22:47:21 -0400 Subject: added an extra parameter to my polyfit function --- bck_import.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'bck_import.py') diff --git a/bck_import.py b/bck_import.py index 47e99ad..398f18d 100644 --- a/bck_import.py +++ b/bck_import.py @@ -458,7 +458,9 @@ def import_bck_func(context, options): for i in range(lowest_anim_frame, greatest_anim_frame + 1): values.append(fcurve.evaluate(i)) print(fcurve.data_path) - new_kfs = math_funcs.find_best_cubic_hermite_spline_fit(lowest_anim_frame, values, options.angle_limit) + new_kfs = math_funcs.find_best_cubic_hermite_spline_fit(lowest_anim_frame, values, + options.angle_limit, + options.max_concavity_changes) print(new_kfs) # remove all keyframe points and add the new ones @@ -548,6 +550,12 @@ class import_bck(Operator, ExportHelper): min = 0, max = 180, ) + max_concavity_changes = IntProperty( + name = "Max concavity changes", + description = "Number of concavity changes determined in an animation curve that when reached will trigger the generation of a keyframe. For Import Mode \"Keep Rest Pose - Find Best Interpolator\"", + default = 1, + min = 1, + ) euler_mode = EnumProperty( name = "Euler order", description = "Import rotation animations in the specified Euler angles order", -- cgit v1.2.3-70-g09d2