Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/gpencil/annotate_paint.c
| Show First 20 Lines • Show All 1,246 Lines • ▼ Show 20 Lines | if (gpencil_layer_is_editable(p->gpl)) { | ||||
| if (p->gpl->actframe && p->gpl->actframe->strokes.first) { | if (p->gpl->actframe && p->gpl->actframe->strokes.first) { | ||||
| has_layer_to_erase = true; | has_layer_to_erase = true; | ||||
| } | } | ||||
| } | } | ||||
| /* Ensure active frame is set correctly... */ | /* Ensure active frame is set correctly... */ | ||||
| p->gpf = p->gpl->actframe; | p->gpf = p->gpl->actframe; | ||||
| /* Restrict eraser to only affecting selected strokes, if the "selection mask" is on | |||||
| * (though this is only available in editmode) | |||||
| */ | |||||
| if (p->gpd->flag & GP_DATA_STROKE_EDITMODE) { | |||||
| if (ts->gp_sculpt.flag & GP_SCULPT_SETT_FLAG_SELECT_MASK) { | |||||
| p->flags |= GP_PAINTFLAG_SELECTMASK; | |||||
| } | |||||
| } | |||||
| if (has_layer_to_erase == false) { | if (has_layer_to_erase == false) { | ||||
| p->status = GP_STATUS_CAPTURE; | p->status = GP_STATUS_CAPTURE; | ||||
| // if (G.debug & G_DEBUG) | // if (G.debug & G_DEBUG) | ||||
| printf("Error: Eraser will not be affecting anything (gpencil_paint_init)\n"); | printf("Error: Eraser will not be affecting anything (gpencil_paint_init)\n"); | ||||
| return; | return; | ||||
| } | } | ||||
| } | } | ||||
| else { | else { | ||||
| ▲ Show 20 Lines • Show All 1,177 Lines • Show Last 20 Lines | |||||