Blender
V5.0
source
blender
editors
space_outliner
tree
tree_element_id_library.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 "
BLT_translation.hh
"
10
11
#include "
BKE_library.hh
"
12
13
#include "
DNA_ID.h
"
14
15
#include "
../outliner_intern.hh
"
16
17
#include "
tree_element_id_library.hh
"
18
19
namespace
blender::ed::outliner
{
20
21
TreeElementIDLibrary::TreeElementIDLibrary
(
TreeElement
&legacy_te,
Library
&library)
22
:
TreeElementID
(legacy_te, library.id)
23
{
24
legacy_te.
name
= library.
filepath
;
25
}
26
27
StringRefNull
TreeElementIDLibrary::get_warning
()
const
28
{
29
Library
&library =
reinterpret_cast<
Library
&
>
(
id_
);
30
31
if
(library.
runtime
->tag &
LIBRARY_TAG_RESYNC_REQUIRED
) {
32
return
RPT_
(
33
"Contains linked library overrides that need to be resynced, updating the library is "
34
"recommended"
);
35
}
36
37
if
(library.
id
.
tag
&
ID_TAG_MISSING
) {
38
return
RPT_
(
"Missing library"
);
39
}
40
41
return
{};
42
}
43
44
}
// namespace blender::ed::outliner
BKE_library.hh
LIBRARY_TAG_RESYNC_REQUIRED
@ LIBRARY_TAG_RESYNC_REQUIRED
Definition
BKE_library.hh:114
BLT_translation.hh
RPT_
#define RPT_(msgid)
Definition
BLT_translation.hh:50
DNA_ID.h
ID and Library types, which are fundamental for SDNA.
ID_TAG_MISSING
@ ID_TAG_MISSING
Definition
DNA_ID.h:867
blender::StringRefNull
Definition
BLI_string_ref.hh:132
blender::ed::outliner::TreeElementIDLibrary::TreeElementIDLibrary
TreeElementIDLibrary(TreeElement &legacy_te, Library &library)
Definition
tree_element_id_library.cc:21
blender::ed::outliner::TreeElementIDLibrary::get_warning
blender::StringRefNull get_warning() const override
Definition
tree_element_id_library.cc:27
blender::ed::outliner::TreeElementID::TreeElementID
TreeElementID(TreeElement &legacy_te, ID &id)
Definition
tree_element_id.cc:103
blender::ed::outliner::TreeElementID::id_
ID & id_
Definition
tree_element_id.hh:22
blender::ed::outliner
Definition
outliner_collections.cc:44
outliner_intern.hh
ID::tag
int tag
Definition
DNA_ID.h:442
Library
Definition
DNA_ID.h:544
Library::filepath
char filepath[1024]
Definition
DNA_ID.h:552
Library::id
ID id
Definition
DNA_ID.h:550
Library::runtime
LibraryRuntimeHandle * runtime
Definition
DNA_ID.h:579
blender::ed::outliner::TreeElement
Definition
outliner_intern.hh:87
blender::ed::outliner::TreeElement::name
const char * name
Definition
outliner_intern.hh:105
tree_element_id_library.hh
Generated on
for Blender by
doxygen
1.16.1