|
Blender V5.3
|
#include <readfile.hh>
General data used during a blend-file reading.
Note that this data (and its accesses) are absolutely not thread-safe currently. It should never be accessed concurrently.
Definition at line 82 of file readfile.hh.
| std::optional<Map<StringRefNull, BHead *> > blender::FileData::bhead_idname_map |
Definition at line 171 of file readfile.hh.
Referenced by blender::find_bhead_from_code_name(), blender::find_bhead_from_idname(), and blender::read_file_bhead_idname_map_create().
| ListBaseT<BHeadN> blender::FileData::bhead_list = {} |
Linked list of BHeadN's.
Definition at line 84 of file readfile.hh.
Referenced by blender::blo_bhead_first(), blender::blo_filedata_free(), and blender::get_bhead().
Definition at line 168 of file readfile.hh.
Referenced by blender::blo_filedata_free(), blender::find_bhead(), and blender::sort_bhead_old_map().
| BlenderHeader blender::FileData::blender_header = {} |
Definition at line 87 of file readfile.hh.
Referenced by blender::get_bhead(), and blender::read_blender_header().
The root (main, local) Main. The Main that will own Library IDs.
When reading libraries, this is typically not the same Main as the one being populated from the content of this filedata, see fd_bmain.
Definition at line 180 of file readfile.hh.
Referenced by blender::blo_add_main_for_library(), blender::blo_check_data_address_nonnull(), blender::blo_find_main_for_library_and_idname(), blender::blo_read_array_impl(), blender::BLO_read_data_invalidate(), blender::blo_read_file_internal(), blender::blo_read_pointer_array_impl(), blender::blo_verify_data_address(), blender::change_ID_pointer_to_real_ID_pointer(), blender::change_link_placeholder_to_real_ID_pointer(), blender::direct_link_library(), blender::library_link_begin(), blender::read_id_struct(), blender::read_libblock(), blender::read_libblock_undo_restore_at_old_address(), blender::read_libraries(), blender::read_libraries_free_placeholders(), blender::read_library_file_data(), blender::read_library_struct(), blender::read_struct(), blender::read_struct_and_validate_size(), blender::read_undo_libraries_cleanup_unused_ids(), blender::read_undo_move_libmain_data(), blender::read_undo_remap_noundo_data(), and blender::read_undo_reuse_noundo_local_ids().
| BLOCacheStorage* blender::FileData::cache_storage = nullptr |
Definition at line 166 of file readfile.hh.
Referenced by blender::blo_cache_storage_end(), blender::blo_cache_storage_init(), blender::blo_cache_storage_old_bmain_clear(), and blender::direct_link_id().
| const char* blender::FileData::compflags = nullptr |
Definition at line 114 of file readfile.hh.
Referenced by blender::blo_filedata_free(), blender::read_file_dna(), and blender::read_struct().
Definition at line 154 of file readfile.hh.
Referenced by blender::blo_filedata_free(), blender::blo_read_asset_data_block(), blender::blo_read_verify_type_size(), blender::filedata_new(), blender::newdataadr(), blender::newdataadr_entry(), blender::newdataadr_no_us(), blender::read_data_into_datamap(), blender::read_libblock(), and blender::read_userdef().
The main for the (local) data loaded from this filedata.
This is the same as bmain when opening a blend-file, but not when reading/loading from libraries blend-files.
Definition at line 189 of file readfile.hh.
Referenced by blender::blo_read_file_internal(), blender::library_link_begin(), and blender::read_library_file_data().
| FileReader* blender::FileData::file = nullptr |
Definition at line 89 of file readfile.hh.
Referenced by blender::blo_bhead_read_data(), blender::blo_filedata_free(), blender::blo_filedata_from_file_descriptor(), blender::blo_filedata_from_memfile(), blender::blo_filedata_from_memory(), blender::blo_read_shared_impl(), blender::get_bhead(), and blender::read_blender_header().
| std::optional<BLI_stat_t> blender::FileData::file_stat |
Definition at line 90 of file readfile.hh.
Referenced by blender::blo_filedata_from_file_descriptor(), and blender::read_libblock().
| int blender::FileData::fileflags = 0 |
Definition at line 141 of file readfile.hh.
Referenced by blender::read_global().
| std::unique_ptr<SDNA> blender::FileData::filesdna |
General reading variables.
Definition at line 111 of file readfile.hh.
Referenced by blender::BLO_blendhandle_get_datablock_info(), blender::BLO_blendhandle_get_preview_for_id(), blender::blo_do_versions_260(), blender::blo_do_versions_270(), blender::blo_do_versions_280(), blender::blo_do_versions_290(), blender::blo_do_versions_300(), blender::blo_do_versions_400(), blender::blo_do_versions_401(), blender::blo_do_versions_402(), blender::blo_do_versions_404(), blender::blo_read_pointer_array_impl(), blender::do_versions_after_linking_400(), blender::get_alloc_name(), blender::is_minversion_older_than_blender(), blender::read_file_dna(), and blender::read_struct().
| int blender::FileData::filesubversion = 0 |
Unlike the fileversion which is read from the header, this is initialized from #read_file_dna.
Definition at line 122 of file readfile.hh.
Referenced by blender::BLO_blendhandle_get_version(), and blender::read_file_dna().
| int blender::FileData::fileversion = 0 |
Definition at line 117 of file readfile.hh.
Referenced by blender::BLO_blendhandle_get_version(), blender::blo_read_file_internal(), blender::BLO_read_fileversion_get(), blender::BLO_version_from_file(), blender::is_minversion_older_than_blender(), blender::library_link_begin(), blender::read_blender_header(), blender::read_file_dna(), blender::read_file_version_and_colorspace(), and blender::read_library_file_data().
| enum eFileDataFlag blender::FileData::flags = eFileDataFlag(0) |
Definition at line 85 of file readfile.hh.
Referenced by blender::blo_bhead_id_name(), blender::blo_bhead_read_data(), blender::blo_cache_storage_init(), blender::blo_decode_and_check(), blender::blo_filedata_from_file_minimal(), blender::blo_filedata_from_memfile(), blender::blo_read_array_impl(), blender::BLO_read_data_is_undo(), blender::blo_read_file_internal(), blender::BLO_read_lib_is_undo(), blender::blo_read_pointer_array_impl(), blender::blo_read_shared_impl(), blender::convert_pointer_array_64_to_32(), blender::expand_main(), blender::find_previous_lib(), blender::get_bhead(), blender::lib_link_all(), blender::peek_struct_undo(), blender::read_blender_header(), blender::read_file_dna(), blender::read_file_thumbnail(), blender::read_id_struct(), blender::read_libblock(), blender::read_libraries(), blender::read_libraries_report_invalid_id_names(), blender::read_library_linked_ids(), blender::read_library_struct(), blender::read_struct(), and blender::read_struct_and_validate_size().
| int blender::FileData::globalf = 0 |
For do_versions patching.
Definition at line 140 of file readfile.hh.
Referenced by blender::read_global().
Definition at line 155 of file readfile.hh.
Referenced by blender::blo_filedata_free(), blender::BLO_read_data_globmap_add(), blender::blo_read_get_new_globaldata_address(), blender::filedata_new(), and blender::link_glob_list().
| int blender::FileData::id_asset_data_offset = 0 |
Used to retrieve asset data from (bhead+1). NOTE: This may not be available in old files, will be -1 then!
Definition at line 130 of file readfile.hh.
Referenced by blender::blo_bhead_id_asset_data_address(), and blender::read_file_dna().
Used to keep track of already loaded packed IDs to avoid loading them multiple times.
Definition at line 157 of file readfile.hh.
Referenced by blender::filedata_new(), blender::library_id_is_yet_read_deep_hash(), blender::library_link_begin(), blender::read_libblock(), and blender::read_library_file_data().
| int blender::FileData::id_deep_hash_offset = 0 |
Definition at line 132 of file readfile.hh.
Referenced by blender::blo_bhead_id_deep_hash(), and blender::read_file_dna().
| int blender::FileData::id_flag_offset = 0 |
Definition at line 131 of file readfile.hh.
Referenced by blender::blo_bhead_id_flag(), and blender::read_file_dna().
| int blender::FileData::id_name_offset = 0 |
Used to retrieve ID names from (bhead+1).
Definition at line 125 of file readfile.hh.
Referenced by blender::blo_bhead_id_name(), and blender::read_file_dna().
| eID_Tag blender::FileData::id_tag_extra = {} |
Tag to apply to all loaded ID data-blocks.
Definition at line 152 of file readfile.hh.
Referenced by blender::library_link_begin(), blender::link_named_part(), and blender::read_id_in_lib().
| bool blender::FileData::is_eof = false |
Definition at line 86 of file readfile.hh.
Referenced by blender::get_bhead().
Store mapping from old ID pointers (the values they have in the .blend file) to new ones, typically from value in bhead->old to address in memory where the ID was read. Used during library-linking process (see #lib_link_all).
Definition at line 164 of file readfile.hh.
Referenced by blender::blo_do_versions_pre250(), blender::blo_filedata_free(), blender::change_ID_pointer_to_real_ID_pointer_fd(), blender::change_link_placeholder_to_real_ID_pointer_fd(), blender::filedata_new(), blender::newlibadr(), blender::oldnewmap_lib_insert(), blender::read_libblock(), and blender::read_library_file_data().
| int blender::FileData::library_filepath_offset = 0 |
Gives access to libraries' filepath and flag, useful for introspection of blendfiles' dependencies without having to fully read them.
Definition at line 137 of file readfile.hh.
Referenced by blender::blo_bhead_library_filepath(), and blender::read_file_dna().
| int blender::FileData::library_flag_offset = 0 |
Definition at line 138 of file readfile.hh.
Referenced by blender::blo_bhead_library_flag(), and blender::read_file_dna().
Definition at line 112 of file readfile.hh.
Referenced by blender::blo_read_pointer_array_impl(), blender::BLO_read_struct_by_name_array(), blender::filedata_new(), and blender::read_file_dna().
| bool blender::FileData::need_preview_render_restart = false |
Set when reading a file from undo with incomplete preview, to trigger restart of preview jobs.
Definition at line 216 of file readfile.hh.
Referenced by blender::BLO_read_data_set_need_preview_render_restart(), and blender::blo_read_file_internal().
| IDNameLib_Map* blender::FileData::new_idmap_uid = nullptr |
IDMap using uids as keys of the IDs read (or moved) in the new main(s).
Used during undo to ensure that the ID pointers from the 'no undo' IDs remain valid (these IDs are re-used from old main even if their content is not the same as in the memfile undo step, so they could point e.g. to an ID that does not exist in the newly read undo step).
Also used to find current valid pointers (or none) of these 'no undo' IDs existing in read memfile.
Definition at line 206 of file readfile.hh.
Referenced by blender::blo_filedata_free(), blender::blo_read_file_internal(), blender::BLO_read_get_new_id_address_from_session_uid(), blender::read_libblock(), blender::read_libblock_undo_restore(), blender::read_libblock_undo_restore_identical(), blender::read_libblock_undo_restore_linked(), blender::read_undo_libraries_cleanup_unused_ids(), blender::read_undo_move_libmain_data(), blender::read_undo_remap_noundo_data(), and blender::read_undo_reuse_noundo_local_ids().
The existing root (main, local) Main, used for undo.
Definition at line 182 of file readfile.hh.
Referenced by blender::BLO_read_from_memfile(), blender::read_libblock_undo_restore_at_old_address(), blender::read_libblock_undo_restore_identical(), blender::read_libblock_undo_restore_library(), blender::read_undo_libraries_cleanup_unused_ids(), blender::read_undo_libraries_preserve_never_undo_libraries(), blender::read_undo_move_libmain_data(), blender::read_undo_reuse_noundo_local_ids(), and blender::read_undo_tag_all_noundo_ids().
| IDNameLib_Map* blender::FileData::old_idmap_uid = nullptr |
IDMap using UID's as keys of all the old IDs in the old bmain. Used during undo to find a matching old data when reading a new ID.
Definition at line 195 of file readfile.hh.
Referenced by blender::blo_filedata_free(), blender::blo_make_old_idmap_from_main(), and blender::read_libblock_undo_restore().
| DNA_ReconstructInfo* blender::FileData::reconstruct_info = nullptr |
Definition at line 115 of file readfile.hh.
Referenced by blender::blo_filedata_free(), blender::read_file_dna(), and blender::read_struct().
| char blender::FileData::relabase[FILE_MAX] = {} |
Used for relative paths handling.
Typically the actual filepath of the read blend-file, except when recovering save-on-exit/autosave files. In the latter case, it will be the path of the file that generated the auto-saved one being recovered.
NOTE: Currently expected to be the same path as #BlendFileData.filepath.
Definition at line 108 of file readfile.hh.
Referenced by blender::blo_decode_and_check(), blender::blo_filedata_from_file(), blender::blo_read_file_internal(), blender::BLO_read_from_memfile(), blender::direct_link_library(), blender::do_versions(), blender::expand_doit_library(), blender::is_minversion_older_than_blender(), blender::read_global(), and blender::read_library_file_data().
| BlendFileReadReport* blender::FileData::reports = nullptr |
Definition at line 208 of file readfile.hh.
Referenced by blender::blo_do_versions_280(), blender::blo_do_versions_402(), blender::BLO_read_data_reports(), blender::blo_read_file_internal(), blender::BLO_read_lib_reports(), blender::blo_readfile_invalidate(), blender::direct_link_id_embedded_id(), blender::direct_link_library(), blender::do_version_remove_lzo_and_lzma_compression(), blender::do_versions_after_linking_400(), blender::do_versions_after_linking_402(), blender::do_versions_after_linking_404(), blender::do_versions_after_linking_501(), blender::expand_doit_library(), blender::filedata_new(), blender::read_library_file_data(), blender::read_library_linked_id(), blender::read_library_linked_ids(), blender::repair_node_link_node_pointers(), and blender::version_geometry_nodes_properties().
| eBLOReadSkip blender::FileData::skip_flags = BLO_READ_SKIP_NONE |
Optionally skip some data-blocks when they're not needed.
Definition at line 144 of file readfile.hh.
Referenced by blender::blo_read_file_internal(), blender::BLO_read_from_file(), blender::BLO_read_from_memfile(), blender::BLO_read_from_memory(), blender::direct_link_id_common(), blender::read_libblock(), blender::read_libblock_undo_restore(), blender::read_libblock_undo_restore_at_old_address(), and blender::read_libblock_undo_restore_identical().
| void* blender::FileData::storage_handle = nullptr |
Opaque handle to the storage system used for non-static allocation strings.
Definition at line 211 of file readfile.hh.
Referenced by blender::get_alloc_name().
| int blender::FileData::tot_bheadmap = 0 |
Definition at line 169 of file readfile.hh.
Referenced by blender::find_bhead(), and blender::sort_bhead_old_map().
| int blender::FileData::undo_direction = 0 |
Whether we are undoing (< 0) or redoing (> 0), used to choose which 'unchanged' flag to use to detect unchanged data from memfile. eUndoStepDir.
Definition at line 97 of file readfile.hh.
Referenced by blender::blo_filedata_from_memfile(), and blender::direct_link_id_restore_recalc().