Blender V5.0
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
17
18namespace blender::ed::outliner {
19
21 FreestyleLineStyle &linestyle)
22 : TreeElementID(legacy_te, linestyle.id), linestyle_(linestyle)
23{
24}
25
26void TreeElementIDLineStyle::expand(SpaceOutliner & /*space_outliner*/) const
27{
28 expand_animation_data(linestyle_.adt);
29
30 expand_textures();
31}
32
33void TreeElementIDLineStyle::expand_textures() const
34{
35 for (int a = 0; a < MAX_MTEX; a++) {
36 if (linestyle_.mtex[a]) {
38 reinterpret_cast<ID *>((linestyle_.mtex[a])->tex),
39 nullptr,
42 a);
43 }
44 }
45}
46
47} // namespace blender::ed::outliner
ID and Library types, which are fundamental for SDNA.
@ TSE_SOME_ID
#define MAX_MTEX
Definition Stroke.h:31
TreeElement * add_element(ListBase *lb, ID *owner_id, void *create_data, TreeElement *parent, short type, short index, const bool expand=true) const
TreeElementIDLineStyle(TreeElement &legacy_te, FreestyleLineStyle &linestyle)
TreeElementID(TreeElement &legacy_te, ID &id)
void expand_animation_data(AnimData *) const
struct MTex * mtex[18]
Definition DNA_ID.h:414