Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/gpencil/gpencil_paint.c
| Show First 20 Lines • Show All 1,276 Lines • ▼ Show 20 Lines | static void gpencil_stroke_newfrombuffer(tGPsdata *p) | ||||
| /* post process stroke */ | /* post process stroke */ | ||||
| if ((p->brush->gpencil_settings->flag & GP_BRUSH_GROUP_SETTINGS) && | if ((p->brush->gpencil_settings->flag & GP_BRUSH_GROUP_SETTINGS) && | ||||
| p->brush->gpencil_settings->flag & GP_BRUSH_TRIM_STROKE) { | p->brush->gpencil_settings->flag & GP_BRUSH_TRIM_STROKE) { | ||||
| BKE_gpencil_stroke_trim(gpd, gps); | BKE_gpencil_stroke_trim(gpd, gps); | ||||
| } | } | ||||
| /* Join with existing strokes. */ | /* Join with existing strokes. */ | ||||
| if (ts->gpencil_flags & GP_TOOL_FLAG_AUTOMERGE_STROKE) { | if (ts->gpencil_flags & GP_TOOL_FLAG_AUTOMERGE_STROKE) { | ||||
| if (gps->prev != NULL) { | if ((gps->prev != NULL) || (gps->next != NULL)) { | ||||
| BKE_gpencil_stroke_boundingbox_calc(gps); | BKE_gpencil_stroke_boundingbox_calc(gps); | ||||
| float diff_mat[4][4], ctrl1[2], ctrl2[2]; | float diff_mat[4][4], ctrl1[2], ctrl2[2]; | ||||
| BKE_gpencil_layer_transform_matrix_get(depsgraph, p->ob, gpl, diff_mat); | BKE_gpencil_layer_transform_matrix_get(depsgraph, p->ob, gpl, diff_mat); | ||||
| ED_gpencil_stroke_extremes_to2d(&p->gsc, diff_mat, gps, ctrl1, ctrl2); | ED_gpencil_stroke_extremes_to2d(&p->gsc, diff_mat, gps, ctrl1, ctrl2); | ||||
| int pt_index = 0; | int pt_index = 0; | ||||
| bool doit = true; | bool doit = true; | ||||
| while (doit && gps) { | while (doit && gps) { | ||||
| ▲ Show 20 Lines • Show All 2,675 Lines • Show Last 20 Lines | |||||