Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpencil_modifiers/intern/MOD_gpencilbuild.c
| Show First 20 Lines • Show All 364 Lines • ▼ Show 20 Lines | for (i = 0; i < tot_strokes; i++) { | ||||
| for (int j = 0; j < cell->totpoints; j++) { | for (int j = 0; j < cell->totpoints; j++) { | ||||
| /* Defining time for first point in stroke. */ | /* Defining time for first point in stroke. */ | ||||
| if (j == 0) { | if (j == 0) { | ||||
| idx_times[curpoint] = sumtime; | idx_times[curpoint] = sumtime; | ||||
| last_pointtime = cell->gps->points[0].time; | last_pointtime = cell->gps->points[0].time; | ||||
| } | } | ||||
| /* Entering subsequent points */ | /* Entering subsequent points */ | ||||
| else { | else { | ||||
| if (cell->gps->points[j].time == 0) { | if (cell->gps->points[j].time <= 0) { | ||||
| idx_times[curpoint] = sumtime; | idx_times[curpoint] = sumtime; | ||||
| zeropoints++; | zeropoints++; | ||||
| } | } | ||||
| /* From here current point has time data */ | /* From here current point has time data */ | ||||
| else { | else { | ||||
| float deltatime = fabs(cell->gps->points[j].time - last_pointtime); | float deltatime = fabs(cell->gps->points[j].time - last_pointtime); | ||||
| /* Do we need to sanitize previous points? */ | /* Do we need to sanitize previous points? */ | ||||
| if (0 < zeropoints) { | if (0 < zeropoints) { | ||||
| ▲ Show 20 Lines • Show All 681 Lines • Show Last 20 Lines | |||||