Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/paint_stroke.c
| Show First 20 Lines • Show All 478 Lines • ▼ Show 20 Lines | if (!location_sampled) { | ||||
| } | } | ||||
| } | } | ||||
| return location_success && (is_dry_run == false); | return location_success && (is_dry_run == false); | ||||
| } | } | ||||
| static bool paint_stroke_use_jitter(ePaintMode mode, Brush *brush, bool invert) | static bool paint_stroke_use_jitter(ePaintMode mode, Brush *brush, bool invert) | ||||
| { | { | ||||
| bool use_jitter = (brush->flag & BRUSH_ABSOLUTE_JITTER) ? (brush->jitter_absolute != 0) : | bool use_jitter = (brush->jitter_unit == BRUSH_ABSOLUTE_JITTER) ? (brush->jitter_absolute != 0) : | ||||
| (brush->jitter != 0); | (brush->jitter != 0); | ||||
| /* jitter-ed brush gives weird and unpredictable result for this | /* jitter-ed brush gives weird and unpredictable result for this | ||||
| * kinds of stroke, so manually disable jitter usage (sergey) */ | * kinds of stroke, so manually disable jitter usage (sergey) */ | ||||
| use_jitter &= (brush->flag & (BRUSH_DRAG_DOT | BRUSH_ANCHORED)) == 0; | use_jitter &= (brush->flag & (BRUSH_DRAG_DOT | BRUSH_ANCHORED)) == 0; | ||||
| use_jitter &= (!ELEM(mode, PAINT_MODE_TEXTURE_2D, PAINT_MODE_TEXTURE_3D) || | use_jitter &= (!ELEM(mode, PAINT_MODE_TEXTURE_2D, PAINT_MODE_TEXTURE_3D) || | ||||
| !(invert && brush->imagepaint_tool == PAINT_TOOL_CLONE)); | !(invert && brush->imagepaint_tool == PAINT_TOOL_CLONE)); | ||||
| return use_jitter; | return use_jitter; | ||||
| ▲ Show 20 Lines • Show All 1,074 Lines • Show Last 20 Lines | |||||