Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/sculpt.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
| Show First 20 Lines • Show All 5,272 Lines • ▼ Show 20 Lines | SculptSearchSphereData data = { | ||||
| .radius_squared = final_radius * final_radius, | .radius_squared = final_radius * final_radius, | ||||
| .original = true, | .original = true, | ||||
| }; | }; | ||||
| BKE_pbvh_search_gather(ss->pbvh, sculpt_search_sphere_cb, &data, &nodes, &totnode); | BKE_pbvh_search_gather(ss->pbvh, sculpt_search_sphere_cb, &data, &nodes, &totnode); | ||||
| } | } | ||||
| else { | else { | ||||
| const bool use_original = sculpt_tool_needs_original(brush->sculpt_tool) ? true : | const bool use_original = sculpt_tool_needs_original(brush->sculpt_tool) ? true : | ||||
| ss->cache->original; | ss->cache->original; | ||||
| const float radius_scale = 1.0f; | float radius_scale = 1.0f; | ||||
| /* With these options enabled not all required nodes are inside the original brush radius, so | |||||
| * the brush can produce artifacts in some situations */ | |||||
| if (brush->sculpt_tool == SCULPT_TOOL_DRAW && brush->flag & BRUSH_ORIGINAL_NORMAL) { | |||||
| radius_scale = 2.0f; | |||||
| } | |||||
| nodes = sculpt_pbvh_gather_generic(ob, sd, brush, use_original, radius_scale, &totnode); | nodes = sculpt_pbvh_gather_generic(ob, sd, brush, use_original, radius_scale, &totnode); | ||||
| } | } | ||||
| /* Only act if some verts are inside the brush area */ | /* Only act if some verts are inside the brush area */ | ||||
| if (totnode) { | if (totnode) { | ||||
| float location[3]; | float location[3]; | ||||
| SculptThreadedTaskData task_data = { | SculptThreadedTaskData task_data = { | ||||
| ▲ Show 20 Lines • Show All 4,470 Lines • Show Last 20 Lines | |||||