Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2013-08-19 21:58:28 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2013-08-19 21:58:28 +0400
commit74dfe71a4674ed60efac8ed5a70ccbaebb1f30df (patch)
tree78b107e91afc2be4b3041c1a5e78207b723c2ecb
parent789ee1bfccbdf5be842c91b7c60334a06f3dc4c9 (diff)
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...
-rw-r--r--source/blender/editors/metaball/mball_edit.c2
-rw-r--r--source/blender/makesrna/intern/rna_meta.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/metaball/mball_edit.c b/source/blender/editors/metaball/mball_edit.c
index de0af1d1bb8..adffe16ca18 100644
--- a/source/blender/editors/metaball/mball_edit.c
+++ b/source/blender/editors/metaball/mball_edit.c
@@ -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;
diff --git a/source/blender/makesrna/intern/rna_meta.c b/source/blender/makesrna/intern/rna_meta.c
index 11f0e48012b..49b63933ae9 100644
--- a/source/blender/makesrna/intern/rna_meta.c
+++ b/source/blender/makesrna/intern/rna_meta.c
@@ -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");