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:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-10-19 16:53:03 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-10-19 16:53:03 +0400
commita75f11d03678b094d608382c50d0bb299c53ed1c (patch)
treec7b30eb780bfe1203fd36419a9d58e8b4cba085b /source/blender/editors/metaball
parent3a41ab73ff4e480fe5b86c2845f0fb4f9df113d7 (diff)
Fix #32219: Inconsistent influence of Units Scale on new objects
Made it so meshes, curves, surfaces and metaballs are scaling to a grid cell size, which makes them behave consistently now. There're still issues to be resolved still: - Lattice is not scaled to grid cell size yet, it uses slightly different add function which makes scaling a bit tricky and hacky. Would prefer to do a bit bigger refactor here, so it's a TODO for now. - Cameras, speakers and other helpers are not scaling. They don't have data on which scale could be applied and perhaps it should be some kind of draw scale. Also would consider it's a TODO for now.
Diffstat (limited to 'source/blender/editors/metaball')
-rw-r--r--source/blender/editors/metaball/mball_edit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/metaball/mball_edit.c b/source/blender/editors/metaball/mball_edit.c
index e9063687506..b9018914633 100644
--- a/source/blender/editors/metaball/mball_edit.c
+++ b/source/blender/editors/metaball/mball_edit.c
@@ -98,7 +98,7 @@ void load_editMball(Object *UNUSED(obedit))
}
/* Add metaelem primitive to metaball object (which is in edit mode) */
-MetaElem *add_metaball_primitive(bContext *UNUSED(C), Object *obedit, float mat[4][4], int type, int UNUSED(newname))
+MetaElem *add_metaball_primitive(bContext *UNUSED(C), Object *obedit, float mat[4][4], float dia, int type, int UNUSED(newname))
{
MetaBall *mball = (MetaBall *)obedit->data;
MetaElem *ml;
@@ -111,6 +111,7 @@ MetaElem *add_metaball_primitive(bContext *UNUSED(C), Object *obedit, float mat[
}
ml = BKE_mball_element_add(mball, type);
+ ml->rad *= dia;
copy_v3_v3(&ml->x, mat[3]);
ml->flag |= SELECT;