Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_tree.cc')
-rw-r--r--source/blender/editors/space_outliner/outliner_tree.cc38
1 files changed, 17 insertions, 21 deletions
diff --git a/source/blender/editors/space_outliner/outliner_tree.cc b/source/blender/editors/space_outliner/outliner_tree.cc
index eb885eba20d..60f5437ad88 100644
--- a/source/blender/editors/space_outliner/outliner_tree.cc
+++ b/source/blender/editors/space_outliner/outliner_tree.cc
@@ -32,9 +32,9 @@
#include "DNA_camera_types.h"
#include "DNA_collection_types.h"
#include "DNA_constraint_types.h"
+#include "DNA_curves_types.h"
#include "DNA_gpencil_modifier_types.h"
#include "DNA_gpencil_types.h"
-#include "DNA_hair_types.h"
#include "DNA_key_types.h"
#include "DNA_light_types.h"
#include "DNA_lightprobe_types.h"
@@ -217,7 +217,7 @@ void outliner_free_tree_element(TreeElement *element, ListBase *parent_subtree)
if (element->flag & TE_FREE_NAME) {
MEM_freeN((void *)element->name);
}
- element->type = nullptr;
+ element->abstract_element = nullptr;
MEM_delete(element);
}
@@ -302,10 +302,6 @@ static void outliner_add_object_contents(SpaceOutliner *space_outliner,
/* FIXME: add a special type for this. */
outliner_add_element(space_outliner, &te->subtree, ob->poselib, te, TSE_SOME_ID, 0);
- if (ob->proxy && !ID_IS_LINKED(ob)) {
- outliner_add_element(space_outliner, &te->subtree, ob->proxy, te, TSE_PROXY, 0);
- }
-
outliner_add_element(space_outliner, &te->subtree, ob->data, te, TSE_SOME_ID, 0);
if (ob->pose) {
@@ -777,10 +773,10 @@ static void outliner_add_id_contents(SpaceOutliner *space_outliner,
}
break;
}
- case ID_HA: {
- Hair *hair = (Hair *)id;
- if (outliner_animdata_test(hair->adt)) {
- outliner_add_element(space_outliner, &te->subtree, hair, te, TSE_ANIM_DATA, 0);
+ case ID_CV: {
+ Curves *curves = (Curves *)id;
+ if (outliner_animdata_test(curves->adt)) {
+ outliner_add_element(space_outliner, &te->subtree, curves, te, TSE_ANIM_DATA, 0);
}
break;
}
@@ -860,10 +856,10 @@ TreeElement *outliner_add_element(SpaceOutliner *space_outliner,
te->parent = parent;
te->index = index; /* For data arrays. */
- /* New C++ based type handle. Only some support this, eventually this should replace
- * `TreeElement` entirely. */
- te->type = AbstractTreeElement::createFromType(type, *te, idv);
- if (te->type) {
+ /* New inheritance based element representation. Not all element types support this yet,
+ * eventually it should replace #TreeElement entirely. */
+ te->abstract_element = AbstractTreeElement::createFromType(type, *te, idv);
+ if (te->abstract_element) {
/* Element types ported to the new design are expected to have their name set at this point! */
BLI_assert(te->name != nullptr);
}
@@ -887,12 +883,12 @@ TreeElement *outliner_add_element(SpaceOutliner *space_outliner,
/* pass */
}
else if (type == TSE_SOME_ID) {
- if (!te->type) {
+ if (!te->abstract_element) {
BLI_assert_msg(0, "Expected this ID type to be ported to new Outliner tree-element design");
}
}
else if (ELEM(type, TSE_LIBRARY_OVERRIDE_BASE, TSE_LIBRARY_OVERRIDE)) {
- if (!te->type) {
+ if (!te->abstract_element) {
BLI_assert_msg(0,
"Expected override types to be ported to new Outliner tree-element design");
}
@@ -903,20 +899,20 @@ TreeElement *outliner_add_element(SpaceOutliner *space_outliner,
/* The new type design sets the name already, don't override that here. We need to figure out
* how to deal with the idcode for non-TSE_SOME_ID types still. Some rely on it... */
- if (!te->type) {
+ if (!te->abstract_element) {
te->name = id->name + 2; /* Default, can be overridden by Library or non-ID data. */
}
te->idcode = GS(id->name);
}
- if (te->type && te->type->isExpandValid()) {
- tree_element_expand(*te->type, *space_outliner);
+ if (te->abstract_element && te->abstract_element->isExpandValid()) {
+ tree_element_expand(*te->abstract_element, *space_outliner);
}
else if (type == TSE_SOME_ID) {
/* ID types not (fully) ported to new design yet. */
- if (te->type->expandPoll(*space_outliner)) {
+ if (te->abstract_element->expandPoll(*space_outliner)) {
outliner_add_id_contents(space_outliner, te, tselem, id);
- te->type->postExpand(*space_outliner);
+ te->abstract_element->postExpand(*space_outliner);
}
}
else if (ELEM(type,