Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpencil_modifiers/intern/MOD_gpencilbuild.c
| Show First 20 Lines • Show All 283 Lines • ▼ Show 20 Lines | static void build_sequential(Object *ob, | ||||
| /* 1) Determine which strokes to start with (& adapt total number of strokes to build). */ | /* 1) Determine which strokes to start with (& adapt total number of strokes to build). */ | ||||
| if (mmd->mode == GP_BUILD_MODE_ADDITIVE) { | if (mmd->mode == GP_BUILD_MODE_ADDITIVE) { | ||||
| if (gpf->prev) { | if (gpf->prev) { | ||||
| start_stroke = BLI_listbase_count(&gpf->runtime.gpf_orig->prev->strokes); | start_stroke = BLI_listbase_count(&gpf->runtime.gpf_orig->prev->strokes); | ||||
| } | } | ||||
| if (start_stroke <= tot_strokes) { | if (start_stroke <= tot_strokes) { | ||||
| tot_strokes = tot_strokes - start_stroke; | tot_strokes = tot_strokes - start_stroke; | ||||
| } | } | ||||
| else { | |||||
| start_stroke = 0; | |||||
| } | |||||
| } | } | ||||
| /* 2) Compute proportion of time each stroke should occupy. */ | /* 2) Compute proportion of time each stroke should occupy. */ | ||||
| /* NOTE: This assumes that the total number of points won't overflow! */ | /* NOTE: This assumes that the total number of points won't overflow! */ | ||||
| tStrokeBuildDetails *table = MEM_callocN(sizeof(tStrokeBuildDetails) * tot_strokes, __func__); | tStrokeBuildDetails *table = MEM_callocN(sizeof(tStrokeBuildDetails) * tot_strokes, __func__); | ||||
| /* Pointer to cache table of times for each point. */ | /* Pointer to cache table of times for each point. */ | ||||
| float *idx_times; | float *idx_times; | ||||
| /* Running overall time sum incrementing per point. */ | /* Running overall time sum incrementing per point. */ | ||||
| ▲ Show 20 Lines • Show All 760 Lines • Show Last 20 Lines | |||||