Blender V5.0
BKE_blendfile_link_append.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#pragma once
5
9
10#include <list>
11#include <string>
12
13#include "BLI_bit_vector.hh"
14#include "BLI_function_ref.hh"
15#include "BLI_map.hh"
16
17#include "BLO_readfile.hh"
18
19struct BlendHandle;
20struct ID;
21struct Library;
24struct ReportList;
25
26/* TODO: Rename file to `BKE_blendfile_import.hh`. */
27/* TODO: Replace `BlendfileLinkAppend` prefix by `blender::bke::blendfile::import` namespace. */
28/* TODO: Move these enums to scoped enum classes. */
29
31enum {
37};
38
40enum {
58};
59
60/* NOTE: These three structs are currently exposed in header to allow for their usage in RNA.
61 * Regular C++ code should not access their content directly.
62 *
63 * TODO: Refactor these three structs into classes, and integrated the whole API into them. */
65
110
122
134 std::list<BlendfileLinkAppendContextItem> items;
135 using items_iterator_t = std::list<BlendfileLinkAppendContextItem>::iterator;
138
143 enum class ProcessStage {
148 Init = 0,
166
167 /* NOTE: For the time being, liboverride step is not considered here (#BKE_blendfile_override).
168 * Mainly because it is only available through the BPY API currently. */
169 };
171
174
177
179 const void *blendfile_mem = nullptr;
181};
182
200 int flag,
201 bool do_set);
202
210 BlendfileLinkAppendContext *lapp_context, const void *blendfile_mem, int blendfile_memsize);
213 BlendfileLinkAppendContext *lapp_context);
214
228 const char *libname,
229 BlendHandle *blo_handle);
241 BlendfileLinkAppendContext *lapp_context, const char *idname, short idcode, void *userdata);
242
243#define BLENDFILE_LINK_APPEND_INVALID -1
259 BlendfileLinkAppendContext *lapp_context,
260 ReportList *reports,
261 uint64_t id_types_filter,
262 int library_index);
263
269 BlendfileLinkAppendContext *lapp_context,
271 int library_index);
276
287 ID *new_id);
292
305
315 BlendfileLinkAppendContext *lapp_context,
322 BlendfileLinkAppendContextItem *item)> callback_function,
324
331
335void BKE_blendfile_link(BlendfileLinkAppendContext *lapp_context, ReportList *reports);
336
344
353
358 ReportList *reports);
359
366
389
403 const eBKELibLinkOverride flags,
404 ReportList *reports);
405
429 ReportList *reports,
430 Library *library,
431 bool do_reload);
432
external readfile function prototypes.
unsigned long long int uint64_t
uiWidgetBaseParameters params[MAX_WIDGET_BASE_BATCH]
BlendfileLinkAppendContext * lapp_context
MainLibraryWeakReferenceMap * library_weak_reference_mapping
std::list< BlendfileLinkAppendContextItem >::iterator items_iterator_t
blender::Map< ID *, BlendfileLinkAppendContextItem * > new_id_to_item
blender::Vector< BlendfileLinkAppendContextLibrary > libraries
std::list< BlendfileLinkAppendContextItem > items
Definition DNA_ID.h:414
uint8_t flag
Definition wm_window.cc:145