Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/gpencil/gpencil_paint.c
| Show First 20 Lines • Show All 990 Lines • ▼ Show 20 Lines | static void gpencil_stroke_newfrombuffer(tGPsdata *p) | ||||
| gps->thickness = brush->size; | gps->thickness = brush->size; | ||||
| gps->fill_opacity_fac = 1.0f; | gps->fill_opacity_fac = 1.0f; | ||||
| gps->hardeness = brush->gpencil_settings->hardeness; | gps->hardeness = brush->gpencil_settings->hardeness; | ||||
| copy_v2_v2(gps->aspect_ratio, brush->gpencil_settings->aspect_ratio); | copy_v2_v2(gps->aspect_ratio, brush->gpencil_settings->aspect_ratio); | ||||
| gps->flag = gpd->runtime.sbuffer_sflag; | gps->flag = gpd->runtime.sbuffer_sflag; | ||||
| gps->inittime = p->inittime; | gps->inittime = p->inittime; | ||||
| gps->uv_scale = 1.0f; | gps->uv_scale = 1.0f; | ||||
| /* Set stroke caps. */ | |||||
| gps->caps[0] = gps->caps[1] = brush->gpencil_settings->caps_type; | |||||
| /* allocate enough memory for a continuous array for storage points */ | /* allocate enough memory for a continuous array for storage points */ | ||||
| const int subdivide = brush->gpencil_settings->draw_subdivide; | const int subdivide = brush->gpencil_settings->draw_subdivide; | ||||
| gps->points = MEM_callocN(sizeof(bGPDspoint) * gps->totpoints, "gp_stroke_points"); | gps->points = MEM_callocN(sizeof(bGPDspoint) * gps->totpoints, "gp_stroke_points"); | ||||
| gps->dvert = NULL; | gps->dvert = NULL; | ||||
| /* drawing batch cache is dirty now */ | /* drawing batch cache is dirty now */ | ||||
| gpencil_update_cache(p->gpd); | gpencil_update_cache(p->gpd); | ||||
| ▲ Show 20 Lines • Show All 3,028 Lines • Show Last 20 Lines | |||||