Blender V5.0
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
18
19namespace blender::ed::outliner {
20
22 : TreeElementID(legacy_te, library.id)
23{
24 legacy_te.name = library.filepath;
25}
26
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
@ LIBRARY_TAG_RESYNC_REQUIRED
#define RPT_(msgid)
ID and Library types, which are fundamental for SDNA.
@ ID_TAG_MISSING
Definition DNA_ID.h:867
TreeElementIDLibrary(TreeElement &legacy_te, Library &library)
blender::StringRefNull get_warning() const override
TreeElementID(TreeElement &legacy_te, ID &id)
int tag
Definition DNA_ID.h:442
char filepath[1024]
Definition DNA_ID.h:552
ID id
Definition DNA_ID.h:550
LibraryRuntimeHandle * runtime
Definition DNA_ID.h:579