Blender V5.3
tree_element_id_metaball.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#include "DNA_meta_types.h"
10#include "DNA_outliner_types.h"
11
12#include "../outliner_intern.hh"
13
14#include "tree_display.hh"
16
17namespace blender::ed::outliner {
18
20 : TreeElementID(legacy_te, metaball.id), metaball_(metaball)
21{
22}
23
24void TreeElementIDMetaBall::expand(SpaceOutliner & /*space_outliner*/) const
25{
26 expand_animation_data(metaball_.adt);
27
28 expand_materials();
29}
30
31void TreeElementIDMetaBall::expand_materials() const
32{
33 for (int a = 0; a < metaball_.totcol; a++) {
34 add_id_element({.index = a}, reinterpret_cast<ID *>(metaball_.mat[a]));
35 }
36}
37
38} // namespace blender::ed::outliner
TreeElement * add_id_element(const TreeElementAddParams &params, ID *id) const
TreeElementIDMetaBall(TreeElement &legacy_te, MetaBall &metaball)
TreeElementID(TreeElement &legacy_te, ID &id)
void expand_animation_data(AnimData *) const
struct Material ** mat
Establish and manage Outliner trees for different display modes.