Fix #132548: keyframe_points.insert() misinterprets arguments

Symptoms were broken `keyframe_type` & `options` (e.g. falsely assuming
'NEEDED' option when this was not provided at all).

The parameter order was flipped (leading to false interpretations for
the enum (flag) values).

For historic reference: the `keyframe_type` was introduced in
570fbba3f3 (but in a way that would have broken the existing API),
that was tried to be corrected in 46aaa53998 (but that commit only
flipped the order in the parameter definitions, not in the actual
function `rna_FKeyframe_points_insert`).

So to resolve, correct the order in the function declaration.

Pull Request: https://projects.blender.org/blender/blender/pulls/132595
This commit is contained in:
Philipp Oeser
2025-01-03 17:42:07 +01:00
committed by Philipp Oeser
parent 8fa61bfdef
commit b79af08ade

View File

@@ -1078,7 +1078,7 @@ static void rna_FModifierStepped_frame_end_set(PointerRNA *ptr, float value)
}
static BezTriple *rna_FKeyframe_points_insert(
ID *id, FCurve *fcu, Main *bmain, float frame, float value, int keyframe_type, int flag)
ID *id, FCurve *fcu, Main *bmain, float frame, float value, int flag, int keyframe_type)
{
using namespace blender::animrig;
KeyframeSettings settings = get_keyframe_settings(false);