Age | Commit message (Collapse) | Author |
|
As discussed in https://developer.blender.org/D12034#412258, GLEW should be replaced by libepoxy to enable dynamic loading of OpenGL.
Build:
```sh
make lite debug ninja BUILD_CMAKE_ARGS="-DWITH_GHOST_X11=OFF -DWITH_GHOST_WAYLAND=ON -DWITH_GHOST_WAYLAND_LIBDECOR=ON -DPYTHON_VERSION=3.10" BUILD_DIR="../blender_build"
```
Verify that there are no X11 dependencies any more:
```sh
lddtree ./blender_build/bin/blender
```
and:
```sh
./blender_build/bin/blender
```
should then start a pure Wayland client.
This also works with GLX (`-DWITH_GHOST_X11=ON -DWITH_GHOST_WAYLAND=OFF`).
This has not been tested on other systems (Windows, macOS) as I do not have access to those systems and the build bot does not allow me to trigger experimental builds any more (I get "you need to have role 'any-control'").
Reviewed By: campbellbarton, brecht, jbakker
Differential Revision: https://developer.blender.org/D15291
|
|
overrides.
The outliner would tagg all existing local IDs (for remap from linked
reference data to newly created overrides) when creating a new override.
This would become critical issue in case there is several existing
copies of the same override hierarchy (leading to several hierarchies
using the same override).
Further more, BKE override creation code would not systematically
properly remapp linked usages to new overrides one whithin the affected
override hierarchy, leading to potential undesired remaining usages of
linked data.
|
|
We would first invoke the dragging, and then set the drag data (like the
ID or the dragged modifier), so the `wmDropBox.on_drag_start()` handler
wouldn't be able to access this. This broke dragging some IDs from the
Outliner, noticed in D15333.
It's now possible to first create/request drag data, extend it, and then
invoke the actual dragging. The normal function to start dragging
returns `void` now instead of `wmDrag *`, so the drag data can't easily
be modified after starting anymore.
|
|
This is temporary to investigate which behavior should be kept when
creating an override hierarchy if there are no cherry-picked data
defined: make all overrides user-editable, or not.
This removes the 'make override - fully editable' menu entries.
|
|
Because children point to, or "use" their parent, the Library Overrides
Hierarchies mode in the Outliner would show parents contained in children, not
children contained in a parent. See D15339 for pictures.
In production files this would make the rig listed under all its children, so
it would appear many times in the tree. Now it appears once and the children
are collected under it.
Refactors the tree building, so instead of using
`BKE_library_foreach_ID_link()`, it now uses the ID relations mapping in
`MainIDRelations`.
Reviewed By: mont29
Differential Revision: https://developer.blender.org/D15339
|
|
|
|
Usual same issue with outliner operations, where you apply it on one
item, and then try to apply it again on same item listed somewhere else
in the tree...
Fixed by using the 'multi-tagged deletion' code we now have for IDs,
that way tree-walking function just tags IDs for deletion, and they all
get deleted at once at the end.
|
|
|
|
Previously, it would show "Link inside collection" but move between collections
instead in some cases. Additionally there was no tooltip for the "Link before/
after/between collections" case.
Behavior and tooltip should now be consistent in all cases.
Differential Revision: https://developer.blender.org/D15237
|
|
Mainly duplicate includes and else after return.
|
|
of the Outliner.
Regression from recent rB717ab5aeaecc.
|
|
Error in a4a7af47326.
To allow deleting tree elements while iterating, the new iterators would
get needed data out of the tree element before calling the iterator
callback. This included the info if the element is open or collapsed. So
if the callback would open or collapse elements, the iterator wouldn't
respect that change. Luckily the way the open/collapsed state is stored,
we can still query it after the callback is executed, without having to
access the (possibly freed) tree element.
|
|
The callback would just assume that it's only called on materials, which
may in fact not be the case. It could also be called for other ID types
and layer collections (see `outliner_do_libdata_operation()`). Properly
check this now.
Also avoid faling silently when the object or object-data to unlink from
couldn't be determined. Report this to the user. Operators that just do
nothing are confusing.
|
|
This issue was only exposed by ba49345705a3. The ID pointer of the
material's parent tree-element wasn't actually pointing to an ID, but to
the list-base containing the IDs. It was just unlikely to cause issues
in practice, although an assert was thrown.
Just don't do anything if the object or object-data to unlink the
material from could not be found. The following commit will introduce a
error message about this.
|
|
Before this, we would build the sub-trees of some elements, just to
remove them afterwards. In big files, this would sometimes build ten
thousands of elements unnecessarily. Now support not building those
sub-trees in the first place.
Performance tests in a Sprite Fright production file (release build):
- View Layer display mode, reduced Outliner tree rebuilding from ~45ms
to 12-17ms
- Library Overrides display mode, Hierarchies view, reduced tree
rebuilding from 5-6s(!) to 220ms
|
|
override' ones in the Outliner.
Conceptually animated/driven properties are not controlled by the
liboverride system anymore, even though they may generate override
operations. So consider them as part of the 'system overrides' category,
and hide them by default in the Outliner.
|
|
`BKE_lib_override_rna_property_find`.
Very useful e.g. for dealing with FCurves search.
|
|
Some operators OR'ed the existing flags in a way that made it seem
the value might already have some values set.
Replace this with assignment as no flags are set and the convention
with almost all operators is to write the value directly.
|
|
Add the following macros for enums as support for these features wasn't
all that obvious and there were some inconsistencies in their use.
- RNA_ENUM_ITEM_HEADING(name, description)
- RNA_ENUM_ITEM_SEPR
- RNA_ENUM_ITEM_SEPR_COLUMN
|
|
When launching Blender with a script creating a screenshot, the Outliner
tree wasn't initialized and built properly. That is because at this
stage, all visible regions were only tagged for a non-rebuild redraw,
not a full redraw. So ensure all regions are tagged for a full redraw
immediately after file reading. Usually the full redraw would be caused
by a file-read notifier, but the Python expression/script is executed
before notifiers are handled.
Note that even before this was crashing, the Outliner would be empty in
the created screenshot.
Additionally adds an assert to the Outliner to note assumptions
explicitly, rather than crashing later.
|
|
Uses the macro introduced in b45f410b315 where it makes sense.
|
|
|
|
IPO data-block types are deprecated since 2.5. Don't show them in the
Outliner at all.
Differential Revision: https://developer.blender.org/D15049
|
|
(Not meant to cause user visible changes.)
Makes use of the new iterators introduced in the previous commit. Some
benefits:
- Shorter, simpler, easier to read & understand
- Deduplicates logic
- Centralizes iteration logic, making it easier to replace tree storage
(as planned), see previous commit.
- Avoids having to pass (sub-)tree to iterate around (often redundant
since it's just `SpaceOutliner.tree`, even though `SpaceOutliner` is
already passed).
- Function arguments that are only passed to the recursive call are
recognized as unused (found and removed a few).
Also does some general cleanups while refactoring the code for the
iterators. Use `const`, use references (signals null is not expected),
early-exit (see 16fd5fa656af), remove redundant arguments, etc.
|
|
(Not meant to cause user visible changes.)
Adds some first new iterators to traverse over tree elements with a
functional syntax. Functional because it meant to be used with C++
lambdas.
For example, this common pattern:
```lang=cpp
void some_recursive_function(SpaceOutliner *space_outliner, ListBase *tree, ...)
{
LISTBASE_FOREACH (TreeElement *, te, tree) {
/* ... do something with the element ... */
/* Recurse into open children. */
if (TSELEM_OPEN(TREESTORE(te), space_outliner) {
some_recursive_function(&te->subtree, ...);
}
}
}
```
Gets simplified to this:
```lang=cpp
void some_function(SpaceOutliner &space_outliner, ...)
{
tree_iterator::all_open(space_outliner, [&](TreeElement *te) {
/* ... do something with the element ... */
});
}
```
We can add more iterators, e.g. some that support early exiting or
skipping children, returning a custom type, only act on selected
elements, etc.
The following commit will convert a bunch of code to use these. Some
further benefits will become visible there. Not all cases are straight
forward to convert, but hopefully more and more code can be refactored
to work with this. This deduplicates and centralizes the iteration
logic, which will later make it much easier to refactor how the tree
storage is done (e.g. move it to `SpaceOutliner_Runtime` and use a
better container than `ListBase`).
|
|
Design is to have warnings in the sub-tree of a collapsed element show
up next to the collapsed element. But if inside the collapsed element,
there was a uncollapsed one containing yet another element with a
warning, that warning wouldn't "bubble up" to the collapsed parent.
Issue was that the warning lookup would only recurse into collapsed
elements, rather than all elements inside of a collapsed element.
While the actual fix for this could've been simpler, I decided to rework
this code entirely. Recursively querying the warning message is now done
separately from drawing the message once found, which makes the code
easier to follow and implements the single responsibility principle
better.
|
|
Library overrides were basically using their own system to display
warnings for tree elements, even though for other display elements we
have a more general solution. With the previous commit this has been
generalized further and made trivial to extend.
|
|
Uses a inheritance based approach for querying warning of tree elements
and the mode column support of display modes.
For the warnings, tree elements can override the
`AbstractTreeElement::getWarning()` method and return a warning string.
The UI will draw the warning column with warning icons. This makes the
warning column more generalized and easier to extend to more use-cases.
E.g. library override elements will use this after a followup commit.
To support mode toggles a display mode can now just return true in the
`AbstractTreeDisplay::supportsModeColumn()` method. This makes it
trivial to add mode columns to other display modes, and less error prone
because there's no need to hunt down a bunch of display mode checks in
different places.
|
|
by default.
Avoids having to manually enable data-blocks for user-edition when you
do not care about what should be edited by whom. Similar to default
behavior before introduction of system overrides (aka non-user-editable
overrides).
|
|
This reverts commit 30534deced8dad16c566dd82db3edd462283de13.
After discussion and feedback from users, it's better to keep this tool
available until there is time to properly re-think the whole Outliner's
contextual menu.
|
|
Replace some `if/else if` chains by proper `switch` statement.
Replace some `BLI_assert(0)` calls by `BLI_assert_unreachable()` ones.
|
|
|
|
|
|
We cannot try to get RNA info when the rna path of an override property
is invalid.
|
|
This feature is very advanced, and the way it was exposed in the
Outliner was very confusing at best.
It remains available through the Python API (`ID.user_remap`) e.g.
|
|
This was historically the only way to change/fix paths of library files
in Blender. However, only changing the path then required a manual
reload of the library, which could be skipped by user, or a save/reload
of the working .blend file, which could lead to corruption of advanced
library usages like overrides.
Prefferred, modern way to change path of a library is to use the
Relocate operation instead. Direct path modification remains possible
through RNA (python console or the Data API view in the Outliner.
|
|
These were missing in "Blender File" view.
before
{F13053175}
after
{F13053176}
Differential Revision: https://developer.blender.org/D14859
|
|
|
|
While the reference would never be used in case of NULL pointer, this
bit of code was not really clear and nice, so make it less ambiguous
now. Also add early return in case a NULL idv pointeris actually passed.
|
|
Adds a column to the right in the Library Overrides Hierarchies view
mode to toggle editability of library overrides.
Note that making a library override non-editable currently involves
clearing all overridden properties. This is an arguable design choice,
we should probably at least warn the user before doing this.
Part of T95802.
Reviewed by: Bastien Montagne
Differential Revision: https://developer.blender.org/D14653
|
|
|
|
Animation would still play in the viewport.
There are two ways to unlink an action from the Outliner:
[1] `Unlink Action` on the Animation Data context menu.
This does `outliner_do_data_operation` / `unlinkact_animdata_fn` and has
the correct DEG update.
[2] `Unlink` on the Action context menu
This does `outliner_do_libdata_operation` / `unlink_action_fn` and was
missing the DEG update.
Now add the missing DEG update to the second case.
Maniphest Tasks: T95679
Differential Revision: https://developer.blender.org/D14089
|
|
This adds missing cases to detect edit mode for Curves objects.
Unlike other object types, Curves do not have specific edit data,
rather we edit the original data directly, and rely on `Object.mode`.
For this, `BKE_object_data_is_in_editmode` had to be modified to
take a pointer to the object. This affects two places: the outliner
and the dependency graph. For the former place, the object pointer
is readily available, and we can use it. For the latter, the object
pointer is not available, however since it is used to update edit
mode pointers, and since Curves do not have such data, we can
safely pass null to the function here.
This also fixes the assertion failure that happens when closing a file
in edit mode.
Differential Revision: https://developer.blender.org/D14330
|
|
Kudos to Aaron Carlisle (@Blendify) for noticing it!
|
|
|
|
Add blank lines after file references to avoid them being interpreted as
doc-strings the following declarations.
|
|
Add ccl_gpu_kernel_postfix as a statement macro to prevent the following
declarations from being indented.
|
|
Adds a dropdown for the Library Overrides display mode that lets users
choose between a "Properties" and a "Hierachies" view mode. The former
is what was previously there (a mode that displays all overridden
properties with buttons to edit the values), the latter is new. It
displays the hierarchical relationships between library overridden
data-blocks. E.g. to override the mesh of an object inside a linked
collection, the entire collection > object > mesh hierarchy needs to be
overridden (whereby the former two will be automatically overridden
using system overrides).
The Hierarchies mode will also show the override hierarchies of
data-blocks that were linked and are overridden in the source file. This
information is useful to have, especially for debugging scenes.
Part of T95802.
Differential Revision: https://developer.blender.org/D14440
Reviewed by: Bastien Montagne
|
|
Add new `BKE_id_is_editable` helper in `BKE_lib_id.h`, that supercedes
previous check (simple `ID_IS_LINKED()` macro) for many editing cases.
This allows to also take into account 'system override' (aka
non-editable override) case.
Ref: {T95707}.
|
|
single' operations.
'Delete' was a confusing name, even though it would delete the overrides
it would replace them by linked data.
Adding the 'single' version of that operation made it even more
confusing, since often it has to keep the override ID for sakes of
hierarchy, and just reset it and turn it back into a non-editable system
override.
Ref: {T95707}.
|