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 7,024 Lines • ▼ Show 20 Lines | static void sculpt_update_cache_variants(bContext *C, Sculpt *sd, Object *ob, PointerRNA *ptr) | ||||
| Scene *scene = CTX_data_scene(C); | Scene *scene = CTX_data_scene(C); | ||||
| UnifiedPaintSettings *ups = &scene->toolsettings->unified_paint_settings; | UnifiedPaintSettings *ups = &scene->toolsettings->unified_paint_settings; | ||||
| SculptSession *ss = ob->sculpt; | SculptSession *ss = ob->sculpt; | ||||
| StrokeCache *cache = ss->cache; | StrokeCache *cache = ss->cache; | ||||
| Brush *brush = BKE_paint_brush(&sd->paint); | Brush *brush = BKE_paint_brush(&sd->paint); | ||||
| if (cache->first_time || | if (cache->first_time || | ||||
| !((brush->flag & BRUSH_ANCHORED) || (brush->sculpt_tool == SCULPT_TOOL_SNAKE_HOOK) || | !((brush->flag & BRUSH_ANCHORED) || (brush->sculpt_tool == SCULPT_TOOL_SNAKE_HOOK) || | ||||
| (brush->sculpt_tool == SCULPT_TOOL_ROTATE))) { | (brush->sculpt_tool == SCULPT_TOOL_ROTATE) || | ||||
| (brush->sculpt_tool == SCULPT_TOOL_CLOTH && | |||||
| brush->cloth_deform_type == BRUSH_CLOTH_DEFORM_GRAB))) { | |||||
| RNA_float_get_array(ptr, "location", cache->true_location); | RNA_float_get_array(ptr, "location", cache->true_location); | ||||
| } | } | ||||
| cache->pen_flip = RNA_boolean_get(ptr, "pen_flip"); | cache->pen_flip = RNA_boolean_get(ptr, "pen_flip"); | ||||
| RNA_float_get_array(ptr, "mouse", cache->mouse); | RNA_float_get_array(ptr, "mouse", cache->mouse); | ||||
| /* XXX: Use pressure value from first brush step for brushes which don't support strokes (grab, | /* XXX: Use pressure value from first brush step for brushes which don't support strokes (grab, | ||||
| * thumb). They depends on initial state and brush coord/pressure/etc. | * thumb). They depends on initial state and brush coord/pressure/etc. | ||||
| ▲ Show 20 Lines • Show All 4,102 Lines • Show Last 20 Lines | |||||