diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2019-05-04 20:14:37 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2019-05-11 01:48:33 +0300 |
commit | b1af682001596fb2943dca3e39a256be71637906 (patch) | |
tree | 59fa8a74e10fccd3de6799f98ea9cb861d4accb8 /source/blender/blenloader/intern/versioning_280.c | |
parent | de9d846353bdc48a2d3388e79309342df7d003df (diff) |
Outliner Visibility Update
See T61578 for discussions and mockups.
Visibility Options
==================
We are adding more granular control over restriction columns in the outliner,
exposing "indirect only" and "holdout" as options, and change the way
users enable/disable collections in a viewlayer.
We also rename the object viewport restriction to hide instance.
So the options we have are:
Collection
----------
* Render Visibility
* Instance Visibility
* Selectable
(View) Layer Collection
-----------------------
* Enable
* Holdout
* Indirect Only
* Viewport
Shortcuts
=========
Isolate Collection
------------------
* Ctr + click isolates the collection.
It turns all its parents and children "visible", and all the other
collections "invisible".
If ALL the collections were already properly set, we re-set the
collections to their default value.
Set Collection Inside Collections and Objects
---------------------------------------------
* Shift + click: Set/unset inside collections and objects.
We only set objects values as well when we are in View Layer mode and
(obviously) when the objects have a matching property.
Icons
=====
Little reminder that we will need better icons for holdout, indirect only, and
probably instanced (nothing wrong with the current, but it differs from
the proposal when it is turned off).
Also, we need to decide where do we want the modifier/bones/... icons to
be (in which column) and ideally make sure their icons match the ones we
use for collections/objects.
At the moment those are using the screen icon, which is not being used
by collections.
Reviewers: brecht, billrey
Subscribers: pablovazquez
Differential Revision: https://developer.blender.org/D4823
Diffstat (limited to 'source/blender/blenloader/intern/versioning_280.c')
-rw-r--r-- | source/blender/blenloader/intern/versioning_280.c | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index b958d7532bf..66c186d4561 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -427,7 +427,7 @@ static void do_version_layers_to_collections(Main *bmain, Scene *scene) collections[layer] = collection; if (!(scene->lay & (1 << layer))) { - collection->flag |= COLLECTION_RESTRICT_VIEW | COLLECTION_RESTRICT_RENDER; + collection->flag |= COLLECTION_RESTRICT_INSTANCE | COLLECTION_RESTRICT_RENDER; } } @@ -728,7 +728,7 @@ void do_versions_after_linking_280(Main *bmain) /* Add fake user for all existing groups. */ id_fake_user_set(&collection->id); - if (collection->flag & (COLLECTION_RESTRICT_VIEW | COLLECTION_RESTRICT_RENDER)) { + if (collection->flag & (COLLECTION_RESTRICT_INSTANCE | COLLECTION_RESTRICT_RENDER)) { continue; } @@ -754,7 +754,8 @@ void do_versions_after_linking_280(Main *bmain) char name[MAX_ID_NAME]; BLI_snprintf(name, sizeof(name), DATA_("Hidden %d"), coll_idx + 1); *collection_hidden = BKE_collection_add(bmain, collection, name); - (*collection_hidden)->flag |= COLLECTION_RESTRICT_VIEW | COLLECTION_RESTRICT_RENDER; + (*collection_hidden)->flag |= COLLECTION_RESTRICT_INSTANCE | + COLLECTION_RESTRICT_RENDER; } BKE_collection_object_add(bmain, *collection_hidden, ob); @@ -3360,7 +3361,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } } - { + if (!MAIN_VERSION_ATLEAST(bmain, 280, 61)) { /* Added a power option to Copy Scale. */ if (!DNA_struct_elem_find(fd->filesdna, "bSizeLikeConstraint", "float", "power")) { LISTBASE_FOREACH (Object *, ob, &bmain->objects) { @@ -3398,6 +3399,22 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } } + for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) { + for (ScrArea *area = screen->areabase.first; area; area = area->next) { + for (SpaceLink *sl = area->spacedata.first; sl; sl = sl->next) { + if (sl->spacetype != SPACE_OUTLINER) { + continue; + } + SpaceOutliner *so = (SpaceOutliner *)sl; + so->filter &= ~SO_FLAG_UNUSED_1; + so->show_restrict_flags = SO_RESTRICT_ENABLE | SO_RESTRICT_SELECTABLE | + SO_RESTRICT_VIEWPORT; + } + } + } + } + + { /* Versioning code until next subversion bump goes here. */ LISTBASE_FOREACH (bArmature *, arm, &bmain->armatures) { arm->flag &= ~(ARM_FLAG_UNUSED_7 | ARM_FLAG_UNUSED_9); |