Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/paint_image.c
| Show First 20 Lines • Show All 1,295 Lines • ▼ Show 20 Lines | if (image_paint_poll(C)) { | ||||
| Brush *br = image_paint_brush(C); | Brush *br = image_paint_brush(C); | ||||
| if (ELEM(br->imagepaint_tool, PAINT_TOOL_DRAW, PAINT_TOOL_FILL)) { | if (ELEM(br->imagepaint_tool, PAINT_TOOL_DRAW, PAINT_TOOL_FILL)) { | ||||
| return true; | return true; | ||||
| } | } | ||||
| } | } | ||||
| else { | else { | ||||
| Object *ob = CTX_data_active_object(C); | Object *ob = CTX_data_active_object(C); | ||||
| if (ob != NULL) { | if (ob != NULL) { | ||||
| if (ob->mode & (OB_MODE_VERTEX_PAINT | OB_MODE_TEXTURE_PAINT)) { | if (ob->mode & (OB_MODE_VERTEX_PAINT | OB_MODE_TEXTURE_PAINT | OB_MODE_SCULPT)) { | ||||
| return true; | return true; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| return false; | return false; | ||||
| } | } | ||||
| void PAINT_OT_brush_colors_flip(wmOperatorType *ot) | void PAINT_OT_brush_colors_flip(wmOperatorType *ot) | ||||
| ▲ Show 20 Lines • Show All 65 Lines • Show Last 20 Lines | |||||