Sculpt-dev: fix BKE_brush_add

* BKE_brush_add now calls BKE_brush_sculpt_reset if
  ob_mode has OB_MODE_SCULPT set.  This should hopefully
  eliminate a whole class of bugs I've been chasing.
This commit is contained in:
Joseph Eagar 2021-12-14 13:45:47 -08:00
parent 0917431ca4
commit 302dba95a3
3 changed files with 5 additions and 1 deletions

Binary file not shown.

View File

@ -654,6 +654,10 @@ Brush *BKE_brush_add(Main *bmain, const char *name, const eObjectMode ob_mode)
brush->ob_mode = ob_mode;
if (ob_mode & OB_MODE_SCULPT) {
BKE_brush_sculpt_reset(brush);
}
return brush;
}

View File

@ -237,7 +237,7 @@ MAKE_ENUM(blend,"Blending Mode","Brush blending mode",IMB_BLEND_MIX,{\
{-1}
})
MAKE_FLOAT_EX_EX(smooth_strength_factor,"Smooth Strength","Factor to control the strength of shift-smooth",0.1f,0.0f,10.0f,0.0f,2.0f,false,false,BRUSH_CHANNEL_INHERIT)
MAKE_FLOAT_EX_EX(smooth_strength_factor,"Smooth Strength","Factor to control the strength of shift-smooth",0.5f,0.0f,10.0f,0.0f,2.0f,false,false,BRUSH_CHANNEL_INHERIT)
MAKE_FLOAT_EX_EX(smooth_strength_projection,"Smooth Projection","Factor to control the volume preservation of shift-smooth",0.0f,0.0f,1.0f,0.0f,1.0f,false,false,BRUSH_CHANNEL_INHERIT)
MAKE_ENUM(smooth_deform_type,"Deformation","Deformation type that is used in the brush",BRUSH_SMOOTH_DEFORM_LAPLACIAN,{
{BRUSH_SMOOTH_DEFORM_LAPLACIAN,