Fix [#36438] Adding Metaball when unit scale is smaller than 0.01 seemingly hangs Blender
Wiresize and rendersize were not handled regarding scene scale, leading to insane precision when working in cm or less...
This commit is contained in:
@@ -112,6 +112,8 @@ MetaElem *add_metaball_primitive(bContext *UNUSED(C), Object *obedit, float mat[
|
||||
|
||||
ml = BKE_mball_element_add(mball, type);
|
||||
ml->rad *= dia;
|
||||
mball->wiresize *= dia;
|
||||
mball->rendersize *= dia;
|
||||
copy_v3_v3(&ml->x, mat[3]);
|
||||
|
||||
ml->flag |= SELECT;
|
||||
|
@@ -320,13 +320,13 @@ static void rna_def_metaball(BlenderRNA *brna)
|
||||
/* number values */
|
||||
prop = RNA_def_property(srna, "resolution", PROP_FLOAT, PROP_DISTANCE);
|
||||
RNA_def_property_float_sdna(prop, NULL, "wiresize");
|
||||
RNA_def_property_range(prop, 0.050f, 1.0f);
|
||||
RNA_def_property_range(prop, 0.005f, 10000.0f);
|
||||
RNA_def_property_ui_text(prop, "Wire Size", "Polygonization resolution in the 3D viewport");
|
||||
RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
|
||||
|
||||
prop = RNA_def_property(srna, "render_resolution", PROP_FLOAT, PROP_DISTANCE);
|
||||
RNA_def_property_float_sdna(prop, NULL, "rendersize");
|
||||
RNA_def_property_range(prop, 0.050f, 1.0f);
|
||||
RNA_def_property_range(prop, 0.005f, 10000.0f);
|
||||
RNA_def_property_ui_text(prop, "Render Size", "Polygonization resolution in rendering");
|
||||
RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
|
||||
|
||||
|
Reference in New Issue
Block a user