Fix #124297: GPv3: Build modifier natural drawing speed fix #124350
@ -474,7 +474,7 @@ static float get_factor_from_draw_speed(const bke::CurvesGeometry &curves,
|
||||
|
||||
Array<float> start_times(curves.curves_num());
|
||||
start_times[0] = 0;
|
||||
filedescriptor marked this conversation as resolved
Outdated
|
||||
float accumulated_shift_delta_time = 0.0f;
|
||||
float accumulated_shift_delta_time = init_times[0];
|
||||
for (const int curve : curves.curves_range().drop_front(1)) {
|
||||
const float previous_start_time = start_times[curve - 1];
|
||||
const float previous_delta_time = delta_times[points_by_curve[curve - 1].last()];
|
||||
|
Loading…
Reference in New Issue
Block a user
I think it's better if we pre-compute the start times (accounting for the maximum gap) for each curve first, and then go over the points.
The second loop then becomes much simpler. We can even return from there directly:
Thanks for the suggestion. Let me see if I could make this work :D
start_times[0]
needs to be 0 obviously and otherwise it seems to be working fine taking into account of gap limit. Thanks!Hm if
start_times[0] = 0
then you need to setfloat accumulated_shift_delta_time = init_times[0];
so that all the strokes after are also shifted relative to the first stroke start time.Ah yes, this way the first stroke won't have a gap time