[Bf-blender-cvs] [0c24cb542df] soc-2017-sculpting_improvements: Added clamping to input settings.
Sebastian Witt
noreply at git.blender.org
Tue Aug 29 15:36:29 CEST 2017
Commit: 0c24cb542df3eda8ed6590700dd0ad7f662b2b49
Author: Sebastian Witt
Date: Tue Aug 29 15:35:50 2017 +0200
Branches: soc-2017-sculpting_improvements
https://developer.blender.org/rB0c24cb542df3eda8ed6590700dd0ad7f662b2b49
Added clamping to input settings.
===================================================================
M source/blender/editors/sculpt_paint/sculpt.c
===================================================================
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 7669d2f725c..74fef34d63b 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -5279,8 +5279,8 @@ static SilhouetteData *silhouette_data_new(bContext *C)
/*Load RNA Data if present */
sil->smoothness = sd->silhouette_smoothness / 100.0f;
- sil->depth = sd->silhouette_depth;
- sil->resolution = sd->silhouette_resolution;;
+ sil->depth = fmax(sd->silhouette_depth, 0.05f);
+ sil->resolution = sd->silhouette_resolution;
sil->do_subtract = sd->silhouette_flags & SILHOUETTE_DO_SUBTRACT;
copy_v3_v3(sil->anchor, fp);
@@ -8649,7 +8649,7 @@ static void silhouette_create_shape_mesh(bContext *C, Mesh *me, SilhouetteData *
float z_vec[3] = {0.0f,0.0f,1.0f};
float inv_z_vec[3];
float depth = sil->depth;
- int ss_level = sil->resolution;
+ int ss_level = fmax(sil->resolution, 1);
int v_steps = (1 << ss_level) + 2;
bool n_ori = false;
int e_start;
More information about the Bf-blender-cvs
mailing list