Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/gpencil/gpencil_primitive.c
| Show First 20 Lines • Show All 1,128 Lines • ▼ Show 20 Lines | static void gpencil_primitive_init(bContext *C, wmOperator *op) | ||||
| /* set GP datablock */ | /* set GP datablock */ | ||||
| tgpi->gpd = gpd; | tgpi->gpd = gpd; | ||||
| /* region where paint was originated */ | /* region where paint was originated */ | ||||
| tgpi->gpd->runtime.ar = tgpi->ar; | tgpi->gpd->runtime.ar = tgpi->ar; | ||||
| /* if brush doesn't exist, create a new set (fix damaged files from old versions) */ | /* if brush doesn't exist, create a new set (fix damaged files from old versions) */ | ||||
| if ((paint->brush == NULL) || (paint->brush->gpencil_settings == NULL)) { | if ((paint->brush == NULL) || (paint->brush->gpencil_settings == NULL)) { | ||||
| BKE_brush_gpencil_presets(C); | BKE_brush_gpencil_presets(bmain, ts); | ||||
| } | } | ||||
| /* Set Draw brush. */ | /* Set Draw brush. */ | ||||
| Brush *brush = BKE_paint_toolslots_brush_get(paint, 0); | Brush *brush = BKE_paint_toolslots_brush_get(paint, 0); | ||||
| BKE_brush_tool_set(brush, paint, 0); | BKE_brush_tool_set(brush, paint, 0); | ||||
| BKE_paint_brush_set(paint, brush); | BKE_paint_brush_set(paint, brush); | ||||
| tgpi->brush = brush; | tgpi->brush = brush; | ||||
| ▲ Show 20 Lines • Show All 692 Lines • Show Last 20 Lines | |||||