Animation: blend offset slider #106518
@ -497,7 +497,7 @@ void blend_offset_fcurve_segment(FCurve *fcu, FCurveSegment *segment, const floa
|
||||
|
||||
for (int i = segment->start_index; i < segment->start_index + segment->length; i++) {
|
||||
const float key_y_value = fcu->bezt[i].vec[1][1] + y_delta * fabs(factor);
|
||||
|
||||
move_key(&fcu->bezt[i], key_y_value);
|
||||
BKE_fcurve_keyframe_move_value_with_handles(&fcu->bezt[i], key_y_value);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1041,7 +1041,7 @@ static int blend_offset_invoke(bContext *C, wmOperator *op, const wmEvent *event
|
||||
gso->modal_update = blend_offset_modal_update;
|
||||
gso->factor_prop = RNA_struct_find_property(op->ptr, "factor");
|
||||
blend_offset_draw_status_header(C, gso);
|
||||
ED_slider_is_bidirectional_set(gso->slider, true);
|
||||
ED_slider_factor_bounds_set(gso->slider, -1, 1);
|
||||
ED_slider_factor_set(gso->slider, 0.0f);
|
||||
|
||||
return invoke_result;
|
||||
|
Loading…
Reference in New Issue
Block a user
this can be simplified to
fcu->bezt[segment->start_index]
same for getting the segment end
Since ``y_delta * fabs(factor)` doesnt' change over the course of this loop, take it out of the loop: