Age | Commit message (Collapse) | Author |
|
It's odd to include a C++ header (".hh") in C code, we should avoid that. All
of the Outliner code should be moved to C++, I don't expect this C header to
stay for long.
|
|
"View" leads to weird names like `TreeViewViewLayer` and after all they are
specific to what we call a "display mode", so "display" is more appropriate.
Also add, update and correct comments.
|
|
See https://developer.blender.org/D9499.
Also:
* Add `space_outliner/tree/common.cc` for functions shared between display
modes.
* Had to add a cast to `ListBaseWrapper` to make it work with ID lists.
* Cleanup: Remove internal `Tree` alias for `ListBase`. That was more confusing
than helpful.
|
|
|
|
|
|
* Turn functions into member functions (makes API for a type more obvious &
local, allows implicitly sharing data through member variables, enables order
independend definition of functions, allows more natural language for
function names because of the obvious context).
* Move important variables to classes rather than passing around all the time
(shorter, more task-focused code, localizes important data names).
* Add helper class for adding object children sub-trees (smaller, more focused
units are easier to reason about, have higher coherence, better testability,
can manage own resources easily with RAII).
* Use C++ iterators over C-macros (arguably more readable, less macros is
generally preferred)
* Add doxygen groups (visually emphasizes the coherence of code sections,
provide place for higher level comments on sections).
* Prefer references over pointers for passing by reference (makes clear that
NULL is not a valid value and that the current scope is not the owner).
|
|
The Outliner tree creation was very messy and hard to follow. Hardcoded display
type checks are scattered over many places.
This introduces a new abstraction "tree-view" to help constructing and managing
the tree for the different display types (View Layer, Scene, Blender file,
etc.).
Idea is to have an abstract base class to define an interface
(`AbstractTreeView`), and then subclasses with the implementation of each
display type (e.g. `TreeViewViewLayer`, `TreeViewBlenderFile`, etc). The
tree-viewer is kept alive until tree-rebuild as runtime data of the space, so
that further queries based on the display type can be executed (e.g. "does the
view support selection syncing?", "does it support restriction toggle
columns?", etc.).
I may still change the names a bit, not sure yet if "tree-view" is the right
term for this helper.
|
|
|
|
Ensure that When checking "Hide in Viewport" option for a collection
that child objects are drawn grayed out for consistency with the
"Disable in Viewports" toggle.
For checking an object visibility in the viewport the flag
BASE_VISIBLE_VIEWLAYER should be used instead of BASE_VISIBLE_DEPSGRAPH
because the latter ignores viewport visibility.
Manifest Task: T77161
Differential Revision: https://developer.blender.org/D7904
|
|
This addition to the filters allows the user to enable the
outliner tree to restrict the listing to only Selectable objects.
Differential Revision: https://developer.blender.org/D7310
|
|
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D9349
|
|
This name makes more sense and is consistent with related functions
(e.g. `outliner_requires_rebuild_on_select_or_active_change()`).
|
|
When changing the selected, active or visible object(s), the Outliner
has to be rebuilt while using the corresponding object state filters.
The object hiding operators also have to send the proper notifiers (they
changed visibility without notifying about that).
|
|
Access to this structure will be needed in BKE's armature code.
|
|
|
|
Grease pencil modifiers already had defined outliner icons, but had
never been included in the tree. This adds the modifiers and the shader
effects to the tree.
Part of T68498
|
|
We can avoid the rather expensive outliner tree rebuilds and only redraw
if nothing but the selection or active item changes. This should give a
bit of speedup for heavy scenes.
For this to work I had to correct a few notifiers, some were only
sending selection/active change notifiers that actually did things like
adding objects. I also added a more precise notifier type for when the
active collection changes. At the notifier subtype/action level we're
not even close to running out of bits, so this should be fine.
Also had to correct a wrong notifier check (was using `&` rather than
`==`).
|
|
Also order sizeof(..) first to promote other values to size_t.
|
|
|
|
No functional changes. Rename soops, soutliner, and so to
space_outliner.
|
|
Filtering Collections when also filtering object children would only
display the parent object. Add a check for the NO_CHILDREN filter before
creating the object-parent hierarchy.
|
|
Collection instance datablocks were not filtered out when only showing
the selected object. They were treated as a collection (which should
show when filtering objects). Adds a case to check if the parent is an
object.
|
|
No functional changes. Convert all C++ style comments to C comments.
Also capitalize and add full stops.
The comments themselves were not cleaned up. Some could be removed or
reworded.
|
|
|
|
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/editors/space_outliner` module.
No functional changes.
|
|
Steps to reproduce were:
* Load factory settings
* Link any library
* Change to "Blender File" display mode in Outliner
* Enable filtering
* -> Assert fails
This may have had further side-effects for linked IDs.
Checked with Bastien, the NULL-check seems reasonable. It was initially there
but removed in d74f9c4b7b4f.
Fine to backport.
|
|
Using 'name' for the full path of a file reads badly,
especially when id.name is used in related code.
|
|
In big files, the Outliner would have a noticeable lag when opening or
collapsing items. That was because the entire tree was rebuilt, which isn't
actually needed in most cases. So we avoid it where possible now.
|
|
When linking or overriding an instanced collection, the new collection item in
the Outliner is now un-collapsed by default.
Linking and overriding is typically used in production scenes, where
collections tend to contain many items (children, grand-children, etc.). If all
collections in that hierarchy are expanded by default, the Outliner gets
flooded with items. So users ended up manually collapsing the collections.
Part of T76555.
Reviewed by: Andy Goralczyk, Bastien Montange.
Differential Revision: https://developer.blender.org/D7626
|
|
All the driver-specific code in `fcurve.c` has been moved into a new file
`fcurve_driver.c`. The corresponding declarations have been moved from
`BKE_fcurve.h` to `BKE_fcurve_driver.h`.
All the `#include "BKE_fcurve.h"` statements have been investigated and
replaced with `BKE_fcurve_driver.h` where necessary.
No functional changes.
|
|
This data block will be the container for simulation node trees.
It will be used for the new particle node system (T73324).
The new data block has the type `ID_SIM`.
It is not visible to users and other developers by default yet.
To enable it, activate the cmake option `WITH_NEW_SIMULATION_TYPE`.
New simulation data blocks can be created by running `bpy.data.simulations.new("name")`.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D7225
|
|
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
|
|
Mpving utils from idcode to idtype proved to be somewhat painful for
some reasons, but now all looks good.
Had to add a fake/empty shell for the special snowflake too,
`ID_LINK_PLACEHOLDER/INDEX_ID_NULL`...
|
|
|
|
Only the volume object is exposed in the user interface. It is based on OpenVDB
internally. Drawing and rendering code will follow in another commit.
https://wiki.blender.org/wiki/Source/Objects/Volume
https://wiki.blender.org/wiki/Reference/Release_Notes/2.83/Volumes
Hair and PointCloud object types are hidden behind a WITH_NEW_OBJECT_TYPES
build option. These are unfinished, and included only to make it easier to
cooperate on development in the future and avoid tricky merges.
https://wiki.blender.org/wiki/Source/Objects/New_Object_Types
Ref T73201, T68981
Differential Revision: https://developer.blender.org/D6945
|
|
The old convention was easy to confuse with ScrArea.
Part of https://developer.blender.org/T74432.
This is mostly a batch rename with some manual fixing. Only single word
variable names are changed, no prefixed/suffixed names.
Brecht van Lommel and Campbell Barton both gave me a green light for
this convention change.
Also ran clan clang format on affected files.
|
|
hiding Collections
Use BASE_VISIBLE_VIEWLAYER (rather than BASE_VISIBLE_DEPSGRAPH -- which
is not including the 'Hide in Viewport')
Note: the is one case where this still 'fails':
- 'Show only Hidden' plus excluding the parent collection (would be nice
to show those -- but contents of excluded excluded collections dont get
show in any case... this would be more work and for another report...)
Maniphest Tasks: T71611
Differential Revision: https://developer.blender.org/D6953
|
|
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.
|
|
Outliner tree building code was not handling properly empty libraries
(i.e. Lib datablocks in our bmain which have no used actual data
anymore).
Main issue here is unclean states of indirect hierarchies of linking
involving several libraries after undo operation.
This is not a critical issue though, just annoying and untidy.
|
|
working properly
'outliner_extract_children_from_subtree()' (introduced in
rB40a1c671655c) was extracting the children of non-matching parents
regardless of their own matching state.
Now properly filter the subtree prior to extracting.
Maniphest Tasks: T69246
Differential Revision: https://developer.blender.org/D6517
|
|
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
|
|
|
|
Collection contents alphabetical sort now uses a Natural Sort that takes number magnitude into account.
Differential Revision: https://developer.blender.org/D5636
Reviewed by Brecht Van Lommel
|
|
The old layout of `PointerRNA` was confusing for historic reasons:
```
typedef struct PointerRNA {
struct {
void *data;
} id;
struct StructRNA *type;
void *data;
} PointerRNA;
```
This patch updates it to:
```
typedef struct PointerRNA {
struct ID *owner_id;
struct StructRNA *type;
void *data;
} PointerRNA;
```
Throughout the code base `id.data` was replaced with `owner_id`.
Furthermore, many explicit pointer type casts were added which
were implicit before. Some type casts to `ID *` were removed.
Reviewers: brecht, campbellbarton
Differential Revision: https://developer.blender.org/D5558
|
|
No functional changes. Renames the "invisible" object filter to
"Hidden" to be more consistent.
|
|
|
|
Adds a keyboard walk navigation and selection operator to the
outliner. Up and down arrow keys walk up and down the list of
elements, and left and right will open and close elements if
the elements are closed or opened respectively. Holding shift
while walking up and down the tree expands the selection.
Holding shift while clicking or pressing left and right arrows
will expand or collapse all children elements recursively.
Pressing enter to openclose the hovered element is removed.
Also allows click+drag for openclose of element subtrees.
This moves openclose toggling to the openclose operator to
remove duplicate code. The outliner tree building is tweaked
slightly to set the proper parents in scene display mode for walk
select to walk to parents without errors.
|
|
Adds an invisible object filter in the outliner to show hidden
objects. This is useful to quickly locate hidden items in a large outliner
tree and easily toggle visibilty back on. Invisible refers to an object
being hidden, or viewport visibility restricted.
|
|
|
|
duplitype
|