Age | Commit message (Collapse) | Author |
|
are disabled
There is no reason to have the children enable/disable state to
influence the parent collection. Specially considering that the parent
collection itself can have objects that would be visible.
Reviewed by: dfelinto, brecht
Differential Revision: http://developer.blender.org/D7864
|
|
|
|
Excluding a collection also changes the exclude setting on all child collections
so that it is possible to selectively enable some children without the parent
being enabled.
This change makes it so that if you unexclude the parent, the exclude setting
of children are restored again instead of being permanently lost.
Original patch by Szymon with modifications by Brecht.
Differential Revision: https://developer.blender.org/D7016
|
|
Note this only changes cases where the variable was declared inside
the for loop. To handle it outside as well is a different challenge.
Differential Revision: https://developer.blender.org/D7320
|
|
Modify the view layer add operator (and underlying `BKE_view_layer_add`)
to allow for copying the current view layer, as well as adding a new one
but with all LayerCollections disabled by default (this is important for
heavy scenes where currently adding view layers can take a long time due
to enabling every collection by default).
Reviewed By: mont29
Differential Revision: https://developer.blender.org/D6862
|
|
|
|
Note that `BKE_library.h`/`library.c` were renamed to
`BKE_lib_id.h`/`lib_id.c` to avoid having a too generic name here.
Part of T72604.
|
|
Credit for the original patch goes to @scorpion81.
|
|
Before this patch you could go to a local view with a single object,
while you had other objects also in edit mode, and your operators would
affect all objects even the ones outside your local view (same for local
collection).
Differential Revision: https://developer.blender.org/D6064
|
|
My bad for not figuring out how to run our unittests since I got back to
Windows.
|
|
Now local collections are fully working with cycles preview, while the
collection visibility bug is fixed.
Local collections were not working with cycles viewport even before the recent
commit to allow users to show collections that are hidden in the view layer.
It just got worse with said commit (0812949bbc3d).
Differential Revision: https://developer.blender.org/D6034
|
|
Users now can turn on in a viewport collections that are temporarily
hidden (eye) in the view layer.
Design task: T61327
As for the implementation, I had to decouple the visibility in the
depsgraph from the visibility in the view layer.
Also there is a "bug" that in a way was there before which is some
operators (e.g., writing a text inside of a text object, tab into edit
mode) run regardless of the visibility of the active object. The bug was
present already (with object type visibility restriction) in 2.80 so if
we decide to tackle it, can be done separately (I have a patch for it
though P1132).
Reviewed by: brecht (thank you)
Differential Revision: D5992
|
|
The tricky part here is to support a hidden parent and a "visible" child
collection. In this case the object should obviously be invisible. It is
all working now.
|
|
This fix T67162.
|
|
Steps to reproduce were:
* Add a new collection
* Put an object into it
* Exclude the selection (the checkbox in front of the name)
* Enable "Local Collections" in any viewport
-> Crash
Did not skip the excluded collections, causing an unsuccessful object
lookup (returned null-pointer).
|
|
The problem was that the object and collection pointers in Base and
LayerCollection would get lost of file read. Normally such ID pointers would
be resolved by pointing to an ID_ID placeholder which has the datablock name,
and then replacing it will the real datablock. However ID_ID is only written
for directly linked datablocks.
This adds the concept of an indirectly linked datablock with a weak reference
to it. For this we write an ID_ID_WEAK_REF code, which is a reference that
will only be resolved if the datablock was read for another reason.
Differential Revision: https://developer.blender.org/D4416
|
|
Support per-viewport collection visibility options.
Note 1: There is no way to show a collection that was not visible before
due to depsgraph. Otherwise we would risk having all the collections in
the depsgraph and I believe this is not the idea.
An alternative would be to have a new depsgraph for viewports that are
not local. Something to keep in mind if we do per-viewport current frame
in the future.
So for now what we do is to only allow collections visibility to be
disabled/hidden in this mode.
Note 2: hide_viewport (the eye icon) doesn't really matter for
depsgraph. So after the merge we can still ignore it to show the
collections locally in a viewport with no problems for the depsgraph.
Reviewers: brecht, sergey
Subscribers: billreynish
Related task: T61327
Differential Revision: https://developer.blender.org/D5611
|
|
When the active collection is hidden or excluded, change the active
collection to the first visible parent collection. This behavior existed
previously for excluding collections, and is now expanded to also
switch the active collection when viewport hidden or restricted.
This does not prevent viewport hidden or restricted collections from
being reactivated later. This could be added as a separate commit.
Excluded collections cannot be activated, so it may make sense to
extend this behavior to hiding collections.
|
|
T68035 by @luzpaz
|
|
Basically layer_collection_sync was calling BKE_base_eval_flags right away while
iterating over the bases.
However when a parent/sibling collection is to influence the collection flag of
an object that exists in more than one collection, it is too late since we
deselect the object in BKE_base_eval_flags right away.
Related to T64312.
Reviewers: sergey, brecht
Differential Revision: https://developer.blender.org/D5243
|
|
|
|
How to reproduce: use 1-10 to change the visible collection. If the
collection was globally invisible, it would be set to globally visible.
This was a left over from the previous collection visibility design.
Now that we have a more clear separation between temporary visibility
(i.e., layer collection visibiilty) and a global visibility setting
(i.e., collection visibility) we should keep them separated.
|
|
|
|
This also makes `IDP_CopyProperty` the "opposite"
of `IDP_FreeProperty`, which is what I'd expect.
Two refactoring steps:
* rename IDP_FreeProperty to IDP_FreePropertyContent
* new IDP_FreeProperty function that actually frees the property
Reviewers: brecht
Differential Revision: https://developer.blender.org/D4872
|
|
No major API change here, only in the outliner restriction column
variables (e.g., show_restrict_column_selectable > show_restrict_column_select).
* Get rid of _INSTANCE (introduced on b1af68200159).
* Differentiate (everywhere but the API) between HIDE (temporary) and VIEWPORT (global).
* Use the expected icon for restrict viewport (same as objects and modifiers).
* selectable > select
|
|
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
|
|
Note the fix for T62865 is still working fine.
|
|
We had a mix of BKE_view_layer_base_select (harmless), and places where
we simply set the BASE_SELECTED flag with no regard to its selectable
state.
|
|
|
|
|
|
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
|
|
Shift was always turning the collection visible. It now toggles, similar
to what we had in 2.79.
|
|
Selected status was not properly moved from new object to new created base.
This prevented next steps (making obdata, materials etc. local) to ever
happen.
|
|
After recent changes BASE_VISIBLE was not always disabled properly when the
object is hidden. This refactors the code a bit to hopefully be more clear.
|
|
Convention was not to but after discussion on 918941483f7e we agree its
best to change the convention.
Names now mostly follow RNA.
Some exceptions:
- Use 'nodetrees' instead of 'nodegroups'
since the struct is called NodeTree.
- Use 'gpencils' instead of 'grease_pencil'
since 'gpencil' is a common abbreviation in the C code.
Other exceptions:
- Leave 'wm' as it's a list of one.
- Leave 'ipo' as is for versioning.
|
|
Also use double indent instead of mixed tab/spaces.
|
|
This allows to update base flags to a proper state then object's restriction
flags are changed, without requiring to re-evaluate an entire tree of flags.
Some old unused flags are were removed by this change, and also disabling
menu items might not work the same as before. This is something we can bring
back if it's really needed (the way how flags are handled did change since
that interface code was done anyway, so code was looking weird anyway).
Reviewers: brecht
Differential Revision: https://developer.blender.org/D4420
|
|
Was only set and read from a single location.
Removing to keep things more manageable.
|
|
No need to have iterator loop in the view layer evaluation,
this only makes it more difficult to have base flags covered
by the dependency graph.
Other good thing is that we don't need to worry about whether
base has been removed from the evaluated view layer or not.
Reviewers: brecht
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D4414
|
|
The change in outliner and viewport visibility (897e047374fa) was made
assuming the bases of the render and viewport depsgraph were
independent. Thus we were deliberately setting base visibility when
rendering:
```
/* When rendering, visibility is controlled by the enable/disable option. */
if (mode == DAG_EVAL_RENDER) {
base->flag |= BASE_VISIBLE;
}
```
However, we were syncing data back to the original depsgraph, leading to
hidden viewport objects to re-appear.
Reviewers: sergey
Differential Revision: https://developer.blender.org/D4391
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
|
|
We still change their base/layer collection visibility, just not what would change the
original ID datablock.
|
|
|
|
Show Inside (shift + click) was still forcing objects to be visible.
|
|
Note: We still change it to the collection we are directly isolating/making
visible and its parents (in the case of isolating). But no longer its children.
Feedback and discussion on D4011. The motivation is that if we don't keep those
locked the disable state becomes useless.
|
|
Also satinizing the checks for master collection. The outliner tree
iterators already take care of not including the master collection
there.
|
|
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
|
|
|
|
Now collection and objects can be either:
* Disabled for all the view layers.
* Hidden for a view layer but not necessarily for all others.
* Visible for a view layer but not necessarily for all others.
Regarding icons: Whatever we decide to use for the "Hidden for all view
layers" needs to be a toggle-like icon. Because when viewing "Scenes"
instead of "View Layer" in the outliner we should be able to edit the
collection "Hidden for all the view layers" as an on/off option.
The operators are accessible via a Visibility context menu or shortcuts:
* Ctrl + Click: Isolate collection (use shift to extend).
* Alt + Click: Disable collection.
* Shift + Click: Hide/Show collection and its children (objects and collections)
Things yet to be tackled:
* Object outliner context menu can also get a Visibility sub-menu.
* Get better icons for viewport enable/disable.
Note:
* When using emulate 3 button mouse alt+click is used for 2d panning.
In this case users have to use the operator from the menu.
See T57857 for discussion.
Patch: https://developer.blender.org/D4011
Reviewers: brecht and sergey
Thanks to the reviewers and William Reynish and Julien Kasper in
particular for the feedback.
|