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:
authorJacques Lucke <jacques@blender.org>2020-05-12 11:59:41 +0300
committerJacques Lucke <jacques@blender.org>2020-05-12 11:59:41 +0300
commite0b5a202311eb08d67725670325697ee0afeed96 (patch)
treedd1a6d5b63a7a9a3f1372e2f542d8294b9e454d7 /source/blender/blenloader/intern/versioning_userdef.c
parentf1f3381873d04f82a86af93e3477bf8442b32a43 (diff)
Preferences: Customize default empty size for collection instances
The old value (1.0) was often too large in practice. When many collection instances are created, the large empties create a mess in the viewport. This adds a new preference setting in `Editing -> Objects -> New Objects` called `Instance Empty Size`. The value will be used as display size for new empties containing a collection instance. Reviewers: Severin Differential Revision: https://developer.blender.org/D7650
Diffstat (limited to 'source/blender/blenloader/intern/versioning_userdef.c')
-rw-r--r--source/blender/blenloader/intern/versioning_userdef.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_userdef.c b/source/blender/blenloader/intern/versioning_userdef.c
index a426e49dd77..1b0e41ec54a 100644
--- a/source/blender/blenloader/intern/versioning_userdef.c
+++ b/source/blender/blenloader/intern/versioning_userdef.c
@@ -764,6 +764,10 @@ void BLO_version_defaults_userpref_blend(Main *bmain, UserDef *userdef)
*/
{
/* Keep this block, even when empty. */
+
+ if (userdef->collection_instance_empty_size == 0) {
+ userdef->collection_instance_empty_size = 1.0f;
+ }
}
if (userdef->pixelsize == 0.0f) {