diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2018-11-28 05:49:36 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2018-11-28 07:33:04 +0300 |
commit | 4de6a210c69fe254518ca8d6c860782c54f03749 (patch) | |
tree | 89e27fa2ef5531a86fe26fdde65857430d0403b2 /release | |
parent | 4521d3e7074d2e08ca813e1f4a2297f5000f335b (diff) |
Per view-layer collection visibility
We still control this in the viewport collections visibility menu. But
now we are actually changing the visibility of the collections, not of
the objects.
If a collection is indirectly invisible (because one of its parents are
invisible) we gray it out.
Also if you click directly in the collection names, it "isolates" the
collection by hiding all collections, and showing the direct parents and
all the children of the selected collection.
Development Note:
Right now I'm excluding the hidden collections from the depsgraph.
Thus the need for tagging relations to update.
If this proves to be too slow, we can change.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 77f9c2332ac..2ae8c911a6d 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -4078,11 +4078,8 @@ class VIEW3D_PT_collections(Panel): sub = row.split() subrow = sub.row(align=True) subrow.alignment = 'RIGHT' - icon = 'HIDE_OFF' if has_visible_objects else 'HIDE_ON' - props = subrow.operator("object.hide_collection", text="", icon=icon, emboss=False) - props.collection_index = index - props.toggle = True - subrow.prop(child.collection, "hide_select", text="", emboss=False) + subrow.active = collection.is_visible # Parent collection runtime visibility + subrow.prop(child, "hide_viewport", text="", emboss=False) for child in collection.children: index = self._draw_collection(layout, view_layer, child, index) |