Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/sculpt.c
| Show First 20 Lines • Show All 1,930 Lines • ▼ Show 20 Lines | static void calc_area_normal_and_center_task_cb(void *__restrict userdata, | ||||
| const bool use_area_cos = data->use_area_cos; | const bool use_area_cos = data->use_area_cos; | ||||
| PBVHVertexIter vd; | PBVHVertexIter vd; | ||||
| SculptUndoNode *unode = NULL; | SculptUndoNode *unode = NULL; | ||||
| bool use_original = false; | bool use_original = false; | ||||
| bool normal_test_r, area_test_r; | bool normal_test_r, area_test_r; | ||||
| if (!data->brush) { | |||||
| return; | |||||
| } | |||||
| if (ss->cache && ss->cache->original) { | if (ss->cache && ss->cache->original) { | ||||
| unode = SCULPT_undo_push_node(data->ob, data->nodes[n], SCULPT_UNDO_COORDS); | unode = SCULPT_undo_push_node(data->ob, data->nodes[n], SCULPT_UNDO_COORDS); | ||||
| use_original = (unode->co || unode->bm_entry); | use_original = (unode->co || unode->bm_entry); | ||||
| } | } | ||||
| SculptBrushTest normal_test; | SculptBrushTest normal_test; | ||||
| SculptBrushTestFn sculpt_brush_normal_test_sq_fn = SCULPT_brush_test_init_with_falloff_shape( | SculptBrushTestFn sculpt_brush_normal_test_sq_fn = SCULPT_brush_test_init_with_falloff_shape( | ||||
| ss, &normal_test, data->brush->falloff_shape); | ss, &normal_test, data->brush->falloff_shape); | ||||
| ▲ Show 20 Lines • Show All 2,842 Lines • ▼ Show 20 Lines | |||||
| /* Returns true if any of the smoothing modes are active (currently | /* Returns true if any of the smoothing modes are active (currently | ||||
| * one of smooth brush, autosmooth, mask smooth, or shift-key | * one of smooth brush, autosmooth, mask smooth, or shift-key | ||||
| * smooth). */ | * smooth). */ | ||||
| static bool sculpt_needs_connectivity_info(const Sculpt *sd, | static bool sculpt_needs_connectivity_info(const Sculpt *sd, | ||||
| const Brush *brush, | const Brush *brush, | ||||
| SculptSession *ss, | SculptSession *ss, | ||||
| int stroke_mode) | int stroke_mode) | ||||
| { | { | ||||
| if (!brush) { | |||||
| return false; | |||||
| } | |||||
| if (ss && ss->pbvh && SCULPT_is_automasking_enabled(sd, ss, brush)) { | if (ss && ss->pbvh && SCULPT_is_automasking_enabled(sd, ss, brush)) { | ||||
| return true; | return true; | ||||
| } | } | ||||
| return ((stroke_mode == BRUSH_STROKE_SMOOTH) || (ss && ss->cache && ss->cache->alt_smooth) || | return ((stroke_mode == BRUSH_STROKE_SMOOTH) || (ss && ss->cache && ss->cache->alt_smooth) || | ||||
| (brush->sculpt_tool == SCULPT_TOOL_SMOOTH) || (brush->autosmooth_factor > 0) || | (brush->sculpt_tool == SCULPT_TOOL_SMOOTH) || (brush->autosmooth_factor > 0) || | ||||
| ((brush->sculpt_tool == SCULPT_TOOL_MASK) && (brush->mask_tool == BRUSH_MASK_SMOOTH)) || | ((brush->sculpt_tool == SCULPT_TOOL_MASK) && (brush->mask_tool == BRUSH_MASK_SMOOTH)) || | ||||
| (brush->sculpt_tool == SCULPT_TOOL_POSE) || | (brush->sculpt_tool == SCULPT_TOOL_POSE) || | ||||
| (brush->sculpt_tool == SCULPT_TOOL_BOUNDARY) || | (brush->sculpt_tool == SCULPT_TOOL_BOUNDARY) || | ||||
| ▲ Show 20 Lines • Show All 1,391 Lines • Show Last 20 Lines | |||||