Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpencil_modifiers/intern/MOD_gpencilarray.c
| Show First 20 Lines • Show All 165 Lines • ▼ Show 20 Lines | static void generate_geometry(GpencilModifierData *md, | ||||
| bool *valid_strokes = MEM_callocN(sizeof(bool) * num_strokes, __func__); | bool *valid_strokes = MEM_callocN(sizeof(bool) * num_strokes, __func__); | ||||
| for (gps = gpf->strokes.first, idx = 0; gps; gps = gps->next, idx++) { | for (gps = gpf->strokes.first, idx = 0; gps; gps = gps->next, idx++) { | ||||
| /* Record whether this stroke can be used | /* Record whether this stroke can be used | ||||
| * ATTENTION: The logic here is the inverse of what's used everywhere else! | * ATTENTION: The logic here is the inverse of what's used everywhere else! | ||||
| */ | */ | ||||
| if (is_stroke_affected_by_modifier(ob, | if (is_stroke_affected_by_modifier(ob, | ||||
| mmd->layername, | mmd->layername, | ||||
| mmd->materialname, | |||||
| mmd->pass_index, | mmd->pass_index, | ||||
| mmd->layer_pass, | mmd->layer_pass, | ||||
| 1, | 1, | ||||
| gpl, | gpl, | ||||
| gps, | gps, | ||||
| mmd->flag & GP_ARRAY_INVERT_LAYER, | mmd->flag & GP_ARRAY_INVERT_LAYER, | ||||
| mmd->flag & GP_ARRAY_INVERT_PASS, | mmd->flag & GP_ARRAY_INVERT_PASS, | ||||
| mmd->flag & GP_ARRAY_INVERT_LAYERPASS)) { | mmd->flag & GP_ARRAY_INVERT_LAYERPASS, | ||||
| mmd->flag & GP_ARRAY_INVERT_MATERIAL)) { | |||||
| valid_strokes[idx] = true; | valid_strokes[idx] = true; | ||||
| num_valid++; | num_valid++; | ||||
| } | } | ||||
| } | } | ||||
| /* Early exit if no strokes can be copied */ | /* Early exit if no strokes can be copied */ | ||||
| if (num_valid == 0) { | if (num_valid == 0) { | ||||
| if (G.debug & G_DEBUG) { | if (G.debug & G_DEBUG) { | ||||
| ▲ Show 20 Lines • Show All 160 Lines • Show Last 20 Lines | |||||