Blender V5.0
tree_element_id_curve.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_curve_types.h"
10#include "DNA_outliner_types.h"
11
12#include "../outliner_intern.hh"
13
15
16namespace blender::ed::outliner {
17
19 : TreeElementID(legacy_te, curve.id), curve_(curve)
20{
21}
22
23void TreeElementIDCurve::expand(SpaceOutliner & /*space_outliner*/) const
24{
25 expand_animation_data(curve_.adt);
26
27 expand_materials();
28}
29
30void TreeElementIDCurve::expand_materials() const
31{
32 for (int a = 0; a < curve_.totcol; a++) {
34 reinterpret_cast<ID *>(curve_.mat[a]),
35 nullptr,
38 a);
39 }
40}
41
42} // 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
TreeElementIDCurve(TreeElement &legacy_te, Curve &curve)
void expand(SpaceOutliner &) const override
TreeElementID(TreeElement &legacy_te, ID &id)
void expand_animation_data(AnimData *) const
struct Material ** mat
short totcol
Definition DNA_ID.h:414