Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/gpencil/gpencil_merge.c
| Show First 20 Lines • Show All 443 Lines • ▼ Show 20 Lines | static bool gp_strokes_merge_poll(bContext *C) | ||||
| /* only supported with grease pencil objects */ | /* only supported with grease pencil objects */ | ||||
| Object *ob = CTX_data_active_object(C); | Object *ob = CTX_data_active_object(C); | ||||
| if ((ob == NULL) || (ob->type != OB_GPENCIL)) { | if ((ob == NULL) || (ob->type != OB_GPENCIL)) { | ||||
| return false; | return false; | ||||
| } | } | ||||
| /* check material */ | /* check material */ | ||||
| Material *ma = NULL; | Material *ma = NULL; | ||||
| ma = give_current_material(ob, ob->actcol); | ma = BKE_material_gpencil_get(ob, ob->actcol); | ||||
| if ((ma == NULL) || (ma->gp_style == NULL)) { | if ((ma == NULL) || (ma->gp_style == NULL)) { | ||||
| return false; | return false; | ||||
| } | } | ||||
| /* check hidden or locked materials */ | /* check hidden or locked materials */ | ||||
| MaterialGPencilStyle *gp_style = ma->gp_style; | MaterialGPencilStyle *gp_style = ma->gp_style; | ||||
| if ((gp_style->flag & GP_STYLE_COLOR_HIDE) || (gp_style->flag & GP_STYLE_COLOR_LOCKED)) { | if ((gp_style->flag & GP_STYLE_COLOR_HIDE) || (gp_style->flag & GP_STYLE_COLOR_LOCKED)) { | ||||
| return false; | return false; | ||||
| ▲ Show 20 Lines • Show All 109 Lines • Show Last 20 Lines | |||||