Age | Commit message (Collapse) | Author |
|
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.
|
|
[re-committing]
Edit mode was unable to select, pose mode was unable to move bones.
|
|
[re-committing]
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.
|
|
BF-admins agree to remove header information that isn't useful,
to reduce noise.
- BEGIN/END license blocks
Developers should add non license comments as separate comment blocks.
No need for separator text.
- Contributors
This is often invalid, outdated or misleading
especially when splitting files.
It's more useful to git-blame to find out who has developed the code.
See P901 for script to perform these edits.
|
|
|
|
Fixes T60251.
|
|
|
|
Since there will be no view layer overrides in 2.80, this is needed still.
|
|
|
|
There were at least three copies of those:
- OB_RECALC* family of flags, which are rudiment of an old
dependency graph system.
- PSYS_RECALC* which were used by old dependency graph system
as a separate set since the graph itself did not handle
particle systems.
- DEG_TAG_* which was used to tag IDs.
Now there is a single set, which defines what can be tagged
and queried for an update. It also has some aggregate flags
to make queries simpler.
Lets once and for all solve the madness of those flags, stick
to a single set, which will not overlap with anything or require
any extra conversion.
Technically, shouldn't be measurable user difference, but some
of the agregate flags for few dependency graph components did
change.
Fixes T58632: Particle don't update rotation settings
|
|
Avoid double hash calculation.
|
|
The cause is that FOREACH_OBJECT_IN_MODE_BEGIN assumed that the active
object is in the correct mode, which is wrong in this case. It also
only considered objects of the same type as active, which had to be
replaced with an explicit type parameter.
|
|
|
|
See T57857 for discussion. This reverts:
"Outliner: Do not gray out empty collections"
4521d3e7074d2e08ca813e1f4a2297f5000f335b.
"Remove eye column from the outliner"
fd16b359977c8932ada8db4ff0e43d0402fdc280.
Fix/workaround issues in pose and edit mode"
6d2e2e30d50c40f302b62d3601b5742d7c7056c6.
"Per view-layer collection visibility"
4de6a210c69fe254518ca8d6c860782c54f03749.
|
|
Edit mode was unable to select, pose mode was unable to move bones.
|
|
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.
|
|
|
|
Bring back per-viewport localview. This is based on Blender 2.79.
We have a limit of 16 different local view viewports.
We are using both the numpad /, as well as the regular /.
Missing features:
* Hack to make sure lights are always visible.
* Make rendered mode with external engines to support this as well
(probably just need to support this in the RNA iterators).
* Support over 16 viewports by taking existing viewports out of local view.
The code can use a cleanup pass in the future to unify the test to see
if an object is visible (or we can use TESTBASE in more places).
|
|
With this we have a way to tell that a collection has visible objects
but not all of its objects are visible.
|
|
This finished old standing TODO which was attempting to
ignore objects of all invisible collections.
The difference here is that we remove invisible bases from
view layers. This guarantees that the evaluated state is
consistent and does not reference original objects.
|
|
Collection flag and runtime_flag are shorts, not ints...
|
|
Selection should be separated from active state and handled by higher
level code (operators/editors) instead of happening automatically.
|
|
When you check for undone work before acquiring a lock that ensures you
are the only one actually doing the work, you have to redo the check
*after* acquiring said lock.
Otherwise, there is room for nasty random race condition issues...
|
|
|
|
|
|
Simplify library remapping code to handle special collection/object links
in postprocess. Previously base contained the actual object link which
needed special handling in preprocess, now objects are linked through
collection and the base cache can be updated in postprocess.
|
|
|