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 1,991 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| static void update_sculpt_normal(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) | static void update_sculpt_normal(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) | ||||
| { | { | ||||
| const Brush *brush = BKE_paint_brush(&sd->paint); | const Brush *brush = BKE_paint_brush(&sd->paint); | ||||
| StrokeCache *cache = ob->sculpt->cache; | StrokeCache *cache = ob->sculpt->cache; | ||||
| if (cache->mirror_symmetry_pass == 0 && cache->radial_symmetry_pass == 0 && | if (cache->mirror_symmetry_pass == 0 && cache->radial_symmetry_pass == 0 && | ||||
| (cache->first_time || !(brush->flag & BRUSH_ORIGINAL_NORMAL))) { | (cache->first_time || !(brush->flag & BRUSH_ORIGINAL_NORMAL)) && | ||||
| (cache->first_time || !(brush->sculpt_tool & SCULPT_TOOL_GRAB))) { | |||||
| calc_sculpt_normal(sd, ob, nodes, totnode, cache->sculpt_normal); | calc_sculpt_normal(sd, ob, nodes, totnode, cache->sculpt_normal); | ||||
| if (brush->falloff_shape == PAINT_FALLOFF_SHAPE_TUBE) { | if (brush->falloff_shape == PAINT_FALLOFF_SHAPE_TUBE) { | ||||
| project_plane_v3_v3v3(cache->sculpt_normal, cache->sculpt_normal, cache->view_normal); | project_plane_v3_v3v3(cache->sculpt_normal, cache->sculpt_normal, cache->view_normal); | ||||
| normalize_v3(cache->sculpt_normal); | normalize_v3(cache->sculpt_normal); | ||||
| } | } | ||||
| copy_v3_v3(cache->sculpt_normal_symm, cache->sculpt_normal); | copy_v3_v3(cache->sculpt_normal_symm, cache->sculpt_normal); | ||||
| } | } | ||||
| else { | else { | ||||
| ▲ Show 20 Lines • Show All 7,663 Lines • Show Last 20 Lines | |||||