Page MenuHome
Paste P2704

(An Untitled Masterwork)
ActivePublic

Authored by Sybren A. Stüvel (sybren) on Jan 7 2022, 4:50 PM.
diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c
index 06b1fb1e57f..d01f9de0d38 100644
--- a/source/blender/editors/animation/keyframes_edit.c
+++ b/source/blender/editors/animation/keyframes_edit.c
@@ -1283,11 +1283,8 @@ static short set_bezt_sine(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
return 0;
}
-void equalize_handle(const float *vec,
- int idx,
- const float direction,
- const float handle_length,
- const bool flatten)
+static void equalize_handle(
+ float vec[3][3], int idx, float direction[2], const float handle_length, const bool flatten)
{
/* Get x & y of keyframe control point. */
const float *cp = vec[1];
@@ -1295,7 +1292,7 @@ void equalize_handle(const float *vec,
/* If retaining handles' angles, store them. */
if (!flatten) {
sub_v2_v2v2(direction, vec[idx], vec[1]);
- normalize_v2_length(direction *, handle_length);
+ normalize_v2_length(direction, handle_length);
}
add_v2_v2v2(vec[idx], cp, direction);
}
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c
index 1c19c0ae8ba..181fdb3f6d2 100644
--- a/source/blender/editors/space_graph/graph_edit.c
+++ b/source/blender/editors/space_graph/graph_edit.c
@@ -2370,7 +2370,6 @@ static const EnumPropertyItem prop_graphkeys_equalize_handles_sides[] = {
static void equalize_graph_keys(bAnimContext *ac, int mode, float handle_length, bool flatten)
{
ListBase anim_data = {NULL, NULL};
- bAnimListElem *ale;
int filter;
KeyframeEditData ked;
@@ -2385,7 +2384,7 @@ static void equalize_graph_keys(bAnimContext *ac, int mode, float handle_length,
ked.scene = ac->scene;
/* Equalize keyframes. */
- LISTBASE_FOREACH (bAnimListElem *, ale, anim_data) {
+ LISTBASE_FOREACH (bAnimListElem *, ale, &anim_data) {
ANIM_fcurve_equalize_keyframes_loop(&ked, ale->key_data, mode, handle_length, flatten);
ale->update |= ANIM_UPDATE_DEFAULT;
}