35 if (mat->texpaintslot ==
nullptr) {
38 if (mat->paint_active_slot >= mat->tot_slots) {
42 TexPaintSlot *slot = &mat->texpaintslot[mat->paint_active_slot];
53 return ELEM(idname,
"builtin.color_filter");
60 if (
brush ==
nullptr) {
73 return ELEM(idname,
"builtin_brush.Mask");
83 if (tref ==
nullptr) {
102 if (tref ==
nullptr) {
113 if (tref ==
nullptr) {
116 if (tref ==
nullptr) {
129 return orig_color_type;
139 return orig_color_type;
152 if (slot ==
nullptr) {
General operations, lookup, etc. for materials.
#define USER_EXPERIMENTAL_TEST(userdef, member)
static TexPaintSlot * get_active_slot(Object *ob)
static TexPaintSlot * get_active_slot(Object &ob)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
Material * BKE_object_material_get(Object *ob, short act)
void ED_paint_brush_type_update_sticky_shading_color(bContext *C, Object *ob)
static bool paint_brush_type_shading_color_follows_last_used_tool(bContext *C, Object *ob)
bool ED_paint_brush_type_use_canvas(bContext *C, bToolRef *tref)
@ SCULPT_BRUSH_TYPE_SMEAR
@ SCULPT_BRUSH_TYPE_PAINT
static bool paint_brush_type_shading_color_follows_last_used(StringRef idname)
static bool paint_brush_uses_canvas(bContext *C)
eV3DShadingColorType ED_paint_shading_color_override(bContext *C, const PaintModeSettings *settings, Object &ob, eV3DShadingColorType orig_color_type)
@ V3D_SHADING_VERTEX_COLOR
@ V3D_SHADING_TEXTURE_COLOR
const Brush * BKE_paint_brush_for_read(const Paint *paint)
bToolRef * WM_toolsystem_ref_from_context(const bContext *C)
Paint * BKE_paint_get_active_from_context(const bContext *C)
@ PAINT_CANVAS_SOURCE_IMAGE
@ PAINT_CANVAS_SOURCE_MATERIAL
@ PAINT_CANVAS_SOURCE_COLOR_ATTRIBUTE
static bool paint_tool_uses_canvas(StringRef idname)
bke::ObjectRuntime * runtime
ePaintCanvasSource canvas_source
bool sticky_shading_color
SculptSession * sculpt_session