2023-08-16 00:20:26 +10:00
|
|
|
# SPDX-FileCopyrightText: 2023 Blender Authors
|
2023-05-31 16:19:06 +02:00
|
|
|
#
|
2022-02-11 09:07:11 +11:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
2010-06-04 11:34:57 +00:00
|
|
|
|
|
|
|
|
set(INC
|
2010-09-18 03:55:56 +00:00
|
|
|
../include
|
2024-02-09 15:24:07 +01:00
|
|
|
../../blenfont
|
2025-01-02 19:56:24 +01:00
|
|
|
../../makesrna
|
|
|
|
|
# RNA_prototypes.hh
|
|
|
|
|
${CMAKE_BINARY_DIR}/source/blender/makesrna
|
2011-05-31 01:15:44 +00:00
|
|
|
)
|
|
|
|
|
|
2023-01-19 17:07:23 +11:00
|
|
|
set(INC_SYS
|
2025-07-16 15:28:27 +10:00
|
|
|
../../../../extern/fmtlib/include
|
2023-01-19 17:07:23 +11:00
|
|
|
)
|
2010-06-04 11:34:57 +00:00
|
|
|
|
2010-10-23 04:05:55 +00:00
|
|
|
set(SRC
|
2022-01-13 16:35:32 +01:00
|
|
|
outliner_collections.cc
|
|
|
|
|
outliner_context.cc
|
|
|
|
|
outliner_dragdrop.cc
|
|
|
|
|
outliner_draw.cc
|
|
|
|
|
outliner_edit.cc
|
|
|
|
|
outliner_ops.cc
|
2022-05-25 12:53:07 +02:00
|
|
|
outliner_query.cc
|
2022-01-13 16:35:32 +01:00
|
|
|
outliner_select.cc
|
|
|
|
|
outliner_sync.cc
|
|
|
|
|
outliner_tools.cc
|
|
|
|
|
outliner_tree.cc
|
|
|
|
|
outliner_utils.cc
|
|
|
|
|
space_outliner.cc
|
2020-11-07 20:13:37 +01:00
|
|
|
tree/common.cc
|
2020-11-09 13:25:59 +01:00
|
|
|
tree/tree_display.cc
|
2020-12-11 15:00:22 +11:00
|
|
|
tree/tree_display_data.cc
|
2020-11-09 13:25:59 +01:00
|
|
|
tree/tree_display_libraries.cc
|
2020-12-03 09:46:03 -07:00
|
|
|
tree/tree_display_orphaned.cc
|
2022-03-31 12:09:56 +02:00
|
|
|
tree/tree_display_override_library_hierarchies.cc
|
2022-05-05 17:33:10 +10:00
|
|
|
tree/tree_display_override_library_properties.cc
|
2020-12-03 10:34:09 -07:00
|
|
|
tree/tree_display_scenes.cc
|
2020-12-11 15:00:22 +11:00
|
|
|
tree/tree_display_sequencer.cc
|
|
|
|
|
tree/tree_display_view_layer.cc
|
UI Code Quality: Start refactoring Outliner tree-element building (using C++)
Continuation of the work started with 249e4df110e0. After all display modes
were ported to this new design, this commit starts the (more complex) work on
the individual tree-element types. More concretely it ports animation
tree-elements (action data-blocks, drivers and NLA data).
The commit above explains motivations. In short, we need a better design that's
easier to reason about and better testable.
Changes done here are pretty straight forward and introduce similar class
hierarchy and building patterns as introduced for the display modes already.
I.e. an abstract base class, `AbstractTreeElement` with derived classes for the
concrete types, and a C-API with a switch to create the needed objects from a
type enum. The latter should be replacable with something nicer later on (RAII
based, and type-safer through meta-programming).
Each tree-element type has its own class, with an own header and source file
(okay some closely related types can share a header and source file, like the
NLA ones).
I added some further temporary bits for the transition to the new design, such
as the `TreeElement.type`. It should entirely replace `TreeElement` eventually,
just as `outliner_add_element()` should be quite small by then and easily
replacable by a `TreeBuilder` helper.
2020-12-07 14:50:08 +01:00
|
|
|
tree/tree_element.cc
|
2025-05-08 16:09:31 +02:00
|
|
|
tree/tree_element_action_slot.cc
|
UI Code Quality: Start refactoring Outliner tree-element building (using C++)
Continuation of the work started with 249e4df110e0. After all display modes
were ported to this new design, this commit starts the (more complex) work on
the individual tree-element types. More concretely it ports animation
tree-elements (action data-blocks, drivers and NLA data).
The commit above explains motivations. In short, we need a better design that's
easier to reason about and better testable.
Changes done here are pretty straight forward and introduce similar class
hierarchy and building patterns as introduced for the display modes already.
I.e. an abstract base class, `AbstractTreeElement` with derived classes for the
concrete types, and a C-API with a switch to create the needed objects from a
type enum. The latter should be replacable with something nicer later on (RAII
based, and type-safer through meta-programming).
Each tree-element type has its own class, with an own header and source file
(okay some closely related types can share a header and source file, like the
NLA ones).
I added some further temporary bits for the transition to the new design, such
as the `TreeElement.type`. It should entirely replace `TreeElement` eventually,
just as `outliner_add_element()` should be quite small by then and easily
replacable by a `TreeBuilder` helper.
2020-12-07 14:50:08 +01:00
|
|
|
tree/tree_element_anim_data.cc
|
2023-07-06 18:43:58 +02:00
|
|
|
tree/tree_element_bone.cc
|
2023-09-18 12:10:53 +02:00
|
|
|
tree/tree_element_bone_collection.cc
|
2021-03-08 15:40:25 +01:00
|
|
|
tree/tree_element_collection.cc
|
2023-08-14 14:56:18 +02:00
|
|
|
tree/tree_element_constraint.cc
|
2023-07-27 17:36:41 +02:00
|
|
|
tree/tree_element_defgroup.cc
|
2021-03-08 15:40:25 +01:00
|
|
|
tree/tree_element_driver.cc
|
2023-07-10 12:37:15 +02:00
|
|
|
tree/tree_element_edit_bone.cc
|
2023-07-28 11:26:09 +02:00
|
|
|
tree/tree_element_gpencil_effect.cc
|
2021-03-05 12:28:15 +01:00
|
|
|
tree/tree_element_gpencil_layer.cc
|
2023-08-14 17:40:18 +02:00
|
|
|
tree/tree_element_grease_pencil_node.cc
|
2021-03-05 18:01:31 +01:00
|
|
|
tree/tree_element_id.cc
|
2025-05-08 16:09:31 +02:00
|
|
|
tree/tree_element_id_action.cc
|
2023-06-19 19:01:21 +02:00
|
|
|
tree/tree_element_id_armature.cc
|
2023-06-13 18:22:04 +02:00
|
|
|
tree/tree_element_id_collection.cc
|
2023-06-01 12:43:59 +02:00
|
|
|
tree/tree_element_id_curve.cc
|
2023-06-13 14:30:16 +02:00
|
|
|
tree/tree_element_id_gpencil_legacy.cc
|
2023-08-14 17:40:18 +02:00
|
|
|
tree/tree_element_id_grease_pencil.cc
|
2021-03-08 18:34:53 +01:00
|
|
|
tree/tree_element_id_library.cc
|
2023-06-12 16:03:25 +02:00
|
|
|
tree/tree_element_id_linestyle.cc
|
2023-05-31 18:43:46 +02:00
|
|
|
tree/tree_element_id_mesh.cc
|
2023-06-06 19:01:11 +02:00
|
|
|
tree/tree_element_id_metaball.cc
|
2023-06-22 15:04:53 +02:00
|
|
|
tree/tree_element_id_object.cc
|
2021-03-08 18:34:53 +01:00
|
|
|
tree/tree_element_id_scene.cc
|
2023-06-12 11:57:14 +02:00
|
|
|
tree/tree_element_id_texture.cc
|
2022-08-09 13:26:37 +10:00
|
|
|
tree/tree_element_label.cc
|
2023-08-23 18:17:14 +02:00
|
|
|
tree/tree_element_layer_collection.cc
|
2024-08-12 15:59:09 +02:00
|
|
|
tree/tree_element_linked_node_tree.cc
|
2024-08-23 10:04:10 +10:00
|
|
|
tree/tree_element_linked_object.cc
|
2023-08-17 23:24:16 +02:00
|
|
|
tree/tree_element_modifier.cc
|
2023-08-24 11:38:41 +10:00
|
|
|
tree/tree_element_nla.cc
|
2021-03-16 18:35:53 +01:00
|
|
|
tree/tree_element_overrides.cc
|
2023-07-27 16:29:19 +02:00
|
|
|
tree/tree_element_particle_system.cc
|
2023-08-14 12:36:06 +02:00
|
|
|
tree/tree_element_pose.cc
|
2022-01-26 11:44:58 +01:00
|
|
|
tree/tree_element_rna.cc
|
2021-03-08 15:40:25 +01:00
|
|
|
tree/tree_element_scene_objects.cc
|
2022-01-26 14:59:22 +01:00
|
|
|
tree/tree_element_seq.cc
|
2023-08-24 14:44:43 +02:00
|
|
|
tree/tree_element_view_collection.cc
|
2021-03-08 15:40:25 +01:00
|
|
|
tree/tree_element_view_layer.cc
|
Outliner: New C++ based functional tree iterators
(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`).
2022-05-25 22:51:52 +02:00
|
|
|
tree/tree_iterator.cc
|
2010-11-29 04:35:56 +00:00
|
|
|
|
2022-01-13 16:35:32 +01:00
|
|
|
outliner_intern.hh
|
2022-01-14 18:00:21 +01:00
|
|
|
tree/common.hh
|
2020-11-09 13:25:59 +01:00
|
|
|
tree/tree_display.hh
|
UI Code Quality: Start refactoring Outliner tree-element building (using C++)
Continuation of the work started with 249e4df110e0. After all display modes
were ported to this new design, this commit starts the (more complex) work on
the individual tree-element types. More concretely it ports animation
tree-elements (action data-blocks, drivers and NLA data).
The commit above explains motivations. In short, we need a better design that's
easier to reason about and better testable.
Changes done here are pretty straight forward and introduce similar class
hierarchy and building patterns as introduced for the display modes already.
I.e. an abstract base class, `AbstractTreeElement` with derived classes for the
concrete types, and a C-API with a switch to create the needed objects from a
type enum. The latter should be replacable with something nicer later on (RAII
based, and type-safer through meta-programming).
Each tree-element type has its own class, with an own header and source file
(okay some closely related types can share a header and source file, like the
NLA ones).
I added some further temporary bits for the transition to the new design, such
as the `TreeElement.type`. It should entirely replace `TreeElement` eventually,
just as `outliner_add_element()` should be quite small by then and easily
replacable by a `TreeBuilder` helper.
2020-12-07 14:50:08 +01:00
|
|
|
tree/tree_element.hh
|
2025-05-08 16:09:31 +02:00
|
|
|
tree/tree_element_action_slot.hh
|
UI Code Quality: Start refactoring Outliner tree-element building (using C++)
Continuation of the work started with 249e4df110e0. After all display modes
were ported to this new design, this commit starts the (more complex) work on
the individual tree-element types. More concretely it ports animation
tree-elements (action data-blocks, drivers and NLA data).
The commit above explains motivations. In short, we need a better design that's
easier to reason about and better testable.
Changes done here are pretty straight forward and introduce similar class
hierarchy and building patterns as introduced for the display modes already.
I.e. an abstract base class, `AbstractTreeElement` with derived classes for the
concrete types, and a C-API with a switch to create the needed objects from a
type enum. The latter should be replacable with something nicer later on (RAII
based, and type-safer through meta-programming).
Each tree-element type has its own class, with an own header and source file
(okay some closely related types can share a header and source file, like the
NLA ones).
I added some further temporary bits for the transition to the new design, such
as the `TreeElement.type`. It should entirely replace `TreeElement` eventually,
just as `outliner_add_element()` should be quite small by then and easily
replacable by a `TreeBuilder` helper.
2020-12-07 14:50:08 +01:00
|
|
|
tree/tree_element_anim_data.hh
|
2023-07-06 18:43:58 +02:00
|
|
|
tree/tree_element_bone.hh
|
2023-09-18 12:10:53 +02:00
|
|
|
tree/tree_element_bone_collection.hh
|
2021-03-08 15:40:25 +01:00
|
|
|
tree/tree_element_collection.hh
|
2023-08-14 14:56:18 +02:00
|
|
|
tree/tree_element_constraint.hh
|
2023-07-27 17:36:41 +02:00
|
|
|
tree/tree_element_defgroup.hh
|
2021-03-08 15:40:25 +01:00
|
|
|
tree/tree_element_driver.hh
|
2023-07-10 12:37:15 +02:00
|
|
|
tree/tree_element_edit_bone.hh
|
2023-08-24 11:38:41 +10:00
|
|
|
tree/tree_element_gpencil_effect.hh
|
2021-03-05 12:28:15 +01:00
|
|
|
tree/tree_element_gpencil_layer.hh
|
2023-08-14 17:40:18 +02:00
|
|
|
tree/tree_element_grease_pencil_node.hh
|
2021-03-05 18:01:31 +01:00
|
|
|
tree/tree_element_id.hh
|
2025-05-08 16:09:31 +02:00
|
|
|
tree/tree_element_id_action.hh
|
2023-06-19 19:01:21 +02:00
|
|
|
tree/tree_element_id_armature.hh
|
2023-06-13 18:22:04 +02:00
|
|
|
tree/tree_element_id_collection.hh
|
2023-06-01 12:43:59 +02:00
|
|
|
tree/tree_element_id_curve.hh
|
2023-06-13 14:30:16 +02:00
|
|
|
tree/tree_element_id_gpencil_legacy.hh
|
2023-08-14 17:40:18 +02:00
|
|
|
tree/tree_element_id_grease_pencil.hh
|
2021-03-08 18:34:53 +01:00
|
|
|
tree/tree_element_id_library.hh
|
2023-06-12 16:03:25 +02:00
|
|
|
tree/tree_element_id_linestyle.hh
|
2023-05-31 18:43:46 +02:00
|
|
|
tree/tree_element_id_mesh.hh
|
2023-06-06 19:01:11 +02:00
|
|
|
tree/tree_element_id_metaball.hh
|
2023-06-22 15:04:53 +02:00
|
|
|
tree/tree_element_id_object.hh
|
2021-03-08 18:34:53 +01:00
|
|
|
tree/tree_element_id_scene.hh
|
2023-06-12 11:57:14 +02:00
|
|
|
tree/tree_element_id_texture.hh
|
2022-08-09 13:26:37 +10:00
|
|
|
tree/tree_element_label.hh
|
2023-08-23 18:17:14 +02:00
|
|
|
tree/tree_element_layer_collection.hh
|
2024-08-12 15:59:09 +02:00
|
|
|
tree/tree_element_linked_node_tree.hh
|
2024-08-23 10:04:10 +10:00
|
|
|
tree/tree_element_linked_object.hh
|
2023-08-17 23:24:16 +02:00
|
|
|
tree/tree_element_modifier.hh
|
2023-08-24 11:38:41 +10:00
|
|
|
tree/tree_element_nla.hh
|
2021-03-16 18:35:53 +01:00
|
|
|
tree/tree_element_overrides.hh
|
2023-07-27 16:29:19 +02:00
|
|
|
tree/tree_element_particle_system.hh
|
2023-08-14 12:36:06 +02:00
|
|
|
tree/tree_element_pose.hh
|
2022-01-26 11:44:58 +01:00
|
|
|
tree/tree_element_rna.hh
|
2021-03-08 15:40:25 +01:00
|
|
|
tree/tree_element_scene_objects.hh
|
2022-01-26 14:59:22 +01:00
|
|
|
tree/tree_element_seq.hh
|
2023-08-24 14:44:43 +02:00
|
|
|
tree/tree_element_view_collection.hh
|
2021-03-08 15:40:25 +01:00
|
|
|
tree/tree_element_view_layer.hh
|
Outliner: New C++ based functional tree iterators
(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`).
2022-05-25 22:51:52 +02:00
|
|
|
tree/tree_iterator.hh
|
2010-10-23 04:05:55 +00:00
|
|
|
)
|
|
|
|
|
|
2019-04-14 15:18:44 +02:00
|
|
|
set(LIB
|
Anim: replace Bone Groups & Armature Layers with Bone Collections
Armature layers (the 32 little dots) and bone groups are replaced with
Bone Collections:
- Bone collections are stored on the armature, and have a name that is
unique within that armature.
- An armature can have an arbitrary number of bone collections (instead
of the fixed 32 layers).
- Bones can be assigned to zero or more bone collections.
- Bone collections have a visibility setting, just like objects in scene
collections.
- When a bone is in at least one collection, and all its collections in
are hidden, the bone is hidden. In other cases (in any visible
collection, or in no collection at all), the bone visibility is
determined by its own 'hidden' flag.
- For now, bone collections cannot be nested; they are a flat list just
like bone groups were. Nestability of bone collections is intended to
be implemented in a later 4.x release.
- Since bone collections are defined on the armature, they can be used
from both pose mode and edit mode.
Versioning converts bone groups and armature layers to new bone
collections. Layers that do not contain any bones are skipped. The old
data structures remain in DNA and are unaltered, for limited forward
compatibility. That way at least a save with Blender 4.0 will not
immediately erase the bone group and armature layers and their bone
assignments.
Shortcuts:
- M/Shift+M in pose/edit mode: move to collection (M) and add to
collection (shift+M). This works similar to the M/Shift+M menus for
objects & scene collections.
- Ctrl+G in pose mode shows a port of the old 'bone groups' menu. This
is likely to be removed in the near future, as the functionality
overlaps with the M/Shift+M menus.
This is the first commit of a series; the bone collections feature will
be improved before the Blender 4.0 release. See #108941 for more info.
Pull request: https://projects.blender.org/blender/blender/pulls/109976
2023-08-22 12:15:54 +02:00
|
|
|
PRIVATE bf::animrig
|
2024-12-23 20:08:37 +01:00
|
|
|
PRIVATE bf::blenkernel
|
2023-07-10 22:04:18 +02:00
|
|
|
PRIVATE bf::blenlib
|
2024-12-25 18:40:41 +01:00
|
|
|
PRIVATE bf::blenloader
|
2024-12-25 17:40:25 +01:00
|
|
|
PRIVATE bf::blentranslation
|
2023-11-25 22:51:59 +01:00
|
|
|
PRIVATE bf::depsgraph
|
2023-07-10 15:07:37 +02:00
|
|
|
PRIVATE bf::dna
|
Add more control over ID renaming behavior.
This commit adds low-level logic in BKE to support three behaviors in
case of name conflict when renaming an ID:
1. Always tweak new name of the renamed ID (never modify the other ID
name).
2. Always set requested name in renamed ID, modifying as needed the
other ID name.
3. Only modify the other ID name if it shares the same root name with the
current renamed ID's name.
It also adds quite some changes to IDTemplate, Outliner code, and
RNA-defined UILayout code, and the lower-level UI button API, to allow
for the new behavior defined in the design (i.e. option three from above list).
When renaming from the UI either 'fails' (falls back to adjusted name) or forces
renaming another ID, an INFO report is displayed.
This commit also fixes several issues in existing code, especially
regarding undo handling in rename operations (which could lead to saving
the wrong name in undo step, and/or over-generating undo steps).
API wise, the bahavior when directly assigning a name to the `ID.name`
property remains unchanged (option one from the list above). But a new
API call `ID.rename` has been added, which offers all three behaviors.
Unittests were added to cover the new implemented behaviors (both at
BKE level, and the RNA/Py API).
This commit implements #119139 design.
Pull Request: https://projects.blender.org/blender/blender/pulls/126996
2024-09-20 13:36:50 +02:00
|
|
|
bf_editor_id_management
|
2019-04-16 06:18:52 +02:00
|
|
|
bf_editor_undo
|
2024-12-23 21:38:19 +01:00
|
|
|
PRIVATE bf::gpu
|
2024-12-25 23:32:15 +01:00
|
|
|
PRIVATE bf::imbuf
|
2023-11-24 17:12:24 +01:00
|
|
|
PRIVATE bf::intern::clog
|
2023-07-10 18:44:19 +02:00
|
|
|
PRIVATE bf::intern::guardedalloc
|
2025-04-15 18:03:25 +02:00
|
|
|
PRIVATE bf::nodes
|
2024-12-27 17:44:02 +01:00
|
|
|
PRIVATE bf::sequencer
|
2024-12-24 22:40:38 +01:00
|
|
|
PRIVATE bf::windowmanager
|
2024-02-09 15:24:07 +01:00
|
|
|
extern_fmtlib
|
2019-04-14 15:18:44 +02:00
|
|
|
)
|
|
|
|
|
|
2014-10-07 15:46:19 -05:00
|
|
|
|
2019-04-14 15:18:44 +02:00
|
|
|
blender_add_lib(bf_editor_space_outliner "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
2025-01-02 19:56:24 +01:00
|
|
|
|
|
|
|
|
# RNA_prototypes.hh dna_type_offsets.h
|
|
|
|
|
add_dependencies(bf_editor_space_outliner bf_rna)
|