diff options
author | Julian Eisel <julian@blender.org> | 2022-01-26 16:59:22 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2022-01-26 21:15:57 +0300 |
commit | da1b6c4c02d5390df08f710d01b9d7628478d089 (patch) | |
tree | 5450256e461209e1f1ea27754acc79cb15bc8e34 /source/blender/editors/space_outliner/outliner_tree.cc | |
parent | d74c2b5c1f235fafa8ba9045e59815406c37993f (diff) |
Outliner: Port sequencer elements to new tree-element design
Continuation of work started in 2e221de4ceee and 249e4df110e0.
Adds new tree-element classes for sequences, strips and strip
duplicates.
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_tree.cc')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_tree.cc | 53 |
1 files changed, 4 insertions, 49 deletions
diff --git a/source/blender/editors/space_outliner/outliner_tree.cc b/source/blender/editors/space_outliner/outliner_tree.cc index 8ad40b503bd..eb885eba20d 100644 --- a/source/blender/editors/space_outliner/outliner_tree.cc +++ b/source/blender/editors/space_outliner/outliner_tree.cc @@ -928,57 +928,12 @@ TreeElement *outliner_add_element(SpaceOutliner *space_outliner, TSE_GP_LAYER, TSE_RNA_STRUCT, TSE_RNA_PROPERTY, - TSE_RNA_ARRAY_ELEM)) { + TSE_RNA_ARRAY_ELEM, + TSE_SEQUENCE, + TSE_SEQ_STRIP, + TSE_SEQUENCE_DUP)) { BLI_assert_msg(false, "Element type should already use new AbstractTreeElement design"); } - else if (type == TSE_SEQUENCE) { - Sequence *seq = (Sequence *)idv; - - /* - * The idcode is a little hack, but the outliner - * only check te->idcode if te->type is equal to zero, - * so this is "safe". - */ - te->idcode = seq->type; - te->directdata = seq; - te->name = seq->name + 2; - - if (!(seq->type & SEQ_TYPE_EFFECT)) { - /* - * This work like the sequence. - * If the sequence have a name (not default name) - * show it, in other case put the filename. - */ - - if (seq->type == SEQ_TYPE_META) { - LISTBASE_FOREACH (Sequence *, p, &seq->seqbase) { - outliner_add_element(space_outliner, &te->subtree, (void *)p, te, TSE_SEQUENCE, index); - } - } - else { - outliner_add_element( - space_outliner, &te->subtree, (void *)seq->strip, te, TSE_SEQ_STRIP, index); - } - } - } - else if (type == TSE_SEQ_STRIP) { - Strip *strip = (Strip *)idv; - - if (strip->dir[0] != '\0') { - te->name = strip->dir; - } - else { - te->name = IFACE_("Strip None"); - } - te->directdata = strip; - } - else if (type == TSE_SEQUENCE_DUP) { - Sequence *seq = (Sequence *)idv; - - te->idcode = seq->type; - te->directdata = seq; - te->name = seq->strip->stripdata->name; - } if (tree_element_warnings_get(te, nullptr, nullptr)) { te->flag |= TE_HAS_WARNING; |