Blender V5.0
tree_element_id_mesh.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_mesh_types.h"
10#include "DNA_outliner_types.h"
11
12#include "../outliner_intern.hh"
13
15
16namespace blender::ed::outliner {
17
22
23void TreeElementIDMesh::expand(SpaceOutliner & /*space_outliner*/) const
24{
25 expand_animation_data(mesh_.adt);
26
27 expand_key();
28 expand_materials();
29}
30
31void TreeElementIDMesh::expand_key() const
32{
34 reinterpret_cast<ID *>(mesh_.key),
35 nullptr,
38 0);
39}
40
41void TreeElementIDMesh::expand_materials() const
42{
43 for (int a = 0; a < mesh_.totcol; a++) {
45 reinterpret_cast<ID *>(mesh_.mat[a]),
46 nullptr,
49 a);
50 }
51}
52
53} // namespace blender::ed::outliner
@ TSE_SOME_ID
TreeElement * add_element(ListBase *lb, ID *owner_id, void *create_data, TreeElement *parent, short type, short index, const bool expand=true) const
void expand(SpaceOutliner &) const override
TreeElementIDMesh(TreeElement &legacy_te_, Mesh &mesh)
TreeElementID(TreeElement &legacy_te, ID &id)
void expand_animation_data(AnimData *) const
Definition DNA_ID.h:414
struct Material ** mat
short totcol
struct Key * key