Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/paint_cursor.c
| Show First 20 Lines • Show All 552 Lines • ▼ Show 20 Lines | static bool paint_draw_tex_overlay(UnifiedPaintSettings *ups, | ||||
| /* Check for overlay mode. */ | /* Check for overlay mode. */ | ||||
| MTex *mtex = (primary) ? &brush->mtex : &brush->mask_mtex; | MTex *mtex = (primary) ? &brush->mtex : &brush->mask_mtex; | ||||
| bool valid = ((primary) ? (brush->overlay_flags & BRUSH_OVERLAY_PRIMARY) != 0 : | bool valid = ((primary) ? (brush->overlay_flags & BRUSH_OVERLAY_PRIMARY) != 0 : | ||||
| (brush->overlay_flags & BRUSH_OVERLAY_SECONDARY) != 0); | (brush->overlay_flags & BRUSH_OVERLAY_SECONDARY) != 0); | ||||
| int overlay_alpha = (primary) ? brush->texture_overlay_alpha : brush->mask_overlay_alpha; | int overlay_alpha = (primary) ? brush->texture_overlay_alpha : brush->mask_overlay_alpha; | ||||
| if (mode == PAINT_MODE_TEXTURE_3D) { | if (mode == PAINT_MODE_TEXTURE_3D) { | ||||
| if (primary && brush->imagepaint_tool == PAINT_TOOL_DRAW) { | if (primary && brush->imagepaint_tool != PAINT_TOOL_DRAW) { | ||||
| /* All non-draw tools don't use the primary texture (clone, smear, soften.. etc). */ | /* All non-draw tools don't use the primary texture (clone, smear, soften.. etc). */ | ||||
| return false; | return false; | ||||
| } | } | ||||
| } | } | ||||
| if (!(mtex->tex) || | if (!(mtex->tex) || | ||||
| !((mtex->brush_map_mode == MTEX_MAP_MODE_STENCIL) || | !((mtex->brush_map_mode == MTEX_MAP_MODE_STENCIL) || | ||||
| (valid && ELEM(mtex->brush_map_mode, MTEX_MAP_MODE_VIEW, MTEX_MAP_MODE_TILED)))) { | (valid && ELEM(mtex->brush_map_mode, MTEX_MAP_MODE_VIEW, MTEX_MAP_MODE_TILED)))) { | ||||
| ▲ Show 20 Lines • Show All 1,380 Lines • Show Last 20 Lines | |||||