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 510 Lines • ▼ Show 20 Lines | return SCULPT_TOOL_HAS_TOPOLOGY_RAKE(brush->sculpt_tool) && | ||||
| (brush->topology_rake_factor > 0.0f) && (ss->bm != NULL); | (brush->topology_rake_factor > 0.0f) && (ss->bm != NULL); | ||||
| } | } | ||||
| /** | /** | ||||
| * Test whether the #StrokeCache.sculpt_normal needs update in #do_brush_action | * Test whether the #StrokeCache.sculpt_normal needs update in #do_brush_action | ||||
| */ | */ | ||||
| static int sculpt_brush_needs_normal(const SculptSession *ss, const Brush *brush) | static int sculpt_brush_needs_normal(const SculptSession *ss, const Brush *brush) | ||||
| { | { | ||||
| return ((SCULPT_TOOL_HAS_NORMAL_WEIGHT(brush->sculpt_tool) && | if (SCULPT_TOOL_HAS_NORMAL_WEIGHT(brush->sculpt_tool) && (ss->cache->normal_weight > 0.0f)) { | ||||
| (ss->cache->normal_weight > 0.0f)) || | if (brush->sculpt_tool == SCULPT_TOOL_GRAB) { | ||||
| return ss->cache->first_time; | |||||
| } | |||||
| return true; | |||||
| } | |||||
| ELEM(brush->sculpt_tool, | return (ELEM(brush->sculpt_tool, | ||||
| SCULPT_TOOL_BLOB, | SCULPT_TOOL_BLOB, | ||||
| SCULPT_TOOL_CREASE, | SCULPT_TOOL_CREASE, | ||||
| SCULPT_TOOL_DRAW, | SCULPT_TOOL_DRAW, | ||||
| SCULPT_TOOL_DRAW_SHARP, | SCULPT_TOOL_DRAW_SHARP, | ||||
| SCULPT_TOOL_LAYER, | SCULPT_TOOL_LAYER, | ||||
| SCULPT_TOOL_NUDGE, | SCULPT_TOOL_NUDGE, | ||||
| SCULPT_TOOL_ROTATE, | SCULPT_TOOL_ROTATE, | ||||
| SCULPT_TOOL_ELASTIC_DEFORM, | SCULPT_TOOL_ELASTIC_DEFORM, | ||||
| SCULPT_TOOL_THUMB) || | SCULPT_TOOL_THUMB) || | ||||
| (brush->mtex.brush_map_mode == MTEX_MAP_MODE_AREA)) || | (brush->mtex.brush_map_mode == MTEX_MAP_MODE_AREA) || | ||||
| sculpt_brush_use_topology_rake(ss, brush); | sculpt_brush_use_topology_rake(ss, brush)); | ||||
| } | } | ||||
| /** \} */ | /** \} */ | ||||
| static bool sculpt_brush_needs_rake_rotation(const Brush *brush) | static bool sculpt_brush_needs_rake_rotation(const Brush *brush) | ||||
| { | { | ||||
| return SCULPT_TOOL_HAS_RAKE(brush->sculpt_tool) && (brush->rake_factor != 0.0f); | return SCULPT_TOOL_HAS_RAKE(brush->sculpt_tool) && (brush->rake_factor != 0.0f); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 9,018 Lines • Show Last 20 Lines | |||||