Page MenuHome

Outliner Visibility Update
ClosedPublic

Authored by Dalai Felinto (dfelinto) on May 8 2019, 5:27 AM.

Details

Summary

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

  • 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).

Diff Detail

Repository
rB Blender
Branch
outliner-viz (branched from master)
Build Status
Buildable 3566
Build 3566: arc lint + arc unit

Event Timeline

Got quite far today, but can't think straight anymore :) I have the following open questions:

  1. Should we keep BASE_HIDDEN and ob->restrictflag & OB_RESTRICT_VIEW?
  2. Should we have per collection OR per (view) layer collection viewport visibility?

cc: @Brecht Van Lommel (brecht) @William Reynish (billreynish) @Pablo Vazquez (pablovazquez) @Julien Kaspar (JulienKaspar)

@Dalai Felinto (dfelinto)
Unfortunately I wasn't able to try out the Diff so I just read through the description.
Some things were a bit hard to understand but regarding your open question:

Should we have per collection OR per (view) layer collection viewport visibility?

Do you also mean the object viewport visibility? As in the eye icon in general? In that case I think it needs to be global instead of per view layer since we eventually need to return the feature to drive and key this toggle. This would be hard to do if it's per view layer.
I might completely misunderstand what you actually mean though :D

Great work.

I noticed Ctrl+Click on the collection viewport visibility is not working. I guess ideally it would work on all collection properties in some generic way.

Should we keep BASE_HIDDEN and ob->restrictflag & OB_RESTRICT_VIEW?

My understanding is that we would keep BASE_HIDDEN as viewport visibility, and rename OB_RESTRICT_VIEW to become instancing visibility.

Should we have per collection OR per (view) layer collection viewport visibility?

Like objects, I think per collection would be renamed to instance visibility, and per view layer would remain viewport visibility.

We can solve that with the icons. But on top of that, (in the future) we could dim the expected value, highlighting the exceptions we expect to stand out.

I see the point of this, but then also think visible objects standing out more than others is logical. For example, if you hide most objects in the scene with shift+H, then it would make sense for the emphasis to be on the visible objects.

So I'm not sure about this, it may work well anyway. But I suggest to do that as a separate patch if you think this will work well, and not consider it priority.

I noticed Ctrl+Click on the collection viewport visibility is not working. I guess ideally it would work on all collection properties in some generic way.

Right, good point. Should we have this for objects as well?

Should we keep BASE_HIDDEN and ob->restrictflag & OB_RESTRICT_VIEW?

My understanding is that we would keep BASE_HIDDEN as viewport visibility, and rename OB_RESTRICT_VIEW to become instancing visibility.

Let me ask something that may be obvious: If an object instance visibility is off, do I still see it in the viewport (if BASE_HIDDEN is off) ?
As of now (HEAD) OB_RESTRICT_VIEW would have precedent over BASE_HIDDEN. But if we want the instance setting to be only for instancing, the behaviour should change.

I will stick to UI changes with the patch.
So if an object instance visibility is off, we won't ever see it in the viewport (even if BASE_HIDDEN is off).

From review: Stick to UI-only changes and other fixes

Issues:

  • Ctrl+Click not implemented.
  • Shift+Click is NOT calling the rna property update when calling RNA_property_boolean_set().
  • Checkboxes still drawn with disregard to the restriction column area.

Handle some of the updates for shift-click

I still have no idea why shift-click is not working for the "hide_viewport" in collections.
It works for collections but for the bases it is not really working.

But I have no idea yet why it works if I click the "hide_viewport" for the bases individually, but it failing when calling it from view_layer__layer_collection_set_flag_recursive_cb().

Note: I can probably unify the view_layer__/scenes__(...)_recursive_cb functions.

Dalai Felinto (dfelinto) edited the summary of this revision. (Show Details)May 9 2019, 7:13 AM
Dalai Felinto (dfelinto) edited the summary of this revision. (Show Details)

Fix "hide_viewport" not working recursively

I was trying to edit the (read-only) bases from object_cache.

Dalai Felinto (dfelinto) edited the summary of this revision. (Show Details)May 9 2019, 5:12 PM

Patch finished (feature complete)

Shift and Ctrl click are now working for all the collections as expected.
Including with toggling.

Dalai Felinto (dfelinto) retitled this revision from Outliner Visibility Update (WIP) to Outliner Visibility Update.May 11 2019, 12:35 AM
Dalai Felinto (dfelinto) edited the summary of this revision. (Show Details)

Last minute bug fix.

This revision was not accepted when it landed; it landed in state Needs Review.May 11 2019, 1:00 AM
This revision was automatically updated to reflect the committed changes.