Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/paint_cursor.c
| Show First 20 Lines • Show All 550 Lines • ▼ Show 20 Lines | static bool paint_draw_tex_overlay(UnifiedPaintSettings *ups, | ||||
| rctf quad; | rctf quad; | ||||
| /* 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 (primary && brush->imagepaint_tool == PAINT_TOOL_CLONE) { | |||||
| /* Clone Tool uses other texture. */ | |||||
| 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)))) { | ||||
| return false; | return false; | ||||
| } | } | ||||
| if (load_tex(brush, vc, zoom, col, primary)) { | if (load_tex(brush, vc, zoom, col, primary)) { | ||||
| GPU_color_mask(true, true, true, true); | GPU_color_mask(true, true, true, true); | ||||
| ▲ Show 20 Lines • Show All 1,364 Lines • Show Last 20 Lines | |||||