Blender V5.3
tree_element_id_linestyle.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_ID.h"
10#include "DNA_linestyle_types.h"
11#include "DNA_outliner_types.h"
12#include "DNA_texture_types.h"
13
14#include "../outliner_intern.hh"
15
16#include "tree_display.hh"
18
19namespace blender::ed::outliner {
20
22 FreestyleLineStyle &linestyle)
23 : TreeElementID(legacy_te, linestyle.id), linestyle_(linestyle)
24{
25}
26
27void TreeElementIDLineStyle::expand(SpaceOutliner & /*space_outliner*/) const
28{
29 expand_animation_data(linestyle_.adt);
30
31 expand_textures();
32}
33
34void TreeElementIDLineStyle::expand_textures() const
35{
36 for (int a = 0; a < MAX_MTEX; a++) {
37 if (linestyle_.mtex[a]) {
38 add_id_element({.index = a}, reinterpret_cast<ID *>((linestyle_.mtex[a])->tex));
39 }
40 }
41}
42
43} // namespace blender::ed::outliner
ID and Library types, which are fundamental for SDNA.
#define MAX_MTEX
Definition Stroke.h:31
TreeElement * add_id_element(const TreeElementAddParams &params, ID *id) const
TreeElementIDLineStyle(TreeElement &legacy_te, FreestyleLineStyle &linestyle)
TreeElementID(TreeElement &legacy_te, ID &id)
void expand_animation_data(AnimData *) const
Establish and manage Outliner trees for different display modes.