|
Blender
V2.93
|
#include "zlib.h"#include <ctype.h>#include <fcntl.h>#include <limits.h>#include <stdarg.h>#include <stddef.h>#include <stdlib.h>#include <time.h>#include "BLI_utildefines.h"#include <unistd.h>#include "DNA_anim_types.h"#include "DNA_asset_types.h"#include "DNA_cachefile_types.h"#include "DNA_collection_types.h"#include "DNA_fileglobal_types.h"#include "DNA_genfile.h"#include "DNA_key_types.h"#include "DNA_layer_types.h"#include "DNA_node_types.h"#include "DNA_packedFile_types.h"#include "DNA_sdna_types.h"#include "DNA_sound_types.h"#include "DNA_vfont_types.h"#include "DNA_volume_types.h"#include "DNA_workspace_types.h"#include "MEM_guardedalloc.h"#include "BLI_blenlib.h"#include "BLI_endian_switch.h"#include "BLI_ghash.h"#include "BLI_linklist.h"#include "BLI_math.h"#include "BLI_memarena.h"#include "BLI_mempool.h"#include "BLI_mmap.h"#include "BLI_threads.h"#include "BLT_translation.h"#include "BKE_anim_data.h"#include "BKE_animsys.h"#include "BKE_asset.h"#include "BKE_collection.h"#include "BKE_global.h"#include "BKE_idprop.h"#include "BKE_idtype.h"#include "BKE_layer.h"#include "BKE_lib_id.h"#include "BKE_lib_override.h"#include "BKE_lib_query.h"#include "BKE_main.h"#include "BKE_main_idmap.h"#include "BKE_material.h"#include "BKE_modifier.h"#include "BKE_node.h"#include "BKE_object.h"#include "BKE_packedFile.h"#include "BKE_report.h"#include "BKE_scene.h"#include "BKE_screen.h"#include "BKE_undo_system.h"#include "BKE_workspace.h"#include "DRW_engine.h"#include "DEG_depsgraph.h"#include "BLO_blend_defs.h"#include "BLO_blend_validate.h"#include "BLO_read_write.h"#include "BLO_readfile.h"#include "BLO_undofile.h"#include "SEQ_clipboard.h"#include "SEQ_iterator.h"#include "SEQ_modifier.h"#include "SEQ_sequencer.h"#include "readfile.h"#include <errno.h>Go to the source code of this file.
Classes | |
| struct | BHeadN |
| struct | OldNew |
| struct | OldNewMap |
| struct | BlendDataReader |
| struct | BlendLibReader |
| struct | BlendExpander |
| struct | BLOCacheStorage |
| struct | BHeadSort |
Macros | |
| #define | DNA_DEPRECATED_ALLOW |
| #define | U (*((const UserDef *)&U)) |
| #define | USE_BHEAD_READ_ON_DEMAND |
| #define | USE_GHASH_BHEAD |
| #define | USE_GHASH_RESTORE_POINTER |
| #define | DEBUG_PRINTF(...) |
| #define | BHEADN_FROM_BHEAD(bh) ((BHeadN *)POINTER_OFFSET(bh, -(int)offsetof(BHeadN, bhead))) |
| #define | BHEAD_USE_READ_ON_DEMAND(bhead) ((bhead)->code == DATA) |
Typedefs | |
| typedef struct BHeadN | BHeadN |
Functions | |
| void | BLO_reportf_wrap (ReportList *reports, ReportType type, const char *format,...) |
| static const char * | library_parent_filepath (Library *lib) |
Library Reading | |
| static void | read_libraries (FileData *basefd, ListBase *mainlist) |
| static int | has_linked_ids_to_read (Main *mainvar) |
| static void | read_library_linked_id (FileData *basefd, FileData *fd, Main *mainvar, ID *id, ID **r_id) |
| static void | read_library_linked_ids (FileData *basefd, FileData *fd, ListBase *mainlist, Main *mainvar) |
| static void | read_library_clear_weak_links (FileData *basefd, ListBase *mainlist, Main *mainvar) |
| static FileData * | read_library_file_data (FileData *basefd, ListBase *mainlist, Main *mainl, Main *mainptr) |
| void * | BLO_read_get_new_data_address (BlendDataReader *reader, const void *old_address) |
| void * | BLO_read_get_new_data_address_no_us (BlendDataReader *reader, const void *old_address) |
| void * | BLO_read_get_new_packed_address (BlendDataReader *reader, const void *old_address) |
| ID * | BLO_read_get_new_id_address (BlendLibReader *reader, Library *lib, ID *id) |
| bool | BLO_read_requires_endian_switch (BlendDataReader *reader) |
| void | BLO_read_list_cb (BlendDataReader *reader, ListBase *list, BlendReadListFn callback) |
| void | BLO_read_list (BlendDataReader *reader, struct ListBase *list) |
| void | BLO_read_int32_array (BlendDataReader *reader, int array_size, int32_t **ptr_p) |
| void | BLO_read_uint32_array (BlendDataReader *reader, int array_size, uint32_t **ptr_p) |
| void | BLO_read_float_array (BlendDataReader *reader, int array_size, float **ptr_p) |
| void | BLO_read_float3_array (BlendDataReader *reader, int array_size, float **ptr_p) |
| void | BLO_read_double_array (BlendDataReader *reader, int array_size, double **ptr_p) |
| static void | convert_pointer_array_64_to_32 (BlendDataReader *reader, uint array_size, const uint64_t *src, uint32_t *dst) |
| static void | convert_pointer_array_32_to_64 (BlendDataReader *UNUSED(reader), uint array_size, const uint32_t *src, uint64_t *dst) |
| void | BLO_read_pointer_array (BlendDataReader *reader, void **ptr_p) |
| bool | BLO_read_data_is_undo (BlendDataReader *reader) |
| void | BLO_read_data_globmap_add (BlendDataReader *reader, void *oldaddr, void *newaddr) |
| void | BLO_read_glob_list (BlendDataReader *reader, ListBase *list) |
| ReportList * | BLO_read_data_reports (BlendDataReader *reader) |
| bool | BLO_read_lib_is_undo (BlendLibReader *reader) |
| Main * | BLO_read_lib_get_main (BlendLibReader *reader) |
| ReportList * | BLO_read_lib_reports (BlendLibReader *reader) |
| void | BLO_expand_id (BlendExpander *expander, ID *id) |
DNA Struct Loading | |
| static void * | read_struct (FileData *fd, BHead *bh, const char *blockname) |
| static void | switch_endian_structs (const struct SDNA *filesdna, BHead *bhead) |
| static const void * | peek_struct_undo (FileData *fd, BHead *bhead) |
| static void | link_glob_list (FileData *fd, ListBase *lb) |
Library Linking | |
Also used for append. | |
| static BHead * | find_bhead_from_code_name (FileData *fd, const short idcode, const char *name) |
| static BHead * | find_bhead_from_idname (FileData *fd, const char *idname) |
| static int | verg_bheadsort (const void *v1, const void *v2) |
| static void | sort_bhead_old_map (FileData *fd) |
| static BHead * | find_previous_lib (FileData *fd, BHead *bhead) |
| static BHead * | find_bhead (FileData *fd, void *old) |
| static ID * | is_yet_read (FileData *fd, Main *mainvar, BHead *bhead) |
Library Linking (helper functions) | |
| static bool | library_link_idcode_needs_tag_check (const short idcode, const int flag) |
| static bool | object_in_any_scene (Main *bmain, Object *ob) |
| static bool | object_in_any_collection (Main *bmain, Object *ob) |
| static void | object_base_instance_init (Object *ob, bool set_selected, bool set_active, ViewLayer *view_layer, const View3D *v3d) |
| static void | add_loose_objects_to_scene (Main *mainvar, Main *bmain, Scene *scene, ViewLayer *view_layer, const View3D *v3d, Library *lib, const short flag) |
| static void | add_loose_object_data_to_scene (Main *mainvar, Main *bmain, Scene *scene, ViewLayer *view_layer, const View3D *v3d, const short flag) |
| static void | add_collections_to_scene (Main *mainvar, Main *bmain, Scene *scene, ViewLayer *view_layer, const View3D *v3d, Library *lib, const short flag) |
| static ID * | link_named_part (Main *mainl, FileData *fd, const short idcode, const char *name, const int flag) |
| int | BLO_library_link_copypaste (Main *mainl, BlendHandle *bh, const uint64_t id_types_mask) |
| ID * | BLO_library_link_named_part (Main *mainl, BlendHandle **bh, const short idcode, const char *name, const struct LibraryLink_Params *params) |
| static void | library_link_clear_tag (Main *mainvar, const int flag) |
| static Main * | library_link_begin (Main *mainvar, FileData **fd, const char *filepath, const int flag, const int id_tag_extra) |
| void | BLO_library_link_params_init (struct LibraryLink_Params *params, struct Main *bmain, const int flag, const int id_tag_extra) |
| void | BLO_library_link_params_init_with_context (struct LibraryLink_Params *params, struct Main *bmain, const int flag, const int id_tag_extra, struct Scene *scene, struct ViewLayer *view_layer, const struct View3D *v3d) |
| Main * | BLO_library_link_begin (BlendHandle **bh, const char *filepath, const struct LibraryLink_Params *params) |
| static void | split_main_newid (Main *mainptr, Main *main_newid) |
| static void | library_link_end (Main *mainl, FileData **fd, Main *bmain, const int flag, Scene *scene, ViewLayer *view_layer, const View3D *v3d) |
| void | BLO_library_link_end (Main *mainl, BlendHandle **bh, const struct LibraryLink_Params *params) |
| void * | BLO_library_read_struct (FileData *fd, BHead *bh, const char *blockname) |
Helper Functions | |
| static void | add_main_to_main (Main *mainvar, Main *from) |
| void | blo_join_main (ListBase *mainlist) |
| static void | split_libdata (ListBase *lb_src, Main **lib_main_array, const uint lib_main_array_len) |
| void | blo_split_main (ListBase *mainlist, Main *main) |
| static void | read_file_version (FileData *fd, Main *main) |
| static bool | blo_bhead_is_id (const BHead *bhead) |
| static bool | blo_bhead_is_id_valid_type (const BHead *bhead) |
| static void | read_file_bhead_idname_map_create (FileData *fd) |
| static Main * | blo_find_main (FileData *fd, const char *filepath, const char *relabase) |
File Data API | |
| static ssize_t | fd_read_data_from_file (FileData *filedata, void *buffer, size_t size, bool *UNUSED(r_is_memchunck_identical)) |
| static off64_t | fd_seek_data_from_file (FileData *filedata, off64_t offset, int whence) |
| static ssize_t | fd_read_gzip_from_file (FileData *filedata, void *buffer, size_t size, bool *UNUSED(r_is_memchunck_identical)) |
| static ssize_t | fd_read_from_memory (FileData *filedata, void *buffer, size_t size, bool *UNUSED(r_is_memchunck_identical)) |
| static ssize_t | fd_read_from_mmap (FileData *filedata, void *buffer, size_t size, bool *UNUSED(r_is_memchunck_identical)) |
| static off64_t | fd_seek_from_mmap (FileData *filedata, off64_t offset, int whence) |
| static ssize_t | fd_read_from_memfile (FileData *filedata, void *buffer, size_t size, bool *r_is_memchunck_identical) |
| static FileData * | filedata_new (void) |
| static FileData * | blo_decode_and_check (FileData *fd, ReportList *reports) |
| static FileData * | blo_filedata_from_file_descriptor (const char *filepath, ReportList *reports, int file) |
| static FileData * | blo_filedata_from_file_open (const char *filepath, ReportList *reports) |
| FileData * | blo_filedata_from_file (const char *filepath, ReportList *reports) |
| static FileData * | blo_filedata_from_file_minimal (const char *filepath) |
| static ssize_t | fd_read_gzip_from_memory (FileData *filedata, void *buffer, size_t size, bool *UNUSED(r_is_memchunck_identical)) |
| static int | fd_read_gzip_from_memory_init (FileData *fd) |
| FileData * | blo_filedata_from_memory (const void *mem, int memsize, ReportList *reports) |
| FileData * | blo_filedata_from_memfile (MemFile *memfile, const struct BlendFileReadParams *params, ReportList *reports) |
| void | blo_filedata_free (FileData *fd) |
Public Utilities | |
| bool | BLO_has_bfile_extension (const char *str) |
| bool | BLO_library_path_explode (const char *path, char *r_dir, char **r_group, char **r_name) |
| BlendThumbnail * | BLO_thumbnail_from_file (const char *filepath) |
Read ID | |
| static void | lib_link_id (BlendLibReader *reader, ID *id) |
| static void | lib_link_id_embedded_id (BlendLibReader *reader, ID *id) |
| static void | direct_link_id_override_property_operation_cb (BlendDataReader *reader, void *data) |
| static void | direct_link_id_override_property_cb (BlendDataReader *reader, void *data) |
| static void | direct_link_id_common (BlendDataReader *reader, Library *current_library, ID *id, ID *id_old, const int tag) |
| static void | direct_link_id_embedded_id (BlendDataReader *reader, Library *current_library, ID *id, ID *id_old) |
| static int | direct_link_id_restore_recalc_exceptions (const ID *id_current) |
| static int | direct_link_id_restore_recalc (const FileData *fd, const ID *id_target, const ID *id_current, const bool is_identical) |
Read ID: Shape Keys | |
| void | blo_do_versions_key_uidgen (Key *key) |
Read ID: Scene | |
| static void | lib_link_scenes_check_set (Main *bmain) |
Read ID: Library | |
| static void | direct_link_library (FileData *fd, Library *lib, Main *main) |
| static void | lib_link_library (BlendLibReader *UNUSED(reader), Library *UNUSED(lib)) |
| static void | fix_relpaths_library (const char *basepath, Main *main) |
Read Library Data Block | |
| static ID * | create_placeholder (Main *mainvar, const short idcode, const char *idname, const int tag) |
| static void | placeholders_ensure_valid (Main *bmain) |
| static const char * | dataname (short id_code) |
| static bool | direct_link_id (FileData *fd, Main *main, const int tag, ID *id, ID *id_old) |
| static BHead * | read_data_into_datamap (FileData *fd, BHead *bhead, const char *allocname) |
| static bool | read_libblock_is_identical (FileData *fd, BHead *bhead) |
| static bool | read_libblock_undo_restore_library (FileData *fd, Main *main, const ID *id) |
| static bool | read_libblock_undo_restore_linked (FileData *fd, Main *main, const ID *id, BHead *bhead) |
| static void | read_libblock_undo_restore_identical (FileData *fd, Main *main, const ID *UNUSED(id), ID *id_old, const int tag) |
| static void | read_libblock_undo_restore_at_old_address (FileData *fd, Main *main, ID *id, ID *id_old) |
| static bool | read_libblock_undo_restore (FileData *fd, Main *main, BHead *bhead, const int tag, ID **r_id_old) |
| static BHead * | read_libblock (FileData *fd, Main *main, BHead *bhead, const int tag, const bool placeholder_set_indirect_extern, ID **r_id) |
Read Asset Data | |
| BHead * | blo_read_asset_data_block (FileData *fd, BHead *bhead, AssetMetaData **r_asset_data) |
Read Global Data | |
| static BHead * | read_global (BlendFileData *bfd, FileData *fd, BHead *bhead) |
| static void | link_global (FileData *fd, BlendFileData *bfd) |
Versioning | |
| static void | do_versions_userdef (FileData *UNUSED(fd), BlendFileData *bfd) |
| static void | do_versions (FileData *fd, Library *lib, Main *main) |
| static void | do_versions_after_linking (Main *main, ReportList *reports) |
Read Library Data Block (all) | |
| static void | lib_link_all (FileData *fd, Main *bmain) |
| static void | after_liblink_merged_bmain_process (Main *bmain) |
Read User Preferences | |
| static void | direct_link_keymapitem (BlendDataReader *reader, wmKeyMapItem *kmi) |
| static BHead * | read_userdef (BlendFileData *bfd, FileData *fd, BHead *bhead) |
Read File (Internal) | |
| BlendFileData * | blo_read_file_internal (FileData *fd, const char *filepath) |
OldNewMap API | |
| #define | ENTRIES_CAPACITY(onm) (1ll << (onm)->capacity_exp) |
| #define | MAP_CAPACITY(onm) (1ll << ((onm)->capacity_exp + 1)) |
| #define | SLOT_MASK(onm) (MAP_CAPACITY(onm) - 1) |
| #define | DEFAULT_SIZE_EXP 6 |
| #define | PERTURB_SHIFT 5 |
| #define | ITER_SLOTS(onm, KEY, SLOT_NAME, INDEX_NAME) |
| typedef struct OldNew | OldNew |
| typedef struct OldNewMap | OldNewMap |
| static void | oldnewmap_insert_index_in_map (OldNewMap *onm, const void *ptr, int index) |
| static void | oldnewmap_insert_or_replace (OldNewMap *onm, OldNew entry) |
| static OldNew * | oldnewmap_lookup_entry (const OldNewMap *onm, const void *addr) |
| static void | oldnewmap_clear_map (OldNewMap *onm) |
| static void | oldnewmap_increase_size (OldNewMap *onm) |
| static OldNewMap * | oldnewmap_new (void) |
| static void | oldnewmap_insert (OldNewMap *onm, const void *oldaddr, void *newaddr, int nr) |
| void | blo_do_versions_oldnewmap_insert (OldNewMap *onm, const void *oldaddr, void *newaddr, int nr) |
| static void * | oldnewmap_lookup_and_inc (OldNewMap *onm, const void *addr, bool increase_users) |
| static void * | oldnewmap_liblookup (OldNewMap *onm, const void *addr, const void *lib) |
| static void | oldnewmap_clear (OldNewMap *onm) |
| static void | oldnewmap_free (OldNewMap *onm) |
Library Linking (expand pointers) | |
| static BLOExpandDoitCallback | expand_doit |
| static void | expand_doit_library (void *fdhandle, Main *mainvar, void *old) |
| static void | expand_id (BlendExpander *expander, ID *id) |
| static void | expand_id_embedded_id (BlendExpander *expander, ID *id) |
| void | BLO_main_expander (BLOExpandDoitCallback expand_doit_func) |
| void | BLO_expand_main (void *fdhandle, Main *mainvar) |
| #define BHEAD_USE_READ_ON_DEMAND | ( | bhead | ) | ((bhead)->code == DATA) |
Definition at line 219 of file readfile.c.
| #define BHEADN_FROM_BHEAD | ( | bh | ) | ((BHeadN *)POINTER_OFFSET(bh, -(int)offsetof(BHeadN, bhead))) |
Definition at line 215 of file readfile.c.
| #define DEBUG_PRINTF | ( | ... | ) |
Definition at line 193 of file readfile.c.
| #define DEFAULT_SIZE_EXP 6 |
Definition at line 277 of file readfile.c.
| #define DNA_DEPRECATED_ALLOW |
Definition at line 44 of file readfile.c.
| #define ENTRIES_CAPACITY | ( | onm | ) | (1ll << (onm)->capacity_exp) |
Definition at line 274 of file readfile.c.
| #define ITER_SLOTS | ( | onm, | |
| KEY, | |||
| SLOT_NAME, | |||
| INDEX_NAME | |||
| ) |
Definition at line 281 of file readfile.c.
| #define MAP_CAPACITY | ( | onm | ) | (1ll << ((onm)->capacity_exp + 1)) |
Definition at line 275 of file readfile.c.
| #define PERTURB_SHIFT 5 |
Definition at line 278 of file readfile.c.
| #define SLOT_MASK | ( | onm | ) | (MAP_CAPACITY(onm) - 1) |
Definition at line 276 of file readfile.c.
Definition at line 120 of file readfile.c.
| #define USE_BHEAD_READ_ON_DEMAND |
~/.config/blender/X.XX/config/userpref.blend)Definition at line 179 of file readfile.c.
| #define USE_GHASH_BHEAD |
Definition at line 182 of file readfile.c.
| #define USE_GHASH_RESTORE_POINTER |
Definition at line 185 of file readfile.c.
| typedef struct BlendDataReader BlendDataReader |
| typedef struct BlendExpander BlendExpander |
| typedef struct BlendLibReader BlendLibReader |
| typedef struct BLOCacheStorage BLOCacheStorage |
| typedef enum ePointerUserMode ePointerUserMode |
| enum ePointerUserMode |
| Enumerator | |
|---|---|
| USER_IGNORE | |
| USER_REAL | |
Definition at line 2605 of file readfile.c.
|
static |
Definition at line 4790 of file readfile.c.
References BASE_SELECTED, BKE_collection_child_add(), BKE_collection_object_add(), BKE_layer_collection_get_active(), BKE_object_add_only_object(), BKE_scene_object_base_flag_sync_from_base(), BKE_view_layer_base_find(), BLI_assert, LayerCollection::collection, Main::collections, copy_v3_v3(), Scene::cursor, DEG_id_tag_update(), Object::empty_drawsize, FILE_ACTIVE_COLLECTION, FILE_AUTOSELECT, FILE_COLLECTION_INSTANCE, Base::flag, Object::id, ID_RECALC_ANIMATION, ID_RECALC_GEOMETRY, ID_RECALC_TRANSFORM, id_us_plus(), Object::instance_collection, lib, ID::lib, LIB_INDIRECT_WEAK_LINK, LIB_TAG_DOIT, LIB_TAG_EXTERN, LIB_TAG_INDIRECT, LIB_TAG_PRE_EXISTING, LISTBASE_FOREACH, Object::loc, View3DCursor::location, Scene::master_collection, OB_DUPLICOLLECTION, OB_EMPTY, object_base_instance_init(), object_in_any_scene(), scene, ID::tag, Object::transflag, and Object::type.
Referenced by library_link_end().
|
static |
Definition at line 4741 of file readfile.c.
References BKE_collection_object_add(), BKE_idtype_idcode_from_index(), BKE_layer_collection_get_active(), BKE_object_add_only_object(), BKE_object_materials_test(), BKE_object_obdata_to_type(), BLI_assert, LayerCollection::collection, copy_v3_v3(), Scene::cursor, Object::data, FILE_ACTIVE_COLLECTION, FILE_AUTOSELECT, FILE_OBDATA_INSTANCE, id, id_us_plus(), INDEX_ID_MAX, LIB_TAG_DOIT, LISTBASE_FOREACH, Object::loc, View3DCursor::location, Scene::master_collection, ID::name, OB_DATA_SUPPORT_ID, object_base_instance_init(), scene, set_listbasepointers(), ID::tag, and type.
Referenced by library_link_end().
|
static |
Definition at line 4681 of file readfile.c.
References BKE_collection_add(), BKE_collection_object_add(), BKE_layer_collection_get_active(), BLI_assert, CLAMP_MIN, LayerCollection::collection, FILE_ACTIVE_COLLECTION, FILE_AUTOSELECT, FILE_LINK, lib, LIB_INDIRECT_WEAK_LINK, LIB_TAG_DOIT, LIB_TAG_EXTERN, LIB_TAG_INDIRECT, LIB_TAG_PRE_EXISTING, LISTBASE_FOREACH, Scene::master_collection, NULL, OB_MODE_OBJECT, object_base_instance_init(), object_in_any_collection(), Main::objects, and scene.
Referenced by library_link_end().
Definition at line 450 of file readfile.c.
References Freestyle::a, BLI_movelisttolist(), from, INDEX_ID_MAX, and set_listbasepointers().
Referenced by blo_join_main(), library_link_end(), and read_libraries().
|
static |
Checks to perform after lib_link_all. Those operations cannot perform properly in a split bmain case, since some data from other bmain's (aka libraries) may not have been processed yet.
Definition at line 3973 of file readfile.c.
References BKE_main_collections_parent_relations_rebuild(), BLI_assert, BLO_main_validate_shapekeys(), lib_link_scenes_check_set(), Main::next, NULL, and Main::prev.
Referenced by blo_read_file_internal(), and library_link_end().
Definition at line 716 of file readfile.c.
References BLI_endian_switch_uint64(), BHead4::code, BHead8::code, ENDB, BHead4::len, BHead8::len, BHead4::nr, BHead8::nr, BHead4::old, BHead8::old, BHead4::SDNAnr, and BHead8::SDNAnr.
Referenced by get_bhead().
Definition at line 742 of file readfile.c.
References BHead4::code, BHead8::code, ENDB, BHead4::len, BHead8::len, BHead4::nr, BHead8::nr, BHead4::old, BHead8::old, BHead4::SDNAnr, and BHead8::SDNAnr.
Referenced by get_bhead().
Definition at line 1985 of file readfile.c.
References GS, id, INDEX_ID_MAX, FileData::libmap, LISTBASE_FOREACH, ID::name, FileData::old_mainlist, oldnewmap_insert(), ptr, and set_listbasepointers().
Referenced by BLO_read_from_memfile().
Definition at line 894 of file readfile.c.
References BHeadN::bhead, FileData::bhead_list, ListBase::first, get_bhead(), and NULL.
Referenced by BLO_blendhandle_get_datablock_info(), BLO_blendhandle_get_datablock_names(), BLO_blendhandle_get_linkable_groups(), BLO_blendhandle_get_previews(), BLO_blendhandle_print_sizes(), BLO_library_link_copypaste(), blo_read_file_internal(), find_bhead(), find_bhead_from_code_name(), read_file_bhead_idname_map_create(), read_file_dna(), read_file_thumbnail(), read_file_version(), and sort_bhead_old_map().
| AssetMetaData* blo_bhead_id_asset_data_address | ( | const FileData * | fd, |
| const BHead * | bhead | ||
| ) |
Definition at line 993 of file readfile.c.
References BLI_assert, blo_bhead_is_id_valid_type(), FileData::id_asset_data_offset, NULL, and POINTER_OFFSET.
Referenced by BLO_blendhandle_get_datablock_info(), and BLO_blendhandle_get_datablock_names().
Definition at line 987 of file readfile.c.
References FileData::id_name_offset, and POINTER_OFFSET.
Referenced by BLO_blendhandle_get_datablock_info(), BLO_blendhandle_get_datablock_names(), BLO_blendhandle_get_previews(), expand_doit_library(), find_bhead_from_code_name(), is_yet_read(), and read_file_bhead_idname_map_create().
|
static |
Definition at line 558 of file readfile.c.
References BHead::code.
Referenced by blo_bhead_is_id_valid_type().
|
static |
Definition at line 565 of file readfile.c.
References BKE_idtype_idcode_is_valid(), blo_bhead_is_id(), and BHead::code.
Referenced by blo_bhead_id_asset_data_address(), BLO_library_link_copypaste(), blo_read_asset_data_block(), and read_file_bhead_idname_map_create().
Definition at line 922 of file readfile.c.
References BHeadN::bhead, BHEADN_FROM_BHEAD, get_bhead(), BHeadN::next, and NULL.
Referenced by BLO_blendhandle_get_datablock_info(), BLO_blendhandle_get_datablock_names(), BLO_blendhandle_get_linkable_groups(), BLO_blendhandle_get_previews(), BLO_blendhandle_print_sizes(), BLO_library_link_copypaste(), blo_read_file_internal(), find_bhead(), find_bhead_from_code_name(), read_data_into_datamap(), read_file_bhead_idname_map_create(), read_file_dna(), read_file_thumbnail(), read_file_version(), read_global(), read_libblock(), read_libblock_is_identical(), and sort_bhead_old_map().
Definition at line 914 of file readfile.c.
References BHeadN::bhead, BHEADN_FROM_BHEAD, NULL, and BHeadN::prev.
Referenced by BLO_blendhandle_get_datablock_info(), and find_previous_lib().
Definition at line 949 of file readfile.c.
References BHeadN::bhead, BHEADN_FROM_BHEAD, BLI_assert, BHeadN::file_offset, FileData::file_offset, BHeadN::has_data, BHeadN::is_memchunk_identical, BHead::len, FileData::read, FileData::seek, and UNLIKELY.
Referenced by blo_bhead_read_full(), and read_struct().
Definition at line 970 of file readfile.c.
References BHeadN::bhead, BHEADN_FROM_BHEAD, blo_bhead_read_data(), BHeadN::file_offset, BHeadN::has_data, BHeadN::is_memchunk_identical, BHead::len, MEM_freeN, MEM_mallocN, and NULL.
Referenced by read_struct().
| void blo_cache_storage_end | ( | FileData * | fd | ) |
Definition at line 2141 of file readfile.c.
References BLI_ghash_free(), BLI_memarena_free(), BLOCacheStorage::cache_map, FileData::cache_storage, MEM_freeN, BLOCacheStorage::memarena, and NULL.
Referenced by blo_filedata_free().
|
static |
Clear as needed a cache data entry from old ID, when reading some undo memfile.
Definition at line 2060 of file readfile.c.
References BLI_ghash_lookup_p(), BLOCacheStorage::cache_map, IDCacheKey::cache_v, NULL, and POINTER_AS_UINT.
Referenced by blo_cache_storage_old_bmain_clear().
|
static |
Register a cache data entry to be preserved when reading some undo memfile.
Definition at line 2017 of file readfile.c.
References BLI_assert, BLI_ghash_haskey(), BLI_ghash_insert(), BLI_memarena_alloc(), BLOCacheStorage::cache_map, id, IDCacheKey::id_session_uuid, BLOCacheStorage::memarena, POINTER_FROM_UINT, ID::session_uuid, and UNUSED_VARS_NDEBUG.
Referenced by blo_cache_storage_init().
|
static |
Restore a cache data entry from old ID into new one, when reading some undo memfile.
Definition at line 2035 of file readfile.c.
References BLI_ghash_lookup_p(), BLOCacheStorage::cache_map, IDCacheKey::cache_v, IDTYPE_CACHE_CB_FLAGS_PERSISTENT, NULL, POINTER_AS_UINT, and POINTER_FROM_UINT.
Referenced by direct_link_id().
Definition at line 2078 of file readfile.c.
References BKE_idtype_cache_key_cmp(), BKE_idtype_cache_key_hash(), BKE_idtype_get_info_from_id(), BKE_idtype_id_foreach_cache(), BLI_assert, BLI_ghash_new(), BLI_memarena_new(), BLI_MEMARENA_STD_BUFSIZE, blo_cache_storage_entry_register(), BLOCacheStorage::cache_map, FileData::cache_storage, ListBase::first, IDTypeInfo::foreach_cache, FOREACH_MAIN_LISTBASE_BEGIN, FOREACH_MAIN_LISTBASE_END, FOREACH_MAIN_LISTBASE_ID_BEGIN, FOREACH_MAIN_LISTBASE_ID_END, ID_IS_LINKED, MEM_mallocN, BLOCacheStorage::memarena, FileData::memfile, and NULL.
Referenced by BLO_read_from_memfile().
Definition at line 2114 of file readfile.c.
References BKE_idtype_get_info_from_id(), BKE_idtype_id_foreach_cache(), blo_cache_storage_entry_clear_in_old(), FileData::cache_storage, ListBase::first, IDTypeInfo::foreach_cache, FOREACH_MAIN_LISTBASE_BEGIN, FOREACH_MAIN_LISTBASE_END, FOREACH_MAIN_LISTBASE_ID_BEGIN, FOREACH_MAIN_LISTBASE_ID_END, ID_IS_LINKED, and NULL.
Referenced by BLO_read_from_memfile().
| void blo_clear_proxy_pointers_from_lib | ( | Main * | oldmain | ) |
Definition at line 1887 of file readfile.c.
References LISTBASE_FOREACH, NULL, and Main::objects.
Referenced by BLO_read_from_memfile().
|
static |
Definition at line 1348 of file readfile.c.
References BKE_reportf(), blo_filedata_free(), decode_blender_header(), FD_FLAGS_FILE_OK, FileData::flags, NULL, read_file_dna(), FileData::relabase, and RPT_ERROR.
Referenced by blo_filedata_from_file(), blo_filedata_from_memfile(), and blo_filedata_from_memory().
| void blo_do_versions_key_uidgen | ( | Key * | key | ) |
Definition at line 2529 of file readfile.c.
References Key::block, LISTBASE_FOREACH, and Key::uidgen.
Referenced by blo_do_versions_260().
| void* blo_do_versions_newlibadr | ( | FileData * | fd, |
| const void * | lib, | ||
| const void * | adr | ||
| ) |
Definition at line 1840 of file readfile.c.
References lib, and newlibadr().
Referenced by blo_do_versions_250(), blo_do_versions_260(), blo_do_versions_pre250(), and ntree_version_245().
| void blo_do_versions_oldnewmap_insert | ( | OldNewMap * | onm, |
| const void * | oldaddr, | ||
| void * | newaddr, | ||
| int | nr | ||
| ) |
Definition at line 380 of file readfile.c.
References oldnewmap_insert().
Referenced by blo_do_versions_pre250().
Definition at line 1948 of file readfile.c.
References OldNewMap::entries, Main::fonts, Main::images, lib, Main::libraries, LISTBASE_FOREACH, OldNewMap::nentries, OldNew::newp, newpackedadr(), OldNew::nr, NULL, FileData::packedmap, Main::sounds, and Main::volumes.
| void BLO_expand_id | ( | BlendExpander * | expander, |
| ID * | id | ||
| ) |
Definition at line 5805 of file readfile.c.
References expand_doit, BlendExpander::fd, and BlendExpander::main.
| void BLO_expand_main | ( | void * | fdhandle, |
| Main * | mainvar | ||
| ) |
Loop over all ID data in Main to mark relations. Set (id->tag & LIB_TAG_NEED_EXPAND) to mark expanding. Flags get cleared after expanding.
| fdhandle | usually filedata, or own handle. |
| mainvar | the Main database to expand. |
Definition at line 4587 of file readfile.c.
References Freestyle::a, BKE_idtype_get_info_from_id(), IDTypeInfo::blend_read_expand, expand_id(), ListBase::first, id, INDEX_ID_MAX, LIB_TAG_NEED_EXPAND, NULL, set_listbasepointers(), and ID::tag.
Referenced by BKE_blendfile_write_partial(), library_link_end(), and read_libraries().
| void blo_filedata_free | ( | FileData * | fd | ) |
Definition at line 1591 of file readfile.c.
References FileData::bhead_idname_hash, FileData::bhead_list, BHEAD_USE_READ_ON_DEMAND, FileData::bheadmap, BKE_main_idmap_destroy(), BLI_assert, BLI_freelistN(), BLI_ghash_free(), BLI_mmap_free(), blo_cache_storage_end(), FileData::buffer, FileData::compflags, FileData::datamap, DNA_reconstruct_info_free(), DNA_sdna_free(), FD_FLAGS_NOT_MY_BUFFER, FD_FLAGS_NOT_MY_LIBMAP, FileData::filedes, FileData::filesdna, FileData::flags, FileData::globmap, FileData::gzfiledes, FileData::libmap, LISTBASE_FOREACH_MUTABLE, MEM_freeN, FileData::mmap_file, NULL, FileData::old_idmap, oldnewmap_free(), FileData::packedmap, FileData::reconstruct_info, FileData::seek, and FileData::strm.
Referenced by BLO_blendhandle_close(), blo_decode_and_check(), blo_filedata_from_file_minimal(), blo_filedata_from_memory(), BLO_read_from_file(), BLO_read_from_memfile(), BLO_read_from_memory(), BLO_thumbnail_from_file(), library_link_end(), and read_libraries().
| FileData* blo_filedata_from_file | ( | const char * | filepath, |
| ReportList * | reports | ||
| ) |
Definition at line 1470 of file readfile.c.
References BLI_strncpy(), blo_decode_and_check(), blo_filedata_from_file_open(), NULL, and FileData::relabase.
Referenced by BLO_blendhandle_from_file(), BLO_read_from_file(), and read_library_file_data().
|
static |
Definition at line 1371 of file readfile.c.
References BKE_reportf(), BLI_gzopen(), BLI_lseek(), BLI_mmap_open(), FileData::buffersize, fd_read_data_from_file(), fd_read_from_mmap(), fd_read_gzip_from_file(), fd_seek_data_from_file(), fd_seek_from_mmap(), file, filedata_new(), FileData::filedes, FileData::gzfiledes, FileData::mmap_file, NULL, FileData::read, RPT_WARNING, FileData::seek, and TIP_.
Referenced by blo_filedata_from_file_open().
|
static |
Same as blo_filedata_from_file(), but does not reads DNA data, only header. Use it for light access (e.g. thumbnail reading).
Definition at line 1486 of file readfile.c.
References blo_filedata_free(), blo_filedata_from_file_open(), decode_blender_header(), FD_FLAGS_FILE_OK, FileData::flags, and NULL.
Referenced by BLO_thumbnail_from_file().
|
static |
Definition at line 1449 of file readfile.c.
References BKE_reportf(), BLI_open(), blo_filedata_from_file_descriptor(), file, FileData::filedes, NULL, O_BINARY, RPT_WARNING, and TIP_.
Referenced by blo_filedata_from_file(), and blo_filedata_from_file_minimal().
| FileData* blo_filedata_from_memfile | ( | MemFile * | memfile, |
| const struct BlendFileReadParams * | params, | ||
| ReportList * | reports | ||
| ) |
Definition at line 1572 of file readfile.c.
References BKE_report(), blo_decode_and_check(), FD_FLAGS_NOT_MY_BUFFER, fd_read_from_memfile(), filedata_new(), FileData::flags, FileData::memfile, NULL, params, FileData::read, RPT_WARNING, and FileData::undo_direction.
Referenced by BLO_read_from_memfile().
| FileData* blo_filedata_from_memory | ( | const void * | mem, |
| int | memsize, | ||
| ReportList * | reports | ||
| ) |
Definition at line 1543 of file readfile.c.
References BKE_report(), blo_decode_and_check(), blo_filedata_free(), FileData::buffer, FileData::buffersize, FD_FLAGS_NOT_MY_BUFFER, fd_read_from_memory(), fd_read_gzip_from_memory_init(), filedata_new(), FileData::flags, NULL, FileData::read, RPT_WARNING, SIZEOFBLENDERHEADER, and TIP_.
Referenced by BLO_blendhandle_from_memory(), BLO_read_from_memory(), and read_library_file_data().
Definition at line 617 of file readfile.c.
References BKE_libblock_alloc(), BKE_main_new(), BLI_addtail(), BLI_path_basename(), BLI_path_cmp, BLI_path_normalize(), BLI_strncpy(), Main::curlib, FILE_MAX, Library::filepath_abs, ListBase::first, G, G_DEBUG, ID_FAKE_USERS, ID_LI, id_us_ensure_real(), if(), lib, FileData::mainlist, Main::name, Main::next, and read_file_version().
Referenced by expand_doit_library(), and library_link_begin().
| bool BLO_has_bfile_extension | ( | const char * | str | ) |
Check whether given path ends with a blend file compatible extension (.blend, .ble or .blend.gz).
| str | The path to check. |
Definition at line 1684 of file readfile.c.
References BLI_path_extension_check_array(), NULL, and str.
Referenced by arg_handle_load_file(), blend_save_check(), BLO_library_path_explode(), ED_path_extension_type(), file_path_to_ui_path(), filelist_readjob_list_dir(), recent_files_menu_draw(), uiTemplateRecentFiles(), WM_lib_reload(), and wm_lib_relocate_exec_do().
| void blo_join_main | ( | ListBase * | mainlist | ) |
Definition at line 462 of file readfile.c.
References add_main_to_main(), BKE_main_free(), BLI_remlink(), ListBase::first, and Main::next.
Referenced by BLO_main_validate_libraries(), blo_read_file_internal(), BLO_read_from_memfile(), library_link_end(), and write_file_handle().
| void blo_lib_link_restore | ( | Main * | oldmain, |
| Main * | newmain, | ||
| wmWindowManager * | curwm, | ||
| Scene * | curscene, | ||
| ViewLayer * | cur_view_layer | ||
| ) |
Used to link a file (without UI) to the current UI. Note that it assumes the old pointers in UI are still valid, so old Main is not freed.
Definition at line 3030 of file readfile.c.
References BKE_main_idmap_create(), BKE_main_idmap_destroy(), BKE_view_layer_find(), BKE_workspace_active_get(), BKE_workspace_active_set(), BLI_assert, Scene::cursor, lib_link_clipboard_restore(), lib_link_main_data_restore(), lib_link_window_scene_data_restore(), lib_link_wm_xr_data_restore(), lib_link_workspace_layout_restore(), LISTBASE_FOREACH, MAIN_IDMAP_TYPE_NAME, ViewLayer::name, NULL, restore_pointer_by_name(), id_map< K, T >::scene, STRNCPY, USER_REAL, wmWindowManager::windows, Main::workspaces, and wmWindowManager::xr.
Referenced by setup_app_data().
| Main* BLO_library_link_begin | ( | BlendHandle ** | bh, |
| const char * | filepath, | ||
| const struct LibraryLink_Params * | params | ||
| ) |
Initialize the BlendHandle for linking library data.
| bh | A blender file handle as returned by BLO_blendhandle_from_file or BLO_blendhandle_from_memory. |
| filepath | Used for relative linking, copied to the lib->filepath. |
| params | Settings for linking that don't change from beginning to end of linking. |
Definition at line 5109 of file readfile.c.
References library_link_begin(), and params.
Referenced by BKE_copybuffer_paste(), BKE_copybuffer_read(), BLO_library_temp_load_id(), bpy_lib_exit(), and wm_link_do().
| int BLO_library_link_copypaste | ( | Main * | mainl, |
| BlendHandle * | bh, | ||
| const uint64_t | id_types_mask | ||
| ) |
Simple reader for copy/paste buffers.
Definition at line 4941 of file readfile.c.
References BHeadSort::bhead, BKE_idtype_idcode_is_linkable(), BKE_idtype_idcode_to_idfilter(), BLI_assert, blo_bhead_first(), blo_bhead_is_id_valid_type(), blo_bhead_next(), BHead::code, ENDB, GS, id, ID_OB, id_sort_by_name(), LIB_TAG_INDIRECT, LIB_TAG_NEED_EXPAND, Object::mode, ID::name, NULL, OB_MODE_OBJECT, read_libblock(), ID::us, and which_libbase().
Referenced by BKE_copybuffer_paste(), and BKE_copybuffer_read().
| void BLO_library_link_end | ( | Main * | mainl, |
| BlendHandle ** | bh, | ||
| const struct LibraryLink_Params * | params | ||
| ) |
Finalize linking from a given .blend file (library). Optionally instance the indirect object/collection in the scene when the flags are set.
| mainl | The main database to link from (not the active one). |
| bh | The blender file handle (WARNING! may be freed by this function!). |
| params | Settings for linking that don't change from beginning to end of linking. |
Definition at line 5258 of file readfile.c.
References library_link_end(), and params.
Referenced by BKE_copybuffer_paste(), BKE_copybuffer_read(), BLO_library_temp_free(), bpy_lib_exit(), and wm_link_do().
| ID* BLO_library_link_named_part | ( | Main * | mainl, |
| BlendHandle ** | bh, | ||
| const short | idcode, | ||
| const char * | name, | ||
| const struct LibraryLink_Params * | params | ||
| ) |
Link a named data-block from an external blend file.
| mainl | The main database to link from (not the active one). |
| bh | The blender file handle. |
| idcode | The kind of data-block to link. |
| name | The name of the data-block (without the 2 char ID prefix). |
Definition at line 4989 of file readfile.c.
References link_named_part(), and params.
Referenced by BLO_library_temp_load_id(), bpy_lib_exit(), and wm_link_do().
| void BLO_library_link_params_init | ( | struct LibraryLink_Params * | params, |
| struct Main * | bmain, | ||
| const int | flag, | ||
| const int | id_tag_extra | ||
| ) |
Definition at line 5069 of file readfile.c.
References params.
Referenced by BKE_copybuffer_read(), BLO_library_link_params_init_with_context(), BLO_library_temp_load_id(), and bpy_lib_exit().
| void BLO_library_link_params_init_with_context | ( | struct LibraryLink_Params * | params, |
| struct Main * | bmain, | ||
| const int | flag, | ||
| const int | id_tag_extra, | ||
| struct Scene * | scene, | ||
| struct ViewLayer * | view_layer, | ||
| const struct View3D * | v3d | ||
| ) |
Definition at line 5080 of file readfile.c.
References BLO_LIBLINK_NEEDS_ID_TAG_DOIT, BLO_library_link_params_init(), NULL, params, and scene.
Referenced by BKE_copybuffer_paste(), and wm_link_do().
| bool BLO_library_path_explode | ( | const char * | path, |
| char * | r_dir, | ||
| char ** | r_group, | ||
| char ** | r_name | ||
| ) |
Try to explode given path into its 'library components' (i.e. a .blend file, id type/group, and data-block itself).
| path | the full path to explode. |
| r_dir | the string that'll contain path up to blend file itself ('library' path). WARNING! Must be FILE_MAX_LIBEXTRA long (it also stores group and name strings)! |
| r_group | the string that'll contain 'group' part of the path, if any. May be NULL. |
| r_name | the string that'll contain data's name part of the path, if any. May be NULL. |
Definition at line 1701 of file readfile.c.
References BLI_assert, BLI_is_dir(), BLI_is_file(), BLI_path_slash_rfind(), BLO_EMBEDDED_STARTUP_BLEND, BLO_GROUP_MAX, BLO_has_bfile_extension(), Freestyle::c, MAX_ID_NAME, NULL, and STREQ.
Referenced by file_directory_enter_handle(), file_draw_icon(), file_draw_preview(), fileentry_uiname(), filelist_checkdir_lib(), filelist_islibrary(), filelist_readjob_list_lib(), IMB_thumb_manage(), is_filtered_lib(), and wm_link_append_exec().
Definition at line 5271 of file readfile.c.
References read_struct().
Referenced by BLO_blendhandle_get_previews().
| void BLO_main_expander | ( | BLOExpandDoitCallback | expand_doit_func | ) |
Set the callback func used over all ID data found by BLO_expand_main func.
| expand_doit_func | Called for each ID block it finds. |
Definition at line 4575 of file readfile.c.
References expand_doit.
Referenced by BKE_blendfile_write_partial(), library_link_end(), and read_libraries().
Definition at line 2003 of file readfile.c.
References BKE_main_idmap_create(), BKE_main_idmap_destroy(), MAIN_IDMAP_TYPE_UUID, NULL, and FileData::old_idmap.
Referenced by BLO_read_from_memfile().
Definition at line 1905 of file readfile.c.
References Main::fonts, Main::images, insert_packedmap(), lib, Main::libraries, LISTBASE_FOREACH, oldnewmap_new(), FileData::packedmap, Main::sounds, and Main::volumes.
| BHead* blo_read_asset_data_block | ( | FileData * | fd, |
| BHead * | bhead, | ||
| AssetMetaData ** | r_asset_data | ||
| ) |
Definition at line 3739 of file readfile.c.
References BKE_asset_metadata_read(), BLI_assert, blo_bhead_is_id_valid_type(), BLO_read_data_address, FileData::datamap, oldnewmap_clear(), and read_data_into_datamap().
Referenced by BLO_blendhandle_get_datablock_info().
| void BLO_read_data_globmap_add | ( | BlendDataReader * | reader, |
| void * | oldaddr, | ||
| void * | newaddr | ||
| ) |
Definition at line 5775 of file readfile.c.
References BlendDataReader::fd, FileData::globmap, and oldnewmap_insert().
Referenced by window_manager_blend_read_data().
| bool BLO_read_data_is_undo | ( | BlendDataReader * | reader | ) |
Definition at line 5770 of file readfile.c.
References BlendDataReader::fd, FileData::memfile, and NULL.
Referenced by direct_link_id_common(), image_blend_read_data(), object_blend_read_data(), scene_blend_read_data(), and sound_blend_read_data().
| ReportList* BLO_read_data_reports | ( | BlendDataReader * | reader | ) |
Definition at line 5785 of file readfile.c.
References BlendDataReader::fd, and FileData::reports.
Referenced by BKE_modifier_blend_read_data().
| void BLO_read_double_array | ( | BlendDataReader * | reader, |
| int | array_size, | ||
| double ** | ptr_p | ||
| ) |
Definition at line 5688 of file readfile.c.
References BLI_endian_switch_double_array(), BLO_read_data_address, and BLO_read_requires_endian_switch().
Referenced by IDP_DirectLinkArray().
| BlendFileData* blo_read_file_internal | ( | FileData * | fd, |
| const char * | filepath | ||
| ) |
Definition at line 4097 of file readfile.c.
References after_liblink_merged_bmain_process(), ATTR_FALLTHROUGH, BKE_collections_after_lib_link(), BKE_lib_override_library_main_update(), BKE_lib_override_library_main_validate(), BKE_main_id_refcount_recompute(), BKE_main_id_tag_all(), BKE_main_new(), Main::blen_thumb, BLEN_THUMB_MEMSIZE, BLEN_THUMB_MEMSIZE_FILE, BLEN_THUMB_MEMSIZE_IS_VALID, BLENFILETYPE_BLEND, BLI_addtail(), BLI_assert, BLI_strncpy(), blo_bhead_first(), blo_bhead_next(), blo_join_main(), BLO_READ_SKIP_DATA, BLO_READ_SKIP_USERDEF, blo_split_main(), BHead::code, DATA, data, DEBUG_PRINTF, DNA1, do_versions(), do_versions_after_linking(), do_versions_userdef(), ENDB, FileData::fileversion, fix_relpaths_library(), G, GLOB, BlendThumbnail::height, height, ID_LINK_PLACEHOLDER, ID_SCR, ID_SCRN, ListBase::last, lib_link_all(), LIB_TAG_LOCAL, LIB_TAG_NEW, link_global(), LISTBASE_FOREACH, BlendFileData::main, FileData::mainlist, MEM_callocN, MEM_mallocN, FileData::memfile, Main::name, ntreeUpdateAllNew(), NULL, placeholders_ensure_valid(), read_file_thumbnail(), read_global(), read_libblock(), read_libraries(), read_userdef(), BlendThumbnail::rect, FileData::relabase, REND, FileData::reports, FileData::skip_flags, TEST, BlendFileData::type, USER, Main::versionfile, BlendThumbnail::width, and width.
Referenced by BLO_read_from_file(), BLO_read_from_memfile(), and BLO_read_from_memory().
| void BLO_read_float3_array | ( | BlendDataReader * | reader, |
| int | array_size, | ||
| float ** | ptr_p | ||
| ) |
Definition at line 5683 of file readfile.c.
References BLO_read_float_array().
Referenced by blendRead().
| void BLO_read_float_array | ( | BlendDataReader * | reader, |
| int | array_size, | ||
| float ** | ptr_p | ||
| ) |
Definition at line 5675 of file readfile.c.
References BLI_endian_switch_float_array(), BLO_read_data_address, and BLO_read_requires_endian_switch().
Referenced by BKE_fmodifiers_blend_read_data(), blendRead(), and BLO_read_float3_array().
| void* BLO_read_get_new_data_address | ( | BlendDataReader * | reader, |
| const void * | old_address | ||
| ) |
Definition at line 5600 of file readfile.c.
References BlendDataReader::fd, and newdataadr().
Referenced by BKE_defvert_blend_read(), BKE_modifier_blend_read_data(), modifier_replace_with_fluid(), and scene_blend_read_data().
| void* BLO_read_get_new_data_address_no_us | ( | BlendDataReader * | reader, |
| const void * | old_address | ||
| ) |
Definition at line 5605 of file readfile.c.
References BlendDataReader::fd, and newdataadr_no_us().
Referenced by direct_link_area().
| void* blo_read_get_new_globaldata_address | ( | FileData * | fd, |
| const void * | adr | ||
| ) |
Definition at line 1818 of file readfile.c.
References FileData::globmap, and oldnewmap_lookup_and_inc().
Referenced by blo_do_versions_290(), and link_global().
| ID* BLO_read_get_new_id_address | ( | BlendLibReader * | reader, |
| Library * | lib, | ||
| ID * | id | ||
| ) |
Definition at line 5615 of file readfile.c.
References BlendLibReader::fd, lib, and newlibadr().
Referenced by brush_undo_preserve_cb(), IDP_BlendReadLib(), object_blend_read_lib(), and scene_foreach_toolsettings_id_pointer_process().
| void* BLO_read_get_new_packed_address | ( | BlendDataReader * | reader, |
| const void * | old_address | ||
| ) |
Definition at line 5610 of file readfile.c.
References BlendDataReader::fd, and newpackedadr().
| void BLO_read_glob_list | ( | BlendDataReader * | reader, |
| ListBase * | list | ||
| ) |
Definition at line 5780 of file readfile.c.
References BlendDataReader::fd, and link_glob_list().
Referenced by scene_blend_read_data().
| void BLO_read_int32_array | ( | BlendDataReader * | reader, |
| int | array_size, | ||
| int32_t ** | ptr_p | ||
| ) |
Definition at line 5659 of file readfile.c.
References BLI_endian_switch_int32_array(), BLO_read_data_address, and BLO_read_requires_endian_switch().
Referenced by blendRead(), IDP_DirectLinkArray(), and object_blend_read_data().
| Main* BLO_read_lib_get_main | ( | BlendLibReader * | reader | ) |
Definition at line 5795 of file readfile.c.
References BlendLibReader::main.
Referenced by BKE_pose_blend_read_lib(), object_blend_read_lib(), and workspace_blend_read_lib().
| bool BLO_read_lib_is_undo | ( | BlendLibReader * | reader | ) |
Definition at line 5790 of file readfile.c.
References BlendLibReader::fd, FileData::memfile, and NULL.
Referenced by BKE_pose_blend_read_lib(), and ntreeBlendReadLib().
| ReportList* BLO_read_lib_reports | ( | BlendLibReader * | reader | ) |
Definition at line 5800 of file readfile.c.
References BlendLibReader::fd, and FileData::reports.
Referenced by object_blend_read_lib(), and scene_blend_read_lib().
| void BLO_read_list | ( | BlendDataReader * | reader, |
| struct ListBase * | list | ||
| ) |
Definition at line 5654 of file readfile.c.
References BLO_read_list_cb(), and NULL.
Referenced by action_blend_read_data(), armature_blend_read_data(), BKE_animdata_blend_read_data(), BKE_asset_metadata_read(), BKE_collection_blend_read_data(), BKE_constraint_blend_read_data(), BKE_fcurve_blend_read_data(), BKE_gpencil_blend_read_data(), BKE_gpencil_modifier_blend_read_data(), BKE_keyingsets_blend_read_data(), BKE_modifier_blend_read_data(), BKE_nla_blend_read_data(), BKE_particle_system_blend_read_data(), BKE_pose_blend_read_data(), BKE_ptcache_blend_read_data(), BKE_screen_area_map_blend_read_data(), BKE_shaderfx_blend_read_data(), BKE_view_layer_blend_read_data(), blend_data_read_nla_strips(), camera_blend_read_data(), curve_blend_read_data(), direct_link_area(), direct_link_bones(), direct_link_layer_collections(), direct_link_moviePlaneTracks(), direct_link_movieTracks(), direct_link_nlastrips(), direct_link_panel_list(), direct_link_pointcache_cb(), direct_link_region(), IDP_DirectLinkGroup(), image_blend_read_data(), ipo_blend_read_data(), linestyle_blend_read_data(), link_recurs_seq(), mask_blend_read_data(), metaball_blend_read_data(), movieclip_blend_read_data(), ntreeBlendReadData(), object_blend_read_data(), palette_blend_read_data(), particle_settings_blend_read_data(), read_userdef(), scene_blend_read_data(), SEQ_modifier_blend_read_data(), shapekey_blend_read_data(), text_blend_read_data(), window_manager_blend_read_data(), and workspace_blend_read_data().
| void BLO_read_list_cb | ( | BlendDataReader * | reader, |
| ListBase * | list, | ||
| BlendReadListFn | callback | ||
| ) |
Updates all ->prev and ->next pointers of the list elements. Updates the list->first and list->last pointers. When not NULL, calls the callback on every element.
Definition at line 5630 of file readfile.c.
References BLI_listbase_is_empty(), BLO_read_data_address, callback, ListBase::first, ListBase::last, Link::next, NULL, and Link::prev.
Referenced by BLO_read_list(), direct_link_id_common(), direct_link_id_override_property_cb(), and direct_link_pointcache().
| void BLO_read_pointer_array | ( | BlendDataReader * | reader, |
| void ** | ptr_p | ||
| ) |
Definition at line 5727 of file readfile.c.
References BLI_assert, convert_pointer_array_32_to_64(), convert_pointer_array_64_to_32(), BlendDataReader::fd, FileData::filesdna, MEM_allocN_len, MEM_freeN, MEM_malloc_arrayN, FileData::memsdna, newdataadr(), NULL, and SDNA::pointer_size.
Referenced by BKE_gpencil_blend_read_data(), curve_blend_read_data(), direct_link_moviePlaneTracks(), hair_blend_read_data(), IDP_DirectLinkArray(), mesh_blend_read_data(), metaball_blend_read_data(), object_blend_read_data(), pointcloud_blend_read_data(), and volume_blend_read_data().
| bool BLO_read_requires_endian_switch | ( | BlendDataReader * | reader | ) |
Definition at line 5620 of file readfile.c.
References BlendDataReader::fd, FD_FLAGS_SWITCH_ENDIAN, and FileData::flags.
Referenced by blend_read_mdisps(), BLO_read_double_array(), BLO_read_float_array(), BLO_read_int32_array(), BLO_read_uint32_array(), convert_pointer_array_64_to_32(), curve_blend_read_data(), direct_link_lightcache_texture(), direct_link_pointcache_cb(), IDP_DirectLinkProperty(), ipo_blend_read_data(), mask_blend_read_data(), mesh_blend_read_data(), and shapekey_blend_read_data().
| void BLO_read_uint32_array | ( | BlendDataReader * | reader, |
| int | array_size, | ||
| uint32_t ** | ptr_p | ||
| ) |
Definition at line 5667 of file readfile.c.
References BLI_endian_switch_uint32_array(), BLO_read_data_address, and BLO_read_requires_endian_switch().
Referenced by blendRead().
| void BLO_reportf_wrap | ( | ReportList * | reports, |
| ReportType | type, | ||
| const char * | format, | ||
| ... | |||
| ) |
This function ensures that reports are printed, in the case of library linking errors this is important!
bit kludge but better than doubling up on prints, we could alternatively have a versions of a report function which forces printing - campbell
Definition at line 228 of file readfile.c.
References BKE_report(), BKE_report_type_str(), G, and type.
Referenced by direct_link_library(), expand_doit_library(), read_library_file_data(), and read_library_linked_id().
Definition at line 496 of file readfile.c.
References BKE_main_new(), BLI_addtail(), BLI_listbase_count(), BLI_listbase_is_empty(), Main::curlib, ListBase::first, GS, id, ID_LI, INDEX_ID_MAX, ListBase::last, lib, main(), MEM_freeN, MEM_malloc_arrayN, ID::name, NULL, set_listbasepointers(), split_libdata(), Main::subversionfile, and Main::versionfile.
Referenced by BLO_main_validate_libraries(), blo_read_file_internal(), BLO_read_from_memfile(), library_link_begin(), library_link_end(), and write_file_handle().
| BlendThumbnail* BLO_thumbnail_from_file | ( | const char * | filepath | ) |
Does a very light reading of given .blend file to extract its stored thumbnail.
| filepath | The path of the file to extract thumbnail from. |
Definition at line 1769 of file readfile.c.
References BLEN_THUMB_MEMSIZE, BLEN_THUMB_MEMSIZE_FILE, BLEN_THUMB_MEMSIZE_IS_VALID, BLI_assert, blo_filedata_free(), blo_filedata_from_file_minimal(), data, height, MEM_mallocN, NULL, read_file_thumbnail(), and width.
Referenced by IMB_thumb_load_blend().
|
static |
Definition at line 1860 of file readfile.c.
References change_link_placeholder_to_real_ID_pointer_fd(), and LISTBASE_FOREACH.
Referenced by direct_link_library(), read_library_clear_weak_links(), and read_library_linked_ids().
|
static |
Definition at line 1846 of file readfile.c.
References OldNewMap::entries, GS, ID_LINK_PLACEHOLDER, FileData::libmap, OldNewMap::nentries, OldNew::newp, and OldNew::nr.
Referenced by change_link_placeholder_to_real_ID_pointer(), and expand_doit_library().
|
static |
Definition at line 5716 of file readfile.c.
Referenced by BLO_read_pointer_array().
|
static |
Definition at line 5696 of file readfile.c.
References BLI_endian_switch_uint64(), BLO_read_requires_endian_switch(), and ptr.
Referenced by BLO_read_pointer_array().
|
static |
Definition at line 3190 of file readfile.c.
References BKE_lib_libblock_session_uuid_ensure(), BKE_libblock_alloc_notest(), BKE_libblock_init_empty(), BLI_addtail(), BLI_strncpy(), Main::curlib, ID::icon_id, ID_FAKE_USERS, id_sort_by_name(), ID::lib, LIB_TAG_MISSING, LIB_TAG_TEMP_MAIN, ID::name, NULL, ID::tag, ID::us, and which_libbase().
Referenced by link_named_part(), and read_library_linked_id().
|
static |
Definition at line 3225 of file readfile.c.
References ID_AC, ID_AR, ID_BR, ID_CA, ID_CF, ID_CU, ID_GD, ID_GR, ID_HA, ID_IM, ID_IP, ID_KE, ID_LA, ID_LI, ID_LP, ID_LS, ID_LT, ID_MA, ID_MB, ID_MC, ID_ME, ID_MSK, ID_NT, ID_OB, ID_PA, ID_PAL, ID_PC, ID_PT, ID_SCE, ID_SCR, ID_SIM, ID_SO, ID_SPK, ID_TE, ID_TXT, ID_VF, ID_VO, ID_WM, ID_WO, and ID_WS.
Referenced by OSLRenderServices::get_texture_info(), and read_libblock().
|
static |
Definition at line 1001 of file readfile.c.
References B_ENDIAN, ELEM, ENDIAN_ORDER, FD_FLAGS_FILE_OK, FD_FLAGS_FILE_POINTSIZE_IS_4, FD_FLAGS_POINTSIZE_DIFFERS, FD_FLAGS_SWITCH_ENDIAN, FileData::fileversion, FileData::flags, L_ENDIAN, NULL, FileData::read, SIZEOFBLENDERHEADER, and STREQLEN.
Referenced by blo_decode_and_check(), and blo_filedata_from_file_minimal().
|
static |
Definition at line 3312 of file readfile.c.
References BKE_idtype_get_info_from_id(), BKE_idtype_id_foreach_cache(), BKE_screen_blend_read_data(), IDTypeInfo::blend_read_data, blo_cache_storage_entry_restore_in_new(), FileData::cache_storage, direct_link_id_common(), direct_link_library(), BlendDataReader::fd, IDTypeInfo::foreach_cache, GS, id, ID_LI, ID_SCR, LIB_TAG_ID_LINK_PLACEHOLDER, main(), ID::name, and NULL.
Referenced by read_libblock().
|
static |
Definition at line 2437 of file readfile.c.
References ID::asset_data, BKE_asset_metadata_read(), BKE_lib_libblock_session_uuid_ensure(), BLI_listbase_clear(), BLO_read_data_address, BLO_read_data_is_undo(), BLO_read_list_cb(), BLO_READ_SKIP_UNDO_OLD_MAIN, direct_link_id_embedded_id(), direct_link_id_override_property_cb(), direct_link_id_restore_recalc(), DRW_drawdatalist_from_id(), BlendDataReader::fd, id, ID_FAKE_USERS, IDP_BlendDataRead, LIB_INDIRECT_WEAK_LINK, LIB_TAG_ID_LINK_PLACEHOLDER, LIB_TAG_TEMP_MAIN, MAIN_ID_SESSION_UUID_UNSET, NULL, ID::override_library, IDOverrideLibrary::properties, ID::properties, and FileData::skip_flags.
Referenced by direct_link_id(), and direct_link_id_embedded_id().
|
static |
Definition at line 2349 of file readfile.c.
References BKE_collection_blend_read_data(), BKE_ntree_ptr_from_id(), BLO_read_data_address, direct_link_id_common(), GS, id, Collection::id, ID_SCE, Scene::master_collection, ID::name, ntreeBlendReadData(), ntreeFromID(), NULL, and scene.
Referenced by direct_link_id_common().
|
static |
Definition at line 2335 of file readfile.c.
References BLO_read_data_address, BLO_read_list_cb(), data, direct_link_id_override_property_operation_cb(), IDOverrideLibraryProperty::operations, IDOverrideLibraryProperty::rna_path, and IDOverrideLibraryProperty::tag.
Referenced by direct_link_id_common().
|
static |
Definition at line 2325 of file readfile.c.
References BLO_read_data_address, data, IDOverrideLibraryPropertyOperation::subitem_local_name, IDOverrideLibraryPropertyOperation::subitem_reference_name, and IDOverrideLibraryPropertyOperation::tag.
Referenced by direct_link_id_override_property_cb().
|
static |
Definition at line 2391 of file readfile.c.
References BLI_assert, direct_link_id_restore_recalc_exceptions(), ID_RECALC_ALL, ID_RECALC_COPY_ON_WRITE, NULL, ID::recalc, ID::recalc_up_to_undo_push, STEP_REDO, STEP_UNDO, and FileData::undo_direction.
Referenced by direct_link_id_common().
|
static |
Definition at line 2380 of file readfile.c.
References GS, ID_OB, ID_RECALC_GEOMETRY, and ID::name.
Referenced by direct_link_id_restore_recalc(), and read_libblock_undo_restore_identical().
|
static |
Definition at line 3996 of file readfile.c.
References BLO_read_data_address, wmKeyMapItem::flag, IDP_BlendDataRead, KMI_UPDATE, NULL, wmKeyMapItem::properties, and wmKeyMapItem::ptr.
Referenced by read_userdef().
Definition at line 3096 of file readfile.c.
References BKE_main_new(), BKE_packedfile_blend_read(), BLI_addtail(), BLI_path_cmp, BLI_path_normalize(), BLI_remlink(), BLI_strncpy(), BLO_reportf_wrap(), change_link_placeholder_to_real_ID_pointer(), Main::curlib, Library::filepath_abs, ListBase::first, id_us_ensure_real(), lib, main(), FileData::mainlist, MEM_freeN, Main::next, NULL, FileData::relabase, FileData::reports, RPT_WARNING, and TIP_.
Referenced by direct_link_id().
Definition at line 3839 of file readfile.c.
References BLI_strncpy(), blo_do_versions_250(), blo_do_versions_260(), blo_do_versions_270(), blo_do_versions_280(), blo_do_versions_290(), blo_do_versions_cycles(), blo_do_versions_pre250(), G, G_DEBUG, lib, LIKELY, main(), NULL, and FileData::relabase.
Referenced by blo_read_file_internal(), and read_libraries().
|
static |
Definition at line 3881 of file readfile.c.
References do_versions_after_linking_250(), do_versions_after_linking_260(), do_versions_after_linking_270(), do_versions_after_linking_280(), do_versions_after_linking_290(), do_versions_after_linking_cycles(), and main().
Referenced by blo_read_file_internal(), and library_link_end().
|
static |
Definition at line 3828 of file readfile.c.
References blo_do_versions_userdef(), NULL, and BlendFileData::user.
Referenced by blo_read_file_internal().
|
static |
Definition at line 4417 of file readfile.c.
References BHeadSort::bhead, blo_bhead_id_name(), blo_find_main(), BLO_reportf_wrap(), change_link_placeholder_to_real_ID_pointer_fd(), BHead::code, Main::curlib, Library::filepath_abs, find_bhead(), find_previous_lib(), G, G_DEBUG, id, ID_LINK_PLACEHOLDER, ID_SCR, ID_SCRN, FileData::id_tag_extra, is_yet_read(), lib, LIB_INDIRECT_WEAK_LINK, LIB_TAG_ID_LINK_PLACEHOLDER, LIB_TAG_INDIRECT, LIB_TAG_NEED_EXPAND, FileData::libmap, MEM_freeN, ID::name, NULL, BHeadSort::old, BHead::old, oldnewmap_insert(), Library::parent, read_libblock(), read_struct(), FileData::relabase, FileData::reports, RPT_WARNING, ID::tag, and TIP_.
Referenced by library_link_end(), and read_libraries().
|
static |
Definition at line 4553 of file readfile.c.
References BKE_animdata_blend_read_expand(), BKE_animdata_from_id(), BLO_expand, expand_id_embedded_id(), id, IDP_BlendReadExpand(), NULL, ID::override_library, ID::properties, IDOverrideLibrary::reference, and IDOverrideLibrary::storage.
Referenced by BLO_expand_main(), expand_id_embedded_id(), and nodelink_batch_init().
|
static |
Definition at line 4535 of file readfile.c.
References BKE_collection_blend_read_expand(), expand_id(), GS, id, Collection::id, bNodeTree::id, ID_SCE, Scene::master_collection, ID::name, ntreeBlendReadExpand(), ntreeFromID(), NULL, and scene.
Referenced by expand_id().
|
static |
Definition at line 1143 of file readfile.c.
References buffer, FileData::file_offset, FileData::filedes, and size().
Referenced by blo_filedata_from_file_descriptor().
|
static |
Definition at line 1252 of file readfile.c.
References MemFileChunk::buf, buffer, MemFile::chunks, FileData::file_offset, ListBase::first, MemFileChunk::is_identical, MemFileChunk::is_identical_future, FileData::memfile, MemFileChunk::next, NULL, POINTER_OFFSET, size(), MemFileChunk::size, SIZE_MAX, STEP_REDO, and FileData::undo_direction.
Referenced by blo_filedata_from_memfile().
|
static |
Definition at line 1189 of file readfile.c.
References buffer, FileData::buffer, FileData::buffersize, FileData::file_offset, MIN2, and size().
Referenced by blo_filedata_from_memory().
|
static |
Definition at line 1209 of file readfile.c.
References BLI_mmap_read(), buffer, FileData::buffersize, FileData::file_offset, MIN2, FileData::mmap_file, and size().
Referenced by blo_filedata_from_file_descriptor().
|
static |
Definition at line 1168 of file readfile.c.
References BLI_assert, buffer, FileData::file_offset, FileData::gzfiledes, and size().
Referenced by blo_filedata_from_file_descriptor().
|
static |
Definition at line 1499 of file readfile.c.
References buffer, err, FileData::file_offset, size(), and FileData::strm.
Referenced by fd_read_gzip_from_memory_init().
|
static |
Definition at line 1525 of file readfile.c.
References FileData::buffer, FileData::buffersize, fd_read_gzip_from_memory(), if(), FileData::read, and FileData::strm.
Referenced by blo_filedata_from_memory().
|
static |
Definition at line 1160 of file readfile.c.
References BLI_lseek(), FileData::file_offset, and FileData::filedes.
Referenced by blo_filedata_from_file_descriptor().
|
static |
Definition at line 1226 of file readfile.c.
References FileData::buffersize, and FileData::file_offset.
Referenced by blo_filedata_from_file_descriptor().
|
static |
Definition at line 1332 of file readfile.c.
References FileData::datamap, DNA_sdna_current_get(), FileData::filedes, FileData::globmap, FileData::gzfiledes, FileData::libmap, MEM_callocN, FileData::memsdna, NULL, and oldnewmap_new().
Referenced by blo_filedata_from_file_descriptor(), blo_filedata_from_memfile(), and blo_filedata_from_memory().
Definition at line 4332 of file readfile.c.
References BHeadSort::bhead, FileData::bheadmap, blo_bhead_first(), blo_bhead_next(), NULL, BHeadSort::old, BHead::old, sort_bhead_old_map(), FileData::tot_bheadmap, and verg_bheadsort().
Referenced by expand_doit_library().
|
static |
Definition at line 4365 of file readfile.c.
References BHeadSort::bhead, FileData::bhead_idname_hash, BLI_ghash_lookup(), BLI_strncpy(), blo_bhead_first(), blo_bhead_id_name(), blo_bhead_next(), BHead::code, ENDB, MAX_ID_NAME, NULL, and STREQ.
Referenced by find_bhead_from_idname(), and link_named_part().
Definition at line 4395 of file readfile.c.
References FileData::bhead_idname_hash, BLI_ghash_lookup(), find_bhead_from_code_name(), and GS.
Referenced by read_library_linked_id().
Definition at line 4316 of file readfile.c.
References BHeadSort::bhead, blo_bhead_prev(), BHead::code, ID_LI, FileData::memfile, and NULL.
Referenced by expand_doit_library().
|
static |
Definition at line 3156 of file readfile.c.
References BLI_path_is_rel(), BLI_path_rel(), BLI_strncpy(), lib, LISTBASE_FOREACH, main(), and NULL.
Referenced by blo_read_file_internal(), and library_link_end().
Definition at line 756 of file readfile.c.
References bh4_from_bh8(), bh8_from_bh4(), BHeadN::bhead, FileData::bhead_list, BHEAD_USE_READ_ON_DEMAND, BLI_addtail(), BLI_assert, BHead4::code, BHead8::code, DATA, ENDB, FD_FLAGS_FILE_POINTSIZE_IS_4, FD_FLAGS_POINTSIZE_DIFFERS, FD_FLAGS_SWITCH_ENDIAN, BHeadN::file_offset, FileData::file_offset, FileData::flags, BHeadN::has_data, FileData::is_eof, BHeadN::is_memchunk_identical, BHead::len, MEM_freeN, MEM_mallocN, MIN2, BHeadN::next, NULL, BHeadN::prev, FileData::read, FileData::seek, switch_endian_bh4(), and switch_endian_bh8().
Referenced by blo_bhead_first(), and blo_bhead_next().
|
static |
Definition at line 5282 of file readfile.c.
References Freestyle::a, ID::flag, id, INDEX_ID_MAX, LIB_INDIRECT_WEAK_LINK, LIB_TAG_ID_LINK_PLACEHOLDER, LISTBASE_FOREACH, set_listbasepointers(), and ID::tag.
Referenced by read_libraries().
|
static |
Definition at line 1899 of file readfile.c.
References oldnewmap_insert(), FileData::packedmap, and pf.
Referenced by blo_make_packed_pointer_map().
Definition at line 4404 of file readfile.c.
References BHeadSort::bhead, BLI_findstring(), blo_bhead_id_name(), GS, and which_libbase().
Referenced by expand_doit_library(), and link_named_part().
Definition at line 3905 of file readfile.c.
References BKE_idtype_get_info_from_id(), IDTypeInfo::blend_read_lib, IDTypeInfo::blend_read_undo_preserve, BLI_assert, BLO_READ_SKIP_UNDO_OLD_MAIN, FOREACH_MAIN_ID_BEGIN, FOREACH_MAIN_ID_END, GS, id, ID_LI, ID_WM, lib_link_id(), lib_link_library(), LIB_TAG_NEED_LINK, LIB_TAG_UNDO_OLD_ID_REUSED, FileData::memfile, ID::name, NULL, ID::orig_id, FileData::skip_flags, and ID::tag.
Referenced by blo_read_file_internal(), library_link_end(), and read_libraries().
|
static |
Definition at line 2696 of file readfile.c.
References lib_link_seq_clipboard_cb(), SEQ_iterator_seqbase_recursive_apply(), and seqbase_clipboard.
Referenced by blo_lib_link_restore().
|
static |
Definition at line 2306 of file readfile.c.
References BKE_animdata_blend_read_lib(), BKE_animdata_from_id(), BLI_assert, BLO_read_id_address, GS, id, ID_WM, IDP_BlendReadLib(), ID::lib, lib_link_id_embedded_id(), ID::name, NULL, ID::override_library, ID::properties, IDOverrideLibrary::reference, and IDOverrideLibrary::storage.
Referenced by lib_link_all(), and lib_link_id_embedded_id().
|
static |
Definition at line 2287 of file readfile.c.
References BKE_collection_blend_read_lib(), GS, id, Collection::id, bNodeTree::id, ID_SCE, lib_link_id(), Scene::master_collection, ID::name, ntreeBlendReadLib(), ntreeFromID(), NULL, and scene.
Referenced by lib_link_id().
|
static |
Definition at line 3150 of file readfile.c.
Referenced by lib_link_all().
|
static |
Definition at line 2734 of file readfile.c.
References BKE_library_foreach_ID_link(), FOREACH_MAIN_ID_BEGIN, FOREACH_MAIN_ID_END, id, IDWALK_NOP, and lib_link_main_data_restore_cb().
Referenced by blo_lib_link_restore().
|
static |
Definition at line 2702 of file readfile.c.
References BLI_assert, LibraryIDLinkCallbackData::cb_flag, COLLECTION_IS_MASTER, Collection::flag, GS, ID_GR, LibraryIDLinkCallbackData::id_pointer, IDWALK_CB_EMBEDDED, IDWALK_CB_USER_ONE, IDWALK_RET_NOP, NULL, restore_pointer_by_name(), LibraryIDLinkCallbackData::user_data, USER_IGNORE, and USER_REAL.
Referenced by lib_link_main_data_restore().
|
static |
Definition at line 2579 of file readfile.c.
References BLI_listbase_count(), Scene::flag, Scene::id, LISTBASE_FOREACH, ID::name, SCE_READFILE_LIBLINK_NEED_SETSCENE_CHECK, Main::scenes, and UNUSED_VARS.
Referenced by after_liblink_merged_bmain_process().
|
static |
Definition at line 2684 of file readfile.c.
References Sequence::clip, lib_link_seq_clipboard_pt_restore(), Sequence::mask, Sequence::scene, Sequence::scene_camera, and Sequence::sound.
Referenced by lib_link_clipboard_restore().
|
static |
Definition at line 2676 of file readfile.c.
References BLI_assert, id, ID::newid, NULL, restore_pointer_by_name(), and USER_REAL.
Referenced by lib_link_seq_clipboard_cb().
|
static |
Definition at line 2749 of file readfile.c.
References blender::compositor::area(), bScreen::areabase, BKE_workspace_active_screen_get(), Scene::camera, View3D::camera, ListBase::first, LISTBASE_FOREACH, Base::local_view_bits, View3D::local_view_uuid, RegionView3D::localvd, View3D::localvd, MEM_freeN, Base::next, NULL, ViewLayer::object_bases, RGN_TYPE_WINDOW, scene, View3D::scenelock, SPACE_VIEW3D, and wmWindow::workspace_hook.
Referenced by blo_lib_link_restore().
|
static |
Definition at line 2743 of file readfile.c.
References XrSessionSettings::base_pose_object, restore_pointer_by_name(), wmXrData::session_settings, and USER_REAL.
Referenced by blo_lib_link_restore().
|
static |
Definition at line 2798 of file readfile.c.
References SpaceAction::action, SpaceAction::ads, SpaceGraph::ads, SpaceNla::ads, blender::compositor::area(), bScreen::areabase, BKE_workspace_layout_screen_get(), BLI_mempool_iternew(), BLI_mempool_iterstep(), BLI_remlink(), View3D::camera, SpaceClip::clip, context, SpaceSpreadsheet::context_path, SpaceNode::edittree, FILE_TAG_REBUILD_MAIN_FILES, bDopeSheet::filter_grp, ListBase::first, SpaceAction_Runtime::flag, SpaceProperties::flag, SpaceGraph_Runtime::flag, SpaceNode::from, SpaceSeq::gpd, SpaceImage::gpd, TreeStoreElem::id, SpaceNode::id, SpaceImage::image, SpaceImage::iuser, ListBase::last, LISTBASE_FOREACH, MaskSpaceInfo::mask, SpaceImage::mask_info, SpaceClip::mask_info, MEM_freeN, MEM_SAFE_FREE, bNodeTreePath::next, bNodeTreePath::nodetree, SpaceNode::nodetree, ntree, ntreeFromID(), NULL, View3D::ob_center, SpreadsheetContextObject::object, Scopes::ok, MovieClipScopes::ok, SpaceFile::op, SpaceProperties::path, SpaceProperties::pinid, SpaceFile::previews_timer, restore_pointer_by_name(), SpaceAction::runtime, SpaceGraph::runtime, SACTION_RUNTIME_FLAG_NEED_CHAN_SYNC, SB_PIN_CONTEXT, ImageUser::scene, SpaceImage::scopes, SpaceClip::scopes, SpaceScript::script, SCRIPT_SET_NULL, SpaceOutliner::search_tse, SIPO_RUNTIME_FLAG_NEED_CHAN_SYNC_COLOR, SO_TREESTORE_REBUILD, bDopeSheet::source, SPACE_ACTION, SPACE_CLIP, SPACE_FILE, SPACE_GRAPH, SPACE_IMAGE, SPACE_NLA, SPACE_NODE, SPACE_OUTLINER, SPACE_PROPERTIES, SPACE_SCRIPT, SPACE_SEQ, SPACE_SPREADSHEET, SPACE_TEXT, SPACE_VIEW3D, SPREADSHEET_CONTEXT_OBJECT, SpaceOutliner::storeflag, SpaceFile::tags, SpaceText::text, Main::texts, SpaceNode::treepath, SpaceOutliner::treestore, TSE_IS_REAL_ID, USER_IGNORE, USER_REAL, Scopes::vecscope, Scopes::waveform_1, Scopes::waveform_2, and Scopes::waveform_3.
Referenced by blo_lib_link_restore().
|
static |
Definition at line 5034 of file readfile.c.
References BKE_main_blendfile_path(), BLI_assert, blo_find_main(), BLO_LIBLINK_NEEDS_ID_TAG_DOIT, blo_split_main(), LIB_TAG_TEMP_MAIN, library_link_clear_tag(), MEM_callocN, read_file_bhead_idname_map_create(), read_file_version(), and Main::versionfile.
Referenced by BLO_library_link_begin().
|
static |
Clears LIB_TAG_DOIT based on the result of library_link_idcode_needs_tag_check.
Definition at line 5023 of file readfile.c.
References BKE_idtype_idcode_from_index(), BKE_main_id_tag_idcode(), BLI_assert, INDEX_ID_MAX, LIB_TAG_DOIT, and library_link_idcode_needs_tag_check().
Referenced by library_link_begin(), and library_link_end().
|
static |
| scene | The scene in which to instantiate objects/collections (if NULL, no instantiation is done). |
| v3d | The active 3D viewport. (only to define active layers for instantiated objects & collections, can be NULL). |
Definition at line 5147 of file readfile.c.
References add_collections_to_scene(), add_loose_object_data_to_scene(), add_loose_objects_to_scene(), add_main_to_main(), after_liblink_merged_bmain_process(), BKE_collections_after_lib_link(), BKE_main_blendfile_path(), BKE_main_blendfile_path_from_global(), BKE_main_free(), BKE_main_id_refcount_recompute(), BKE_main_id_tag_all(), BKE_main_new(), BLI_assert, BLI_path_rel(), BLI_strncpy(), BLO_expand_main(), blo_filedata_free(), blo_join_main(), BLO_LIBLINK_NEEDS_ID_TAG_DOIT, BLO_main_expander(), blo_split_main(), Main::curlib, do_versions_after_linking(), expand_doit_library(), FD_FLAGS_SWITCH_ENDIAN, FILE_RELPATH, Library::filepath, Library::filepath_abs, fix_relpaths_library(), lib_link_all(), LIB_TAG_NEW, library_link_clear_tag(), FileData::mainlist, MEM_freeN, Main::next, ntreeUpdateAllNew(), NULL, placeholders_ensure_valid(), read_libraries(), scene, split_main_newid(), and Main::versionfile.
Referenced by BLO_library_link_end().
|
static |
Checks if the idcode needs to be tagged with LIB_TAG_DOIT when linking/appending.
Definition at line 5004 of file readfile.c.
References BLO_LIBLINK_NEEDS_ID_TAG_DOIT, ELEM, FILE_OBDATA_INSTANCE, ID_GR, ID_OB, and OB_DATA_SUPPORT_ID.
Referenced by library_link_clear_tag(), and link_named_part().
|
static |
Definition at line 248 of file readfile.c.
References lib.
Referenced by read_library_file_data(), and read_library_linked_id().
Definition at line 2250 of file readfile.c.
References BLI_listbase_is_empty(), ListBase::first, FileData::globmap, ListBase::last, newdataadr(), Link::next, NULL, oldnewmap_insert(), and Link::prev.
Referenced by BLO_read_glob_list().
|
static |
Definition at line 3809 of file readfile.c.
References blo_read_get_new_globaldata_address(), BlendFileData::cur_view_layer, BlendFileData::curscene, BlendFileData::curscreen, newlibadr(), and NULL.
Referenced by blo_read_file_internal().
|
static |
Definition at line 4878 of file readfile.c.
References BHeadSort::bhead, BKE_idtype_idcode_is_linkable(), BKE_idtype_idcode_is_valid(), BLI_assert, BLO_LIBLINK_FORCE_INDIRECT, BLO_LIBLINK_NEEDS_ID_TAG_DOIT, BLO_LIBLINK_USE_PLACEHOLDERS, BHead::code, create_placeholder(), find_bhead_from_code_name(), G, id, id_sort_by_name(), FileData::id_tag_extra, is_yet_read(), LIB_INDIRECT_WEAK_LINK, LIB_TAG_DOIT, LIB_TAG_EXTERN, LIB_TAG_INDIRECT, LIB_TAG_NEED_EXPAND, FileData::libmap, library_link_idcode_needs_tag_check(), NULL, BHead::old, oldnewmap_insert(), read_libblock(), ID::tag, and which_libbase().
Referenced by BLO_library_link_named_part().
|
static |
Definition at line 1806 of file readfile.c.
References FileData::datamap, and oldnewmap_lookup_and_inc().
Referenced by blendRead(), BLO_read_get_new_data_address(), BLO_read_pointer_array(), direct_link_area(), link_glob_list(), and speaker_blend_read_data().
|
static |
Definition at line 1812 of file readfile.c.
References FileData::datamap, and oldnewmap_lookup_and_inc().
Referenced by BLO_read_get_new_data_address_no_us().
|
static |
Definition at line 1834 of file readfile.c.
References lib, FileData::libmap, and oldnewmap_liblookup().
Referenced by blo_do_versions_newlibadr(), BLO_read_get_new_id_address(), and link_global().
|
static |
Definition at line 1824 of file readfile.c.
References FileData::datamap, oldnewmap_lookup_and_inc(), and FileData::packedmap.
Referenced by blo_end_packed_pointer_map(), and BLO_read_get_new_packed_address().
|
static |
Shared operations to perform on the object's base after adding it to the scene.
Definition at line 4659 of file readfile.c.
References ViewLayer::basact, BASE_SELECTABLE, BASE_SELECTED, BKE_scene_object_base_flag_sync_from_base(), BKE_view_layer_base_find(), Base::flag, Base::local_view_bits, View3D::local_view_uuid, and NULL.
Referenced by add_collections_to_scene(), add_loose_object_data_to_scene(), and add_loose_objects_to_scene().
Definition at line 4638 of file readfile.c.
References BKE_collection_has_object(), Main::collections, LISTBASE_FOREACH, Scene::master_collection, NULL, scene, and Main::scenes.
Referenced by add_loose_objects_to_scene().
Definition at line 4627 of file readfile.c.
References BKE_scene_object_find(), LISTBASE_FOREACH, and Main::scenes.
Referenced by add_collections_to_scene().
|
static |
Definition at line 414 of file readfile.c.
References OldNewMap::capacity_exp, DEFAULT_SIZE_EXP, OldNewMap::entries, MEM_freeN, OldNewMap::nentries, OldNew::newp, OldNew::nr, NULL, and oldnewmap_clear_map().
Referenced by blo_read_asset_data_block(), read_libblock(), and read_userdef().
|
static |
Definition at line 332 of file readfile.c.
References OldNewMap::map, and MAP_CAPACITY.
Referenced by oldnewmap_clear(), oldnewmap_increase_size(), and oldnewmap_new().
|
static |
Definition at line 430 of file readfile.c.
References OldNewMap::entries, OldNewMap::map, and MEM_freeN.
Referenced by blo_filedata_free(), and read_library_file_data().
|
static |
Definition at line 337 of file readfile.c.
References OldNewMap::capacity_exp, OldNewMap::entries, ENTRIES_CAPACITY, OldNewMap::map, MAP_CAPACITY, MEM_reallocN, OldNewMap::nentries, oldnewmap_clear_map(), oldnewmap_insert_index_in_map(), and OldNew::oldp.
Referenced by oldnewmap_insert().
|
static |
Definition at line 363 of file readfile.c.
References ENTRIES_CAPACITY, OldNewMap::nentries, OldNew::newp, OldNew::nr, NULL, oldnewmap_increase_size(), oldnewmap_insert_or_replace(), OldNew::oldp, and UNLIKELY.
Referenced by blo_add_library_pointer_map(), blo_do_versions_oldnewmap_insert(), BLO_read_data_globmap_add(), expand_doit_library(), insert_packedmap(), link_glob_list(), link_named_part(), read_data_into_datamap(), read_libblock(), read_libblock_undo_restore(), and read_libblock_undo_restore_linked().
|
static |
Definition at line 291 of file readfile.c.
References ITER_SLOTS, OldNewMap::map, and ptr.
Referenced by oldnewmap_increase_size().
Definition at line 301 of file readfile.c.
References OldNewMap::entries, ITER_SLOTS, OldNewMap::map, OldNewMap::nentries, and OldNew::oldp.
Referenced by oldnewmap_insert().
|
static |
Definition at line 398 of file readfile.c.
References id, lib, ID::lib, NULL, and oldnewmap_lookup_and_inc().
Referenced by newlibadr().
|
static |
Definition at line 385 of file readfile.c.
References OldNew::newp, OldNew::nr, NULL, and oldnewmap_lookup_entry().
Referenced by blo_read_get_new_globaldata_address(), newdataadr(), newdataadr_no_us(), newpackedadr(), and oldnewmap_liblookup().
Definition at line 317 of file readfile.c.
References OldNewMap::entries, ITER_SLOTS, NULL, and OldNew::oldp.
Referenced by oldnewmap_lookup_and_inc().
|
static |
Definition at line 350 of file readfile.c.
References OldNewMap::capacity_exp, DEFAULT_SIZE_EXP, OldNewMap::entries, ENTRIES_CAPACITY, OldNewMap::map, MAP_CAPACITY, MEM_callocN, MEM_malloc_arrayN, and oldnewmap_clear_map().
Referenced by blo_make_packed_pointer_map(), filedata_new(), and read_library_file_data().
Definition at line 2243 of file readfile.c.
References BLI_assert, BHead::len, FileData::memfile, NULL, and UNUSED_VARS_NDEBUG.
Referenced by read_libblock_undo_restore().
|
static |
Definition at line 3213 of file readfile.c.
References BKE_object_materials_test(), IDNameLib_Map::bmain, LIB_TAG_MISSING, LISTBASE_FOREACH, NULL, Main::objects, and ID::tag.
Referenced by blo_read_file_internal(), and library_link_end().
|
static |
Definition at line 3356 of file readfile.c.
References blo_bhead_next(), BHead::code, DATA, data, FileData::datamap, FileData::filesdna, BHead::old, oldnewmap_insert(), read_struct(), BHead::SDNAnr, SDNA::structs, and SDNA::types.
Referenced by blo_read_asset_data_block(), read_libblock(), and read_userdef().
|
static |
Definition at line 576 of file readfile.c.
References FileData::bhead_idname_hash, BKE_idtype_idcode_is_linkable(), BLI_assert, BLI_ghash_insert(), BLI_ghash_str_new_ex(), blo_bhead_first(), blo_bhead_id_name(), blo_bhead_is_id_valid_type(), blo_bhead_next(), BHead::code, ENDB, and NULL.
Referenced by library_link_begin(), and read_library_file_data().
|
static |
Definition at line 1044 of file readfile.c.
References BLI_assert, BLI_STATIC_ASSERT, blo_bhead_first(), blo_bhead_next(), blo_do_versions_dna(), BHead::code, FileData::compflags, DNA1, DNA_elem_offset(), DNA_reconstruct_info_create(), DNA_sdna_from_data(), DNA_struct_get_compareflags(), ENDB, FD_FLAGS_SWITCH_ENDIAN, FileData::filesdna, FileData::fileversion, FileData::flags, GLOB, FileData::id_asset_data_offset, FileData::id_name_offset, BHead::len, FileData::memsdna, FileData::reconstruct_info, and FileGlobal::subvstr.
Referenced by blo_decode_and_check().
|
static |
Definition at line 1095 of file readfile.c.
References BLEN_THUMB_MEMSIZE_FILE, BLEN_THUMB_MEMSIZE_IS_VALID, BLI_endian_switch_int32(), blo_bhead_first(), blo_bhead_next(), BHead::code, data, FD_FLAGS_SWITCH_ENDIAN, FileData::flags, height, BHead::len, NULL, REND, TEST, and width.
Referenced by blo_read_file_internal(), and BLO_thumbnail_from_file().
Definition at line 534 of file readfile.c.
References blo_bhead_first(), blo_bhead_next(), BHead::code, ENDB, GLOB, main(), MEM_freeN, FileGlobal::minsubversion, FileGlobal::minversion, read_struct(), and FileGlobal::subversion.
Referenced by blo_find_main(), library_link_begin(), and read_library_file_data().
|
static |
Definition at line 3762 of file readfile.c.
References BKE_main_blendfile_path(), BLI_strncpy(), blo_bhead_next(), Main::build_commit_timestamp, FileGlobal::build_commit_timestamp, Main::build_hash, FileGlobal::build_hash, BlendFileData::cur_view_layer, FileGlobal::cur_view_layer, BlendFileData::curscene, FileGlobal::curscene, BlendFileData::curscreen, FileGlobal::curscreen, BlendFileData::fileflags, FileData::fileflags, FileGlobal::fileflags, BlendFileData::filename, FileGlobal::filename, FileData::fileversion, G, G_FILE_RECOVER_READ, BlendFileData::globalf, FileData::globalf, FileGlobal::globalf, BlendFileData::main, MEM_freeN, FileGlobal::minsubversion, Main::minsubversionfile, FileGlobal::minversion, Main::minversionfile, read_struct(), FileData::relabase, FileGlobal::subversion, and Main::subversionfile.
Referenced by blo_read_file_internal().
|
static |
Definition at line 3631 of file readfile.c.
References BKE_id_free(), BLI_addtail(), blo_bhead_next(), BHead::code, FileData::datamap, dataname(), direct_link_id(), ID::flag, GS, id, ID_LINK_PLACEHOLDER, LIB_INDIRECT_WEAK_LINK, LIB_TAG_EXTERN, LIB_TAG_ID_LINK_PLACEHOLDER, LIB_TAG_INDIRECT, LIB_TAG_NEED_LINK, LIB_TAG_NEW, FileData::libmap, main(), MEM_freeN, FileData::memfile, ID::name, NULL, BHead::old, oldnewmap_clear(), oldnewmap_insert(), read_data_into_datamap(), read_libblock_undo_restore(), read_libblock_undo_restore_at_old_address(), read_struct(), and which_libbase().
Referenced by BLO_library_link_copypaste(), blo_read_file_internal(), expand_doit_library(), link_named_part(), and read_library_linked_id().
Definition at line 3389 of file readfile.c.
References BHEADN_FROM_BHEAD, blo_bhead_next(), BHead::code, DATA, and BHead::len.
Referenced by read_libblock_undo_restore().
|
static |
Definition at line 3551 of file readfile.c.
References BKE_main_idmap_lookup_uuid(), BLI_assert, BLO_READ_SKIP_UNDO_OLD_MAIN, BHead::code, DEBUG_PRINTF, ELEM, GS, id, ID_LI, ID_LINK_PLACEHOLDER, ID_SCR, ID_WM, ID_WS, LIB_TAG_UNDO_OLD_ID_REUSED, FileData::libmap, main(), ID::name, NULL, BHead::old, FileData::old_idmap, oldnewmap_insert(), peek_struct_undo(), read_libblock_is_identical(), read_libblock_undo_restore_identical(), read_libblock_undo_restore_library(), read_libblock_undo_restore_linked(), ID::session_uuid, and FileData::skip_flags.
Referenced by read_libblock().
|
static |
Definition at line 3519 of file readfile.c.
References BKE_lib_id_swap_full(), BLI_addtail(), BLI_assert, BLI_remlink(), BLO_READ_SKIP_UNDO_OLD_MAIN, ListBase::first, GS, id, main(), ID::name, NULL, FileData::old_mainlist, ID::orig_id, FileData::skip_flags, and which_libbase().
Referenced by read_libblock().
|
static |
Definition at line 3474 of file readfile.c.
References BLI_addtail(), BLI_assert, BLI_remlink(), BLO_READ_SKIP_UNDO_OLD_MAIN, direct_link_id_restore_recalc_exceptions(), ListBase::first, GS, ID_FAKE_USERS, ID_OB, ID::lib, LIB_TAG_EXTRAUSER, main(), Object::mode, ID::name, ID::newid, NULL, OB_MODE_EDIT, FileData::old_mainlist, ID::orig_id, Object::proxy, Object::proxy_from, ID::recalc, ID::recalc_after_undo_push, FileData::skip_flags, ID::tag, ID::us, and which_libbase().
Referenced by read_libblock_undo_restore().
Definition at line 3411 of file readfile.c.
References BLI_addtail(), BLI_remlink(), BLI_remlink_safe(), Main::curlib, DEBUG_PRINTF, ListBase::first, id, Library::id, Main::libraries, main(), FileData::mainlist, ID::name, Main::next, FileData::old_mainlist, and STREQ.
Referenced by read_libblock_undo_restore().
|
static |
Definition at line 3448 of file readfile.c.
References BKE_libblock_find_name(), DEBUG_PRINTF, GS, id, FileData::libmap, main(), ID::name, NULL, BHead::old, and oldnewmap_insert().
Referenced by read_libblock_undo_restore().
Definition at line 5497 of file readfile.c.
References add_main_to_main(), BKE_main_free(), BKE_main_new(), BKE_reportf(), BLO_expand_main(), blo_filedata_free(), BLO_main_expander(), do_versions(), expand_doit_library(), ListBase::first, has_linked_ids_to_read(), lib_link_all(), FileData::library_file_missing_count, FileData::library_id_missing_count, Main::next, NULL, read_library_clear_weak_links(), read_library_file_data(), read_library_linked_ids(), FileData::reports, RPT_WARNING, and split_main_newid().
Referenced by blo_read_file_internal(), and library_link_end().
|
static |
Definition at line 5397 of file readfile.c.
References Freestyle::a, BLI_freelinkN(), change_link_placeholder_to_real_ID_pointer(), ListBase::first, ID::flag, id, INDEX_ID_MAX, LIB_INDIRECT_WEAK_LINK, LIB_TAG_ID_LINK_PLACEHOLDER, ID::next, NULL, set_listbasepointers(), and ID::tag.
Referenced by read_libraries().
|
static |
Definition at line 5419 of file readfile.c.
References BLI_strncpy(), blo_filedata_from_file(), blo_filedata_from_memory(), BLO_reportf_wrap(), Main::curlib, Library::filedata, Library::filepath, Library::filepath_abs, FileData::fileversion, Library::id, LIB_TAG_MISSING, FileData::libmap, FileData::library_file_missing_count, library_parent_filepath(), FileData::mainlist, NULL, oldnewmap_free(), oldnewmap_new(), Library::packedfile, pf, read_file_bhead_idname_map_create(), read_file_version(), FileData::relabase, FileData::reports, RPT_INFO, Main::subversionfile, Library::subversionfile, ID::tag, TIP_, Main::versionfile, and Library::versionfile.
Referenced by read_libraries().
|
static |
Definition at line 5298 of file readfile.c.
References BHeadSort::bhead, BKE_idtype_idcode_is_linkable(), BKE_idtype_idcode_to_name(), BLO_reportf_wrap(), create_placeholder(), Main::curlib, Library::filepath_abs, find_bhead_from_idname(), GS, id, is_valid, LIB_INDIRECT_WEAK_LINK, LIB_TAG_EXTERN, LIB_TAG_ID_LINK_PLACEHOLDER, LIB_TAG_NEED_EXPAND, FileData::library_id_missing_count, library_parent_filepath(), ID::name, NULL, read_libblock(), FileData::reports, RPT_ERROR, RPT_INFO, ID::tag, and TIP_.
Referenced by read_library_linked_ids().
|
static |
Definition at line 5345 of file readfile.c.
References Freestyle::a, BLI_addtail(), BLI_freelistN(), BLI_ghash_clear(), BLI_ghash_ensure_p(), BLI_ghash_free(), BLI_ghash_str_new(), BLI_remlink(), change_link_placeholder_to_real_ID_pointer(), ListBase::first, ID::flag, id, INDEX_ID_MAX, LIB_INDIRECT_WEAK_LINK, LIB_TAG_ID_LINK_PLACEHOLDER, ID::name, ID::next, NULL, read_library_linked_id(), set_listbasepointers(), and ID::tag.
Referenced by read_libraries().
Definition at line 2173 of file readfile.c.
References BHEADN_FROM_BHEAD, blo_bhead_read_data(), blo_bhead_read_full(), FileData::compflags, DNA_struct_reconstruct(), FD_FLAGS_FILE_OK, FD_FLAGS_SWITCH_ENDIAN, FileData::filesdna, FileData::flags, BHead::len, MEM_freeN, MEM_mallocN, BHead::nr, NULL, FileData::reconstruct_info, SDNA_CMP_NOT_EQUAL, SDNA_CMP_REMOVED, BHead::SDNAnr, switch_endian_structs(), and UNLIKELY.
Referenced by BLO_library_read_struct(), expand_doit_library(), read_data_into_datamap(), read_file_version(), read_global(), read_libblock(), and read_userdef().
|
static |
Definition at line 4004 of file readfile.c.
References UserDef::addons, UserDef::app_template, UserDef::asset_libraries, UserDef::autoexec_paths, BLO_read_data_address, BLO_read_list(), FileData::datamap, direct_link_keymapitem(), UserDef::edit_studio_light, ListBase::first, IDP_BlendDataRead, UserDef_Runtime::is_dirty, KEYMAP_UPDATE, ListBase::last, LISTBASE_FOREACH, BlendFileData::main, NULL, oldnewmap_clear(), bUserMenuItem_Op::prop, read_data_into_datamap(), read_struct(), UserDef::runtime, Main::subversionfile, UserDef::subversionfile, UserDef::themes, UserDef::uifonts, UserDef::uistyles, BlendFileData::user, UserDef::user_keyconfig_prefs, UserDef::user_keymaps, USER_MENU_TYPE_OPERATOR, UserDef::user_menus, Main::versionfile, and UserDef::versionfile.
Referenced by blo_read_file_internal().
|
static |
Only for undo files, or to restore a screen after reading without UI...
| user |
|
| id_map | lookup table, use when performing many lookups. this could be made an optional argument (falling back to a full lookup), however at the moment it's always available. |
Definition at line 2658 of file readfile.c.
References BKE_main_idmap_lookup_id(), BKE_main_idmap_main_get(), NULL, and restore_pointer_user().
Referenced by blo_lib_link_restore(), lib_link_main_data_restore_cb(), lib_link_seq_clipboard_pt_restore(), lib_link_wm_xr_data_restore(), and lib_link_workspace_layout_restore().
|
static |
Definition at line 2610 of file readfile.c.
References BLI_assert, id, id_us_ensure_real(), ID::lib, ID::name, STREQ, UNUSED_VARS_NDEBUG, and USER_REAL.
Referenced by restore_pointer_by_name().
|
static |
Definition at line 4291 of file readfile.c.
References BHeadSort::bhead, FileData::bheadmap, blo_bhead_first(), blo_bhead_next(), MEM_malloc_arrayN, BHeadSort::old, BHead::old, FileData::tot_bheadmap, and verg_bheadsort().
Referenced by find_bhead().
|
static |
Definition at line 474 of file readfile.c.
References BLI_addtail(), BLI_assert, BLI_remlink(), Main::curlib, ListBase::first, GS, id, ID::lib, ID::name, Library::temp_index, and which_libbase().
Referenced by blo_split_main().
Definition at line 5117 of file readfile.c.
References BLI_addtail(), BLI_listbase_clear(), BLI_remlink(), BLI_strncpy(), Main::curlib, id, INDEX_ID_MAX, LIB_TAG_NEW, LISTBASE_FOREACH_MUTABLE, Main::name, set_listbasepointers(), Main::subversionfile, ID::tag, and Main::versionfile.
Referenced by library_link_end(), and read_libraries().
|
static |
Definition at line 688 of file readfile.c.
References BLI_endian_switch_int32(), BHead4::code, ENDB, BHead4::len, BHead4::nr, and BHead4::SDNAnr.
Referenced by get_bhead().
|
static |
Definition at line 702 of file readfile.c.
References BLI_endian_switch_int32(), BHead8::code, ENDB, BHead8::len, BHead8::nr, and BHead8::SDNAnr.
Referenced by get_bhead().
Definition at line 2157 of file readfile.c.
References data, DNA_struct_switch_endian(), BHead::nr, BHead::SDNAnr, SDNA::structs, SDNA_Struct::type, and SDNA::types_size.
Referenced by read_struct().
|
static |
Definition at line 4278 of file readfile.c.
References BHeadSort::old, v1, v2, and x2.
Referenced by find_bhead(), and sort_bhead_old_map().
|
static |
Definition at line 4531 of file readfile.c.
Referenced by BLO_expand_id(), and BLO_main_expander().