UI fixes for Laplacian Smooth (r51578):
* Make UI look more like Smooth Modifier. * Don't use RNA property names like "lamb", use a more descriptive one instead.
This commit is contained in:
@@ -333,15 +333,23 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
|
||||
|
||||
def LAPLACIANSMOOTH(self, layout, ob, md):
|
||||
layout.prop(md, "iterations")
|
||||
layout.prop(md, "lamb")
|
||||
layout.prop(md, "lambdaborder")
|
||||
row = layout.row()
|
||||
row.label(text="Axis: ")
|
||||
row.prop(md, "use_x")
|
||||
row.prop(md, "use_y")
|
||||
row.prop(md, "use_z")
|
||||
row = layout.row()
|
||||
row.prop(md, "volume_preservation")
|
||||
|
||||
split = layout.split(percentage=0.25)
|
||||
|
||||
col = split.column()
|
||||
col.label(text="Axis:")
|
||||
col.prop(md, "use_x")
|
||||
col.prop(md, "use_y")
|
||||
col.prop(md, "use_z")
|
||||
|
||||
col = split.column()
|
||||
col.label(text="Lambda:")
|
||||
col.prop(md, "lambda_factor", text="Factor")
|
||||
col.prop(md, "lambda_border", text="Border")
|
||||
|
||||
col.separator()
|
||||
col.prop(md, "volume_preservation")
|
||||
|
||||
layout.label(text="Vertex Group:")
|
||||
layout.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
|
||||
|
||||
|
@@ -1819,18 +1819,18 @@ static void rna_def_modifier_laplaciansmooth(BlenderRNA *brna)
|
||||
RNA_def_property_ui_text(prop, "Preserve Volume", "Apply volume preservation after smooth");
|
||||
RNA_def_property_update(prop, 0, "rna_Modifier_update");
|
||||
|
||||
prop = RNA_def_property(srna, "lamb", PROP_FLOAT, PROP_NONE);
|
||||
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, 0.0000001, 1000.0, 0.0000001, 8);
|
||||
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, "lambdaborder", PROP_FLOAT, PROP_NONE);
|
||||
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, 0.0000001, 1000.0, 0.0000001, 8);
|
||||
RNA_def_property_ui_text(prop, "Lambda border", "Lambda factor in border");
|
||||
RNA_def_property_ui_text(prop, "Lambda Border", "Lambda factor in border");
|
||||
RNA_def_property_update(prop, 0, "rna_Modifier_update");
|
||||
|
||||
prop = RNA_def_property(srna, "iterations", PROP_INT, PROP_NONE);
|
||||
|
Reference in New Issue
Block a user