Blender V5.3
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
14#include "tree_display.hh"
16
17namespace blender::ed::outliner {
18
20 : TreeElementID(legacy_te, curve.id), curve_(curve)
21{
22}
23
24void TreeElementIDCurve::expand(SpaceOutliner & /*space_outliner*/) const
25{
26 expand_animation_data(curve_.adt);
27
28 expand_materials();
29}
30
31void TreeElementIDCurve::expand_materials() const
32{
33 for (int a = 0; a < curve_.totcol; a++) {
34 add_id_element({.index = a}, reinterpret_cast<ID *>(curve_.mat[a]));
35 }
36}
37
38} // namespace blender::ed::outliner
TreeElement * add_id_element(const TreeElementAddParams &params, ID *id) 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
Establish and manage Outliner trees for different display modes.