Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/intern/draw_cache_impl_gpencil.c
| Show First 20 Lines • Show All 546 Lines • ▼ Show 20 Lines | if (gpd->runtime.sbuffer_gps == NULL) { | ||||
| /* Reduce slightly the opacity of fill to make easy fill areas while drawing. */ | /* Reduce slightly the opacity of fill to make easy fill areas while drawing. */ | ||||
| gps->fill_opacity_fac = 0.8f; | gps->fill_opacity_fac = 0.8f; | ||||
| gps->tot_triangles = max_ii(0, gpd->runtime.sbuffer_used - 2); | gps->tot_triangles = max_ii(0, gpd->runtime.sbuffer_used - 2); | ||||
| gps->caps[0] = gps->caps[1] = GP_STROKE_CAP_ROUND; | gps->caps[0] = gps->caps[1] = GP_STROKE_CAP_ROUND; | ||||
| gps->runtime.stroke_start = 1; /* Add one for the adjacency index. */ | gps->runtime.stroke_start = 1; /* Add one for the adjacency index. */ | ||||
| copy_v4_v4(gps->vert_color_fill, gpd->runtime.vert_color_fill); | copy_v4_v4(gps->vert_color_fill, gpd->runtime.vert_color_fill); | ||||
| /* Caps. */ | |||||
| gps->caps[0] = gps->caps[1] = brush->gpencil_settings->caps_type; | |||||
| gpd->runtime.sbuffer_gps = gps; | gpd->runtime.sbuffer_gps = gps; | ||||
| } | } | ||||
| return gpd->runtime.sbuffer_gps; | return gpd->runtime.sbuffer_gps; | ||||
| } | } | ||||
| static void gpencil_sbuffer_stroke_ensure(bGPdata *gpd, bool do_stroke, bool do_fill) | static void gpencil_sbuffer_stroke_ensure(bGPdata *gpd, bool do_stroke, bool do_fill) | ||||
| { | { | ||||
| tGPspoint *tpoints = gpd->runtime.sbuffer; | tGPspoint *tpoints = gpd->runtime.sbuffer; | ||||
| ▲ Show 20 Lines • Show All 389 Lines • Show Last 20 Lines | |||||