Page MenuHome

Preference setting for default empty size for collection instances
ClosedPublic

Authored by Jacques Lucke (JacquesLucke) on May 7 2020, 4:03 PM.

Details

Summary

The motivation for this setting is that the current default of 1.0 is often too large. When many collection instances are created, all lines in the viewport create a mess.

This adds a new preference setting in Editing -> Objects -> New Objects.

By default, it's set to 1.0, which matches the current behavior.

This was requested by @Sebastian Koenig (sebastian_k).

Maybe someone has an idea for a better/shorter name?
I'm not absolutely sure if I have to add versioning code for this, or if adding the setting to U_default is enough.

Diff Detail

Repository
rB Blender
Branch
empty-size (branched from master)
Build Status
Buildable 7935
Build 7935: arc lint + arc unit

Event Timeline

Jacques Lucke (JacquesLucke) requested review of this revision.May 7 2020, 4:03 PM
  • Merge branch 'master' into empty-size
Jacques Lucke (JacquesLucke) retitled this revision from Adjust default empty size for collection instances in preferences to Preference setting for default empty size for collection instances.May 7 2020, 4:17 PM
Jacques Lucke (JacquesLucke) edited the summary of this revision. (Show Details)

Hey! This is great, thanks a lot!
I just tested it, and it works just as expected. The name is totally fine, I think. :)

Julian Eisel (Severin) requested changes to this revision.EditedMay 11 2020, 6:09 PM

This does indeed need versioning, otherwise existing userpref.blend's will have the value set to 0. You could just check if (userdef->collection_instance_empty_size == 0) in void BLO_version_defaults_userpref_blend(Main *bmain, UserDef *userdef). There's no need to increase subversion that way.
Otherwise seems fine (think the name is fine too).

This revision now requires changes to proceed.May 11 2020, 6:09 PM
This revision is now accepted and ready to land.May 11 2020, 8:23 PM

An idea of having a "bounding box" empty that will be created based on selected objects bounding box would be really handy imo, that would feel like a real "stash/cache" that always frame the objects perfectly inside their bounding box.