Fix for [#33959] laplacian smooth gui buggy

* Made the property UI range do bigger steps.
* Increased default values a bit. If people need extreme small values (0.00001) they can enter that manually.
This commit is contained in:
2013-01-23 14:19:01 +00:00
parent f0c313c8b6
commit 456a2d9de7
2 changed files with 4 additions and 4 deletions

View File

@@ -1852,14 +1852,14 @@ static void rna_def_modifier_laplaciansmooth(BlenderRNA *brna)
prop = RNA_def_property(srna, "lambda_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "lambda");
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_range(prop, -1000.0, 1000.0, 0.0000001, 6);
RNA_def_property_ui_range(prop, -1000.0, 1000.0, 5, 3);
RNA_def_property_ui_text(prop, "Lambda Factor", "Smooth factor effect");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop = RNA_def_property(srna, "lambda_border", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "lambda_border");
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_range(prop, -1000.0, 1000.0, 0.0000001, 6);
RNA_def_property_ui_range(prop, -1000.0, 1000.0, 5, 3);
RNA_def_property_ui_text(prop, "Lambda Border", "Lambda factor in border");
RNA_def_property_update(prop, 0, "rna_Modifier_update");

View File

@@ -197,8 +197,8 @@ static LaplacianSystem *init_laplacian_system(int a_numEdges, int a_numFaces, in
static void init_data(ModifierData *md)
{
LaplacianSmoothModifierData *smd = (LaplacianSmoothModifierData *) md;
smd->lambda = 0.00001f;
smd->lambda_border = 0.00005f;
smd->lambda = 0.01f;
smd->lambda_border = 0.01f;
smd->repeat = 1;
smd->flag = MOD_LAPLACIANSMOOTH_X | MOD_LAPLACIANSMOOTH_Y | MOD_LAPLACIANSMOOTH_Z | MOD_LAPLACIANSMOOTH_PRESERVE_VOLUME | MOD_LAPLACIANSMOOTH_NORMALIZED;
smd->defgrp_name[0] = '\0';