Fix T81932: Dyntopo crashing with sculpt vertex colors brush tools

Paint and smear tools are only implemented for regular mesh PBVH,
meaning they are not supported by the dynamic topology and multires
sculpting.

These tools are to be ignored for an unsupported sculpt modes, regardless
of state of user preferences.

Reviewed By: sergey

Maniphest Tasks: T81932

Differential Revision: https://developer.blender.org/D9308
This commit is contained in:
Pablo Dobarro 2020-10-21 22:53:50 +02:00
parent e79154de73
commit b5169cd230
Notes: blender-bot 2023-02-14 08:06:38 +01:00
Referenced by issue #81932, Blender crashes after trying to use the smear brush while Dyntopo is enabled
1 changed files with 2 additions and 6 deletions

View File

@ -5666,15 +5666,11 @@ static void do_brush_action(Sculpt *sd, Object *ob, Brush *brush, UnifiedPaintSe
/* Check for unsupported features. */
PBVHType type = BKE_pbvh_type(ss->pbvh);
if (brush->sculpt_tool == SCULPT_TOOL_PAINT && type != PBVH_FACES) {
if (!U.experimental.use_sculpt_vertex_colors) {
return;
}
return;
}
if (brush->sculpt_tool == SCULPT_TOOL_SMEAR && type != PBVH_FACES) {
if (!U.experimental.use_sculpt_vertex_colors) {
return;
}
return;
}
/* Build a list of all nodes that are potentially within the brush's area of influence */