Blender V5.3
tree_element_overrides.hh
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#pragma once
10
11#include "RNA_types.hh"
12
13#include "BLI_string_ref.hh"
14
15#include "DNA_outliner_types.h"
16
17#include "tree_element.hh"
18
19namespace blender {
20
21struct ID;
24
25namespace ed::outliner {
26
32
34
35 /* In case the property references a specific operation. Only used for collection overrides
36 * currently, where a single override may add/remove multiple collection items (only add
37 * currently). */
39};
40
42 public:
44
46
48
51 static ID *owner_id(ID &id)
52 {
53 return &id;
54 }
55
56 void expand(SpaceOutliner & /*soops*/) const override;
57
58 StringRefNull get_warning() const override;
59};
60
67 public:
70
73
75
77
80 static ID *owner_id(TreeElementOverridesData &override_data);
81
82 StringRefNull get_warning() const override;
83
84 std::optional<BIFIconID> get_icon() const override
85 {
86 return ICON_LIBRARY_DATA_OVERRIDE;
87 }
88
91};
92
103 std::unique_ptr<IDOverrideLibraryPropertyOperation> operation_;
104
105 public:
107
110 static ID *owner_id(TreeElementOverridesData &override_data);
111
113 TreeElementOverridesData &override_data);
114
127
128 std::optional<BIFIconID> get_icon() const override;
129
131 short get_operation_type() const;
132
138 ID &id, IDOverrideLibraryProperty &override_property) const;
139
140 private:
141 std::optional<PointerRNA> get_collection_ptr() const;
142};
143
144} // namespace ed::outliner
145} // namespace blender
#define final(a, b, c)
Definition BLI_hash_c.hh:21
TreeElementOverridesPropertyOperation(TreeElement &legacy_te, TreeElementOverridesData &override_data)
static ID * owner_id(TreeElementOverridesData &override_data)
IDOverrideLibraryPropertyOperation * get_override_operation_from_id(ID &id, IDOverrideLibraryProperty &override_property) const
TreeElementOverridesProperty(TreeElement &legacy_te, TreeElementOverridesData &override_data)
IDOverrideLibraryProperty * get_override_property_from_id(ID &id) const
static ID * owner_id(TreeElementOverridesData &override_data)
std::optional< BIFIconID > get_icon() const override
BMesh Iterators.
@ TSE_LIBRARY_OVERRIDE_BASE
@ TSE_LIBRARY_OVERRIDE_OPERATION