[Bf-blender-cvs] [302dba95a3f] sculpt-dev: Sculpt-dev: fix BKE_brush_add
Joseph Eagar
noreply at git.blender.org
Tue Dec 14 22:46:45 CET 2021
Commit: 302dba95a3f8cf20cf31384d4597affec9bf0c71
Author: Joseph Eagar
Date: Tue Dec 14 13:45:47 2021 -0800
Branches: sculpt-dev
https://developer.blender.org/rB302dba95a3f8cf20cf31384d4597affec9bf0c71
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.
===================================================================
M release/datafiles/startup.blend
M source/blender/blenkernel/intern/brush.c
M source/blender/blenkernel/intern/brush_channel_define.h
===================================================================
diff --git a/release/datafiles/startup.blend b/release/datafiles/startup.blend
index f683d084dd1..91a661a27f9 100644
Binary files a/release/datafiles/startup.blend and b/release/datafiles/startup.blend differ
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c
index 2fc8c59e640..83153ddc619 100644
--- a/source/blender/blenkernel/intern/brush.c
+++ b/source/blender/blenkernel/intern/brush.c
@@ -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;
}
diff --git a/source/blender/blenkernel/intern/brush_channel_define.h b/source/blender/blenkernel/intern/brush_channel_define.h
index 2a661561eb8..9a56991e1c8 100644
--- a/source/blender/blenkernel/intern/brush_channel_define.h
+++ b/source/blender/blenkernel/intern/brush_channel_define.h
@@ -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,
More information about the Bf-blender-cvs
mailing list