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_export.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'bck_export.py') diff --git a/bck_export.py b/bck_export.py index 06a8658..4ed7d4e 100644 --- a/bck_export.py +++ b/bck_export.py @@ -84,7 +84,7 @@ def export_bck_func(options, context): # rotation (Euler [all its combinations], Quaternions, Axis angle) elif (fcurve.data_path == bone_data_path_str + bone_rot_mode_str): # check if it is Euler in the euler order selected, if not, select the curves for later conversion - if (bone_rot_mode_str == "rotation_euler" and bone_rot_euler_order_str == options.euler_mode): + if (bone_rot_mode_str == "rotation_euler" and pose_bone.rotation_mode == options.euler_mode): bone_fcurves[int((3 * fcurve.array_index) + 1)] = fcurve else: foreign_fcurves[fcurve.array_index] = fcurve @@ -280,7 +280,8 @@ def export_bck_func(options, context): # get the best fit interpolation result interp_result = math_funcs.find_best_cubic_hermite_spline_fit(options.first_frame, bck_anim.anim_data[i].comp[j].value, - options.angle_limit) + options.angle_limit, + options.max_concavity_changes) # set the rounding digit rounding = options.rounding_vec[0] # scale if (j == 1 or j == 4 or j == 7): # rotation @@ -371,6 +372,12 @@ class export_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 export option \"Find Best Interpolator\"", + default = 1, + min = 1, + ) first_frame = IntProperty( name = "First frame", description = "Value used to specify the first frame of the animation", -- cgit v1.2.3-70-g09d2