28void rna_BlendImportContextLibrary_filepath_get(
PointerRNA *
ptr,
char *value)
32 const size_t str_len = ctx_lib->
path.length();
36int rna_BlendImportContextLibrary_filepath_len(
PointerRNA *
ptr)
40 return int(ctx_lib->
path.length());
43void rna_BlendImportContextItem_name_get(
PointerRNA *
ptr,
char *value)
47 const size_t str_len = ctx_item->
name.length();
55 return int(ctx_item->
name.length());
65struct RNABlendImportContextItemLibrariesIterator {
77 RNABlendImportContextItemLibrariesIterator *libs_iter =
78 MEM_new<RNABlendImportContextItemLibrariesIterator>(
79 __func__, RNABlendImportContextItemLibrariesIterator{ctx_item, libraries.
begin(), 0});
81 while (!(*libs_iter->iter) && libs_iter->iter != libs_iter->ctx_item->libraries.end()) {
82 libs_iter->iter.operator++();
83 libs_iter->iter_index++;
85 iter->
valid = (libs_iter->iter != libs_iter->ctx_item->libraries.end());
90 RNABlendImportContextItemLibrariesIterator *libs_iter =
91 static_cast<RNABlendImportContextItemLibrariesIterator *
>(iter->
internal.
custom);
93 libs_iter->iter.operator++();
94 libs_iter->iter_index++;
95 }
while (!(*libs_iter->iter) && libs_iter->iter != libs_iter->ctx_item->libraries.end());
96 iter->
valid = (libs_iter->iter != libs_iter->ctx_item->libraries.end());
101 RNABlendImportContextItemLibrariesIterator *libs_iter =
102 static_cast<RNABlendImportContextItemLibrariesIterator *
>(iter->
internal.
custom);
106 MEM_delete(libs_iter);
111 RNABlendImportContextItemLibrariesIterator *libs_iter =
112 static_cast<RNABlendImportContextItemLibrariesIterator *
>(iter->
internal.
custom);
115 libs_iter->ctx_item->lapp_context->libraries[libs_iter->iter_index];
134int rna_BlendImportContextItem_append_action_get(
PointerRNA *
ptr)
141int rna_BlendImportContextItem_import_info_get(
PointerRNA *
ptr)
145 return int(ctx_item->
tag);
176struct RNABlendImportContextItemsIterator {
185 RNABlendImportContextItemsIterator *items_iter = MEM_new<RNABlendImportContextItemsIterator>(
186 __func__, RNABlendImportContextItemsIterator{ctx, ctx->
items.begin()});
188 iter->
valid = (items_iter->iter != items_iter->ctx->items.end());
193 RNABlendImportContextItemsIterator *items_iter =
194 static_cast<RNABlendImportContextItemsIterator *
>(iter->
internal.
custom);
196 iter->
valid = (items_iter->iter != items_iter->ctx->items.end());
201 RNABlendImportContextItemsIterator *items_iter =
202 static_cast<RNABlendImportContextItemsIterator *
>(iter->
internal.
custom);
206 MEM_delete(items_iter);
211 RNABlendImportContextItemsIterator *items_iter =
212 static_cast<RNABlendImportContextItemsIterator *
>(iter->
internal.
custom);
243 srna =
RNA_def_struct(brna,
"BlendImportContextLibrary",
nullptr);
246 "Blendfile Import Context Library",
247 "Library (blendfile) reference in a BlendImportContext data. Currently only "
248 "exposed as read-only data for the pre/post blendimport handlers");
255 "rna_BlendImportContextLibrary_filepath_get",
256 "rna_BlendImportContextLibrary_filepath_len",
267 srna =
RNA_def_struct(brna,
"BlendImportContextLibraries",
nullptr);
269 "Blendfile Import Context Libraries",
270 "Collection of source libraries, i.e. blendfile paths");
281 "Blendfile Import Context Item",
282 "An item (representing a data-block) in a BlendImportContext data. Currently only "
283 "exposed as read-only data for the pre/post linking handlers");
291 prop,
"rna_BlendImportContextItem_name_get",
"rna_BlendImportContextItem_name_len",
nullptr);
304 "List of libraries to search and import that ID from. The ID will be "
305 "imported from the first file in that list that contains it");
307 "rna_BlendImportContextItem_libraries_begin",
308 "rna_BlendImportContextItem_libraries_next",
309 "rna_BlendImportContextItem_libraries_end",
310 "rna_BlendImportContextItem_libraries_get",
311 "rna_BlendImportContextItem_libraries_len",
324 "An existing matching local ID has been re-used"},
330 "The linked ID had other unrelated usages, so it has been duplicated into a local copy"},
331 {0,
nullptr, 0,
nullptr,
nullptr},
338 "How this item has been handled by the append operation. Only set if "
339 "the data has been appended");
341 prop,
"rna_BlendImportContextItem_append_action_get",
nullptr,
nullptr);
348 "That item was added for an indirectly imported ID, as a dependency of another data-block"},
350 "LIBOVERRIDE_DEPENDENCY",
353 "That item represents an ID also used as liboverride dependency (either directly, as a "
354 "liboverride reference, or indirectly, as data used by a liboverride reference). It should "
355 "never be directly made local. Mutually exclusive with `LIBOVERRIDE_DEPENDENCY_ONLY`"},
357 "LIBOVERRIDE_DEPENDENCY_ONLY",
360 "That item represents an ID only used as liboverride dependency (either directly or "
361 "indirectly, see `LIBOVERRIDE_DEPENDENCY` for precisions). It should not be considered "
362 "during the 'make local' (append) process, and remain purely linked data. Mutually "
363 "exclusive with `LIBOVERRIDE_DEPENDENCY`"},
364 {0,
nullptr, 0,
nullptr,
nullptr},
371 prop,
"Import Info",
"Various status info about an item after it has been imported");
373 prop,
"rna_BlendImportContextItem_import_info_get",
nullptr,
nullptr);
380 "The imported ID. None until it has been linked or appended. "
381 "May be the same as ``reusable_local_id`` when appended");
383 prop,
"rna_BlendImportContextItem_id_get",
nullptr,
nullptr,
nullptr);
390 "Library ID representing the blendfile from which the ID was imported. "
391 "None until the ID has been linked or appended");
393 prop,
"rna_BlendImportContextItem_source_library_get",
nullptr,
nullptr,
nullptr);
400 "Library Overridden ID",
401 "The library override of the linked ID. None until it has been created");
403 prop,
"rna_BlendImportContextItem_library_override_id_get",
nullptr,
nullptr,
nullptr);
410 "The already existing local ID that may be reused in append & reuse "
411 "case. None until it has been found");
413 prop,
"rna_BlendImportContextItem_reusable_local_id_get",
nullptr,
nullptr,
nullptr);
425 srna,
"Blendfile Import Context Items",
"Collection of blendfile import context items");
438 "Blendfile Import Context",
439 "Contextual data for a blendfile library/linked-data related operation. Currently "
440 "only exposed as read-only data for the pre/post blendimport handlers");
449 "rna_BlendImportContext_import_items_begin",
450 "rna_BlendImportContext_import_items_next",
451 "rna_BlendImportContext_import_items_end",
452 "rna_BlendImportContext_import_items_get",
453 "rna_BlendImportContext_import_items_len",
460 {
FILE_LINK,
"LINK", 0,
"",
"Only link data, instead of appending it"},
462 "MAKE_PATHS_RELATIVE",
465 "Make paths of used library blendfiles relative to current blendfile"},
470 "Generate a placeholder (empty ID) if not found in any library files"},
475 "Force loaded ID to be tagged as indirectly linked (used in reload context only)"},
477 "APPEND_SET_FAKEUSER",
480 "Set fake user on appended IDs"},
485 "Append (make local) also indirect dependencies of appended IDs coming from other "
486 "libraries. NOTE: All IDs (including indirectly linked ones) coming from the same initial "
487 "library are always made local"},
489 "APPEND_LOCAL_ID_REUSE",
492 "Try to re-use previously appended matching IDs when appending them again, instead of "
493 "creating local duplicates"},
495 "APPEND_ASSET_DATA_CLEAR",
498 "Clear the asset data on append (it is always kept for linked data)"},
499 {
FILE_AUTOSELECT,
"SELECT_OBJECTS", 0,
"",
"Automatically select imported objects"},
501 "USE_ACTIVE_COLLECTION",
504 "Use the active Collection of the current View Layer to instantiate imported "
505 "collections and objects"},
510 "Instantiate object data IDs (i.e. create objects for them if needed)"},
512 "COLLECTION_INSTANCE",
515 "Instantiate collections as empties, instead of linking them into the current view layer"},
516 {0,
nullptr, 0,
nullptr,
nullptr},
531 "Blendfile import context has been initialized and filled with a list of items to import, "
532 "no data has been linked or appended yet"},
537 "All data has been imported and is available in the list of ``import_items``"},
538 {0,
nullptr, 0,
nullptr,
nullptr},
@ LINK_APPEND_ACT_MAKE_LOCAL
@ LINK_APPEND_ACT_REUSE_LOCAL
@ LINK_APPEND_ACT_KEEP_LINKED
@ LINK_APPEND_ACT_COPY_LOCAL
@ LINK_APPEND_TAG_INDIRECT
@ LINK_APPEND_TAG_LIBOVERRIDE_DEPENDENCY_ONLY
@ LINK_APPEND_TAG_LIBOVERRIDE_DEPENDENCY
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
external readfile function prototypes.
@ BLO_LIBLINK_APPEND_RECURSIVE
@ BLO_LIBLINK_USE_PLACEHOLDERS
@ BLO_LIBLINK_APPEND_ASSET_DATA_CLEAR
@ BLO_LIBLINK_OBDATA_INSTANCE
@ BLO_LIBLINK_APPEND_SET_FAKEUSER
@ BLO_LIBLINK_FORCE_INDIRECT
@ BLO_LIBLINK_APPEND_LOCAL_ID_REUSE
@ BLO_LIBLINK_COLLECTION_INSTANCE
constexpr PointerRNA PointerRNA_NULL
BitIterator begin() const
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
const EnumPropertyItem rna_enum_id_type_items[]
PointerRNA rna_pointer_inherit_refine(const PointerRNA *ptr, StructRNA *type, void *data)
static void rna_def_blendfile_import_context(BlenderRNA *brna)
static void rna_def_blendfile_import_library(BlenderRNA *brna)
static void RNA_def_blendfile_import_libraries(BlenderRNA *brna, PropertyRNA *cprop)
static void rna_def_blendfile_import_items(BlenderRNA *brna, PropertyRNA *cprop)
void RNA_def_blendfile_import(BlenderRNA *brna)
static void rna_def_blendfile_import_item(BlenderRNA *brna)
void RNA_def_property_string_funcs(PropertyRNA *prop, const char *get, const char *length, const char *set)
void RNA_define_verify_sdna(bool verify)
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
void RNA_def_property_srna(PropertyRNA *prop, const char *type)
void RNA_def_property_collection_funcs(PropertyRNA *prop, const char *begin, const char *next, const char *end, const char *get, const char *length, const char *lookupint, const char *lookupstring, const char *assignint)
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char *set, const char *item)
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_pointer_funcs(PropertyRNA *prop, const char *get, const char *set, const char *type_fn, const char *poll)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
blender::BitVector libraries
LibraryLink_Params * params
std::list< BlendfileLinkAppendContextItem >::iterator items_iterator_t
ProcessStage process_stage
std::list< BlendfileLinkAppendContextItem > items
union CollectionPropertyIterator::@1329 internal