|
Blender V5.0
|
#include <array>#include "DNA_listBase.h"#include "BLI_compiler_attrs.h"#include "BLI_math_matrix_types.hh"#include "BLI_sys_types.h"#include "BLI_utility_mixins.hh"#include "BLI_vector_set.hh"#include "BKE_lib_query.hh"Go to the source code of this file.
Classes | |
| struct | BlendThumbnail |
| struct | MainIDRelationsEntryItem |
| struct | MainIDRelationsEntry |
| struct | MainIDRelations |
| struct | MainColorspace |
| struct | Main |
| struct | MainMergeReport |
Macros | |
| #define | FOREACH_MAIN_LISTBASE_ID_BEGIN(_lb, _id) |
| #define | FOREACH_MAIN_LISTBASE_ID_END |
| #define | FOREACH_MAIN_LISTBASE_BEGIN(_bmain, _lb) |
| #define | FOREACH_MAIN_LISTBASE_END |
| #define | FOREACH_MAIN_ID_BEGIN(_bmain, _id) |
| #define | FOREACH_MAIN_ID_END |
| #define | MAIN_VERSION_FILE_ATLEAST(main, ver, subver) |
| #define | MAIN_VERSION_FILE_OLDER(main, ver, subver) |
| #define | MAIN_VERSION_FILE_OLDER_OR_EQUAL(main, ver, subver) |
| #define | LIBRARY_VERSION_FILE_ATLEAST(lib, ver, subver) |
| #define | BLEN_THUMB_SIZE 128 |
| #define | BLEN_THUMB_MEMSIZE(_x, _y) |
| #define | BLEN_THUMB_MEMSIZE_IS_VALID(_x, _y) |
Typedefs | |
| using | MainListsArray = std::array<ListBase *, INDEX_ID_MAX - 1> |
Enumerations | |
| enum | eMainIDRelationsEntryTags { MAINIDRELATIONS_ENTRY_TAGS_DOIT = 1 << 0 , MAINIDRELATIONS_ENTRY_TAGS_PROCESSED_TO = 1 << 4 , MAINIDRELATIONS_ENTRY_TAGS_PROCESSED_FROM = 1 << 5 , MAINIDRELATIONS_ENTRY_TAGS_PROCESSED , MAINIDRELATIONS_ENTRY_TAGS_INPROGRESS_TO = 1 << 8 , MAINIDRELATIONS_ENTRY_TAGS_INPROGRESS_FROM = 1 << 9 , MAINIDRELATIONS_ENTRY_TAGS_INPROGRESS } |
| enum | { MAINIDRELATIONS_INCLUDE_UI = 1 << 0 } |
Main is the root of the 'data-base' of a Blender context. All data is put into lists, and all these lists are stored here.
Definition in file BKE_main.hh.
| #define BLEN_THUMB_MEMSIZE | ( | _x, | |
| _y ) |
Definition at line 686 of file BKE_main.hh.
Referenced by BKE_main_thumbnail_create(), BKE_main_thumbnail_from_buffer(), BKE_main_thumbnail_from_imbuf(), blo_read_file_internal(), and BLO_thumbnail_from_file().
| #define BLEN_THUMB_MEMSIZE_IS_VALID | ( | _x, | |
| _y ) |
Protect against buffer overflow vulnerability & negative sizes.
Definition at line 689 of file BKE_main.hh.
Referenced by blo_read_file_internal(), BLO_thumbnail_from_file(), and read_file_thumbnail().
| #define BLEN_THUMB_SIZE 128 |
The size of thumbnails (optionally) stored in the .blend files header.
NOTE(@ideasman42): This is kept small as it's stored uncompressed in the .blend file, where a larger size would increase the size of every .blend file unreasonably. If we wanted to increase the size, we'd want to use compression (JPEG or similar).
Definition at line 684 of file BKE_main.hh.
Referenced by BKE_main_thumbnail_create(), blend_file_thumb_from_camera(), and blend_file_thumb_from_screenshot().
| #define FOREACH_MAIN_ID_BEGIN | ( | _bmain, | |
| _id ) |
Top level foreach-like macro allowing to loop over all IDs in a given Main data-base.
NOTE: Order tries to go from 'user IDs' to 'used IDs' (e.g. collections will be processed before objects, which will be processed before obdata types, etc.).
WARNING: DO NOT use break statement with that macro, use #FOREACH_MAIN_LISTBASE and #FOREACH_MAIN_LISTBASE_ID instead if you need that kind of control flow.
Definition at line 577 of file BKE_main.hh.
Referenced by BKE_blendfile_link_pack(), BKE_blendfile_override(), BKE_bpath_foreach_path_main(), BKE_brush_duplicate(), BKE_collection_duplicate(), BKE_id_multi_tagged_delete(), BKE_lib_id_clear_library_data(), BKE_lib_override_library_create_from_id(), BKE_lib_override_library_create_from_tag(), BKE_lib_override_library_delete(), BKE_lib_override_library_id_hierarchy_reset(), BKE_lib_override_library_main_hierarchy_root_ensure(), BKE_lib_override_library_main_operations_create(), BKE_lib_override_library_main_operations_restore(), BKE_lib_override_library_main_tag(), BKE_lib_override_library_main_unused_cleanup(), BKE_lib_override_library_main_update(), BKE_lib_override_library_main_validate(), BKE_lib_override_library_proxy_convert(), BKE_libblock_find_session_uid(), BKE_library_main_rebuild_hierarchy(), BKE_library_unused_linked_data_set_tag(), BKE_main_gset_create(), BKE_main_id_newptr_and_tag_clear(), BKE_main_id_refcount_recompute(), BKE_main_idmap_create(), BKE_main_is_empty(), BKE_main_merge(), BKE_main_relations_create(), BKE_object_duplicate(), BKE_scene_duplicate(), blendfile_relocate_postprocess_cleanup(), blendfile_relocate_postprocess_liboverrides(), blo_do_versions_280(), blo_do_versions_300(), blo_do_versions_440(), BLO_main_validate_embedded_flag(), BLO_main_validate_embedded_liboverrides(), blo_read_file_internal(), BLO_readfile_id_runtime_data_free_all(), blender::animrig::versioning::convert_legacy_action_assignments(), blender::ed::object::copy_object_set_idnew(), do_versions_after_linking_250(), do_versions_after_linking_300(), do_versions_idproperty_ui_data(), expand_main(), filelist_readjob_main_assets_add_items(), gather_local_ids_to_write(), blender::ed::outliner::id_override_library_create_hierarchy(), blender::ed::outliner::id_override_library_create_hierarchy_process(), IMB_colormanagement_working_space_convert(), blender::bke::blendfile::PartialWriteContext::is_valid(), blender::bke::greasepencil::convert::legacy_gpencil_sanitize_annotations(), lib_link_all(), lib_override_libraries_index_define(), lib_override_library_main_resync_on_library_indirect_level(), lib_override_library_resync(), lib_override_library_resync_build_missing_ids_data(), lib_override_prefill_newid_from_existing_overrides(), lib_override_resync_tagging_finalize(), lib_query_unused_ids_tag(), libblock_remap_data(), library_link_begin(), long_id_names_process_action_slots_identifiers(), blender::ed::object::make_override_library_exec(), memfile_undosys_step_decode(), blender::ed::outliner::outliner_clear_newid_from_main(), pack_linked_ids(), blender::ed::space_node::NodeClipboard::paste_validate_id_references(), UniqueName_Map::populate(), blender::ed::asset::pre_save_assets(), prepare_stable_data_block_ids(), read_undo_move_libmain_data(), read_undo_remap_noundo_data(), blender::bke::blendfile::PartialWriteContext::remove_unused(), reuse_bmain_data_invalid_local_usages_fix(), blender::seq::seq_duplicate_postprocess(), setup_app_data(), blender::animrig::versioning::tag_action_users_for_slotted_actions_conversion(), blender::bke::tests::TEST_F(), blender::bke::tests::TEST_F(), blender::bke::tests::TEST_F(), version_nla_action_strip_hold(), version_nla_tweakmode_incomplete(), version_system_idprops_generate(), write_file_handle(), and write_libraries().
| #define FOREACH_MAIN_ID_END |
Definition at line 583 of file BKE_main.hh.
Referenced by BKE_blendfile_link_pack(), BKE_blendfile_override(), BKE_bpath_foreach_path_main(), BKE_brush_duplicate(), BKE_collection_duplicate(), BKE_id_multi_tagged_delete(), BKE_lib_id_clear_library_data(), BKE_lib_override_library_create_from_id(), BKE_lib_override_library_create_from_tag(), BKE_lib_override_library_delete(), BKE_lib_override_library_id_hierarchy_reset(), BKE_lib_override_library_main_hierarchy_root_ensure(), BKE_lib_override_library_main_operations_create(), BKE_lib_override_library_main_operations_restore(), BKE_lib_override_library_main_tag(), BKE_lib_override_library_main_unused_cleanup(), BKE_lib_override_library_main_update(), BKE_lib_override_library_main_validate(), BKE_lib_override_library_proxy_convert(), BKE_libblock_find_session_uid(), BKE_library_main_rebuild_hierarchy(), BKE_library_unused_linked_data_set_tag(), BKE_main_gset_create(), BKE_main_id_newptr_and_tag_clear(), BKE_main_id_refcount_recompute(), BKE_main_idmap_create(), BKE_main_is_empty(), BKE_main_merge(), BKE_main_relations_create(), BKE_object_duplicate(), BKE_scene_duplicate(), blendfile_relocate_postprocess_cleanup(), blendfile_relocate_postprocess_liboverrides(), blo_do_versions_280(), blo_do_versions_300(), blo_do_versions_440(), BLO_main_validate_embedded_flag(), BLO_main_validate_embedded_liboverrides(), blo_read_file_internal(), BLO_readfile_id_runtime_data_free_all(), blender::animrig::versioning::convert_legacy_action_assignments(), blender::ed::object::copy_object_set_idnew(), do_versions_after_linking_250(), do_versions_after_linking_300(), do_versions_idproperty_ui_data(), expand_main(), filelist_readjob_main_assets_add_items(), gather_local_ids_to_write(), blender::ed::outliner::id_override_library_create_hierarchy(), blender::ed::outliner::id_override_library_create_hierarchy_process(), IMB_colormanagement_working_space_convert(), blender::bke::blendfile::PartialWriteContext::is_valid(), blender::bke::greasepencil::convert::legacy_gpencil_sanitize_annotations(), lib_link_all(), lib_override_libraries_index_define(), lib_override_library_main_resync_on_library_indirect_level(), lib_override_library_resync(), lib_override_library_resync_build_missing_ids_data(), lib_override_prefill_newid_from_existing_overrides(), lib_override_resync_tagging_finalize(), lib_query_unused_ids_tag(), libblock_remap_data(), library_link_begin(), long_id_names_process_action_slots_identifiers(), blender::ed::object::make_override_library_exec(), memfile_undosys_step_decode(), blender::ed::outliner::outliner_clear_newid_from_main(), pack_linked_ids(), blender::ed::space_node::NodeClipboard::paste_validate_id_references(), UniqueName_Map::populate(), blender::ed::asset::pre_save_assets(), prepare_stable_data_block_ids(), read_undo_move_libmain_data(), read_undo_remap_noundo_data(), blender::bke::blendfile::PartialWriteContext::remove_unused(), reuse_bmain_data_invalid_local_usages_fix(), blender::seq::seq_duplicate_postprocess(), setup_app_data(), blender::animrig::versioning::tag_action_users_for_slotted_actions_conversion(), blender::bke::tests::TEST_F(), blender::bke::tests::TEST_F(), blender::bke::tests::TEST_F(), version_nla_action_strip_hold(), version_nla_tweakmode_incomplete(), version_system_idprops_generate(), write_file_handle(), and write_libraries().
| #define FOREACH_MAIN_LISTBASE_BEGIN | ( | _bmain, | |
| _lb ) |
Definition at line 557 of file BKE_main.hh.
Referenced by assert_sorted_ids(), BKE_blendfile_read_make_empty(), BKE_main_library_weak_reference_create(), blo_cache_storage_init(), blo_cache_storage_old_bmain_clear(), BLO_main_validate_shapekeys(), bpy_file_path_foreach(), bpy_file_path_map(), bpy_user_map(), lib_override_library_resync(), long_id_names_ensure_unique_id_names(), main_namemap_validate_and_fix(), rebuild_hierarchy_best_parent_find(), blender::animrig::internal::rebuild_slot_user_cache(), blender::animrig::Action::slot_identifier_propagate(), and sort_linked_ids().
| #define FOREACH_MAIN_LISTBASE_END |
Definition at line 564 of file BKE_main.hh.
Referenced by assert_sorted_ids(), BKE_blendfile_read_make_empty(), BKE_main_library_weak_reference_create(), blo_cache_storage_init(), blo_cache_storage_old_bmain_clear(), BLO_main_validate_shapekeys(), bpy_file_path_foreach(), bpy_file_path_map(), bpy_user_map(), lib_override_library_resync(), long_id_names_ensure_unique_id_names(), main_namemap_validate_and_fix(), rebuild_hierarchy_best_parent_find(), blender::animrig::internal::rebuild_slot_user_cache(), blender::animrig::Action::slot_identifier_propagate(), and sort_linked_ids().
| #define FOREACH_MAIN_LISTBASE_ID_BEGIN | ( | _lb, | |
| _id ) |
Definition at line 546 of file BKE_main.hh.
Referenced by blender::animrig::add_object_data_users(), BKE_blendfile_read_make_empty(), BKE_main_library_weak_reference_create(), blo_cache_storage_init(), blo_cache_storage_old_bmain_clear(), BLO_main_validate_shapekeys(), bpy_file_path_foreach(), bpy_file_path_map(), bpy_user_map(), blender::animrig::find_related_ids(), id_delete(), lib_override_library_resync(), lib_query_unused_ids_tag(), rebuild_hierarchy_best_parent_find(), blender::animrig::internal::rebuild_slot_user_cache(), reuse_editable_asset_bmain_data_for_blendfile(), blender::animrig::Action::slot_identifier_propagate(), swap_old_bmain_data_dependencies_process(), swap_old_bmain_data_for_blendfile(), and unpin_file_local_grease_pencil_brush_materials().
| #define FOREACH_MAIN_LISTBASE_ID_END |
Definition at line 552 of file BKE_main.hh.
Referenced by blender::animrig::add_object_data_users(), BKE_blendfile_read_make_empty(), BKE_main_library_weak_reference_create(), blo_cache_storage_init(), blo_cache_storage_old_bmain_clear(), BLO_main_validate_shapekeys(), bpy_file_path_foreach(), bpy_file_path_map(), bpy_user_map(), blender::animrig::find_related_ids(), id_delete(), lib_override_library_resync(), lib_query_unused_ids_tag(), rebuild_hierarchy_best_parent_find(), blender::animrig::internal::rebuild_slot_user_cache(), reuse_editable_asset_bmain_data_for_blendfile(), blender::animrig::Action::slot_identifier_propagate(), swap_old_bmain_data_dependencies_process(), swap_old_bmain_data_for_blendfile(), and unpin_file_local_grease_pencil_brush_materials().
| #define LIBRARY_VERSION_FILE_ATLEAST | ( | lib, | |
| ver, | |||
| subver ) |
Definition at line 673 of file BKE_main.hh.
Referenced by blendfile_or_libraries_versions_atleast().
| #define MAIN_VERSION_FILE_ATLEAST | ( | main, | |
| ver, | |||
| subver ) |
Definition at line 658 of file BKE_main.hh.
Referenced by blendfile_or_libraries_versions_atleast(), blo_do_versions_250(), blo_do_versions_260(), blo_do_versions_270(), blo_do_versions_280(), blo_do_versions_290(), blo_do_versions_300(), blo_do_versions_400(), blo_do_versions_410(), blo_do_versions_420(), blo_do_versions_430(), blo_do_versions_440(), blo_do_versions_450(), blo_do_versions_500(), blo_do_versions_pre250(), do_versions(), do_versions_after_linking_250(), do_versions_after_linking_270(), do_versions_after_linking_280(), do_versions_after_linking_290(), do_versions_after_linking_300(), do_versions_after_linking_400(), do_versions_after_linking_410(), do_versions_after_linking_420(), do_versions_after_linking_430(), do_versions_after_linking_440(), do_versions_after_linking_450(), do_versions_after_linking_500(), and version_get_scene_compositor_node_tree().
| #define MAIN_VERSION_FILE_OLDER | ( | main, | |
| ver, | |||
| subver ) |
Definition at line 662 of file BKE_main.hh.
Referenced by blo_do_versions_260(), and blo_do_versions_290().
| #define MAIN_VERSION_FILE_OLDER_OR_EQUAL | ( | main, | |
| ver, | |||
| subver ) |
Definition at line 666 of file BKE_main.hh.
Referenced by blo_split_main(), read_file_version_and_colorspace(), and read_global().
| using MainListsArray = std::array<ListBase *, INDEX_ID_MAX - 1> |
Subtracting 1, because INDEX_ID_NULL is ignored here.
Definition at line 645 of file BKE_main.hh.
| anonymous enum |
| Enumerator | |
|---|---|
| MAINIDRELATIONS_INCLUDE_UI | Those bmain relations include pointers/usages from editors. |
Definition at line 139 of file BKE_main.hh.
Definition at line 87 of file BKE_main.hh.
| const char * BKE_main_blendfile_path | ( | const Main * | bmain | ) |
Return file-path of given main.
Definition at line 887 of file main.cc.
References Main::filepath.
Referenced by blender::ed::object::bake_targets_output_external(), BKE_blendfile_read_from_memfile(), BKE_bpath_missing_files_find(), BKE_image_save_options_init(), BKE_library_filepath_set(), BKE_main_blendfile_path_from_global(), BKE_main_library_weak_reference_find(), BKE_memfile_undo_decode(), BKE_movieclip_file_add(), BKE_movieclip_file_add_exists_ex(), BKE_packedfile_pack_all(), BKE_packedfile_pack_all_libraries(), BKE_packedfile_unpack(), BKE_packedfile_unpack_all_libraries(), BKE_scene_set_name(), BKE_sound_new_file(), BKE_sound_new_file_exists_ex(), BKE_vfont_load(), BKE_vfont_load_exists_ex(), BLO_memfile_main_get(), block_create__close_file_dialog(), block_create_save_file_overwrite_dialog(), bookmark_select_exec(), bpy_lib_load(), BPY_modules_load_user(), blender::io::hydra::cache_or_get_image_file(), cachefile_layer_open_invoke(), cachefile_open_invoke(), blender::ed::object::collection_exporter_export(), do_write_image_or_movie(), blender::nodes::draw_common_bake_settings(), blender::ed::vse::draw_strip_in_view(), ED_fileselect_ensure_default_filepath(), file_browse_exec(), file_execute(), file_expand_directory(), file_filename_enter_handle(), file_operator_to_sfile(), file_parent_exec(), file_select_do(), file_sfile_to_operator_ex(), filelist_contains_main(), filelist_readjob_start_ex(), blender::bke::bake::get_blend_file_name(), image_abs_path(), image_file_browse_exec(), image_file_browse_invoke(), image_open_exec(), image_save_options_from_op(), library_link_begin(), library_link_end(), blender::ed::vse::load_data_init_from_operator(), blender::io::obj::load_image_at_path(), make_paths_absolute_exec(), make_paths_relative_exec(), blender::ed::object::multires_external_save_exec(), blender::ed::outliner::namebutton_fn(), blender::bke::blendfile::PartialWriteContext::PartialWriteContext(), blender::ed::space_node::preview_prepare_scene(), preview_prepare_scene(), RE_RenderAnim(), RE_RenderFrame(), save_set_filepath(), screen_opengl_render_anim_step(), screen_opengl_render_write(), blender::ed::vse::sequencer_add_image_strip_exec(), blender::ed::vse::sequencer_change_path_exec(), sound_mixdown_exec(), blender::seq::strip_doversion_250_sound_proxy_update_cb(), text_jump_to_file_at_point_exec(), text_jump_to_file_at_point_internal(), text_open_exec(), text_open_invoke(), text_save_as_invoke(), txt_write_file(), blender::bke::bake::unpack_geometry_nodes_bake(), unpack_menu(), blender::ed::object::volume_import_exec(), wm_autosave_location(), wm_block_file_close_save(), wm_file_link_append_datablock_ex(), wm_id_linked_relocate_exec(), wm_lib_relocate_exec_do(), wm_link_append_exec(), wm_open_mainfile__select_file_path_exec(), WM_operator_drop_load_path(), wm_revert_mainfile_exec(), wm_save_as_mainfile_exec(), workspace_append_activate_exec(), and write_result().
| const char * BKE_main_blendfile_path_from_global | ( | ) |
Return file-path of global main G_MAIN.
Definition at line 892 of file main.cc.
References BKE_main_blendfile_path(), and G_MAIN.
Referenced by BKE_add_template_variables_general(), BKE_modifier_path_init(), BKE_ptcache_toggle_disk_cache(), block_create_autorun_warning(), bpy_lib_write(), blender::nodes::node_composite_file_output_cc::compute_image_path(), dynamicPaint_outputSurfaceImage(), filelist_setdir(), fileselect_ensure_updated_file_params(), fileselect_initialize_params_common(), get_proxy_filepath(), blender::io::usd::import_asset(), blender::io::usd::import_startjob(), library_link_end(), movieclip_open_anim_file(), paste_material_exec(), blender::ed::io::paths_from_operator_properties(), pose_paste_exec(), blender::seq::proxy_dir_get(), ptcache_file_open(), ptcache_filepath(), ptcache_path(), blender::io::grease_pencil::SVGImporter::read(), blender::io::usd::USDVolumeReader::read_object_data(), render_result_exr_file_cache_path(), save_set_compress(), screenshot_exec(), screenshot_invoke(), blender::seq::seq_proxy_get_custom_file_filepath(), blender::seq::seq_proxy_get_filepath(), stampdata(), wm_history_file_update(), WM_init(), wm_init_splash_show_on_startup_check(), wm_link_append_invoke(), wm_revert_mainfile_poll(), wm_save_mainfile_invoke(), WM_window_title(), and write_crash_blend().
| const char * BKE_main_blendfile_path_from_library | ( | const Library & | library | ) |
| void BKE_main_clear | ( | Main & | bmain | ) |
Make given bmain empty again, and free all runtime mappings.
This is similar to deleting and re-creating the Main, however the internal Main::lock is kept unchanged, and the Main::is_global_main flag is not reset to true either.
Definition at line 96 of file main.cc.
References BKE_id_free_ex(), BKE_main_idmap_destroy(), BKE_main_lists_get(), BKE_main_namemap_destroy(), BKE_main_relations_free(), Main::blen_thumb, BLI_assert_unreachable, BLI_listbase_clear(), ListBase::first, Main::id_map, INDEX_ID_AC, INDEX_ID_AR, INDEX_ID_BR, INDEX_ID_CA, INDEX_ID_CF, INDEX_ID_CU_LEGACY, INDEX_ID_CV, INDEX_ID_GD_LEGACY, INDEX_ID_GR, INDEX_ID_IM, INDEX_ID_KE, INDEX_ID_LA, INDEX_ID_LI, INDEX_ID_LP, INDEX_ID_LS, INDEX_ID_LT, INDEX_ID_MA, INDEX_ID_MB, INDEX_ID_MC, INDEX_ID_ME, INDEX_ID_MSK, INDEX_ID_NT, INDEX_ID_NULL, INDEX_ID_OB, INDEX_ID_PA, INDEX_ID_PAL, INDEX_ID_PC, INDEX_ID_PT, INDEX_ID_SCE, INDEX_ID_SCR, INDEX_ID_SO, INDEX_ID_SPK, INDEX_ID_TE, INDEX_ID_TXT, INDEX_ID_VF, INDEX_ID_VO, INDEX_ID_WM, INDEX_ID_WO, INDEX_ID_WS, LIB_ID_FREE_NO_DEG_TAG, LIB_ID_FREE_NO_MAIN, LIB_ID_FREE_NO_UI_USER, LIB_ID_FREE_NO_USER_REFCOUNT, MEM_SAFE_FREE, Main::name_map, Main::name_map_global, and Main::relations.
Referenced by blender::bke::blendfile::PartialWriteContext::clear(), and Main::~Main().
| void BKE_main_free | ( | Main * | bmain | ) |
Completely destroy the given bmain, and all its linked 'libraries' ones if any (all other bmains, following the #Main.next chained list).
Definition at line 192 of file main.cc.
Referenced by BKE_blender_globals_clear(), BKE_blendfile_userdef_read(), BKE_blendfile_userdef_read_from_memory(), BKE_blendfile_workspace_config_data_free(), BKE_main_merge(), BLO_blendfiledata_free(), blo_join_main(), BLO_library_temp_free(), bpy_rna_data_context_exit(), ED_preview_free_dbase(), library_link_end(), object_preview_render(), paste_material_exec(), pose_paste_exec(), read_libraries(), render_endjob(), blender::seq::seq_prefetch_free(), blender::ed::vse::sequencer_clipboard_paste_exec(), blender::animrig::nla::tests::NLASlottedActionTest::TearDown(), blender::animrig::tests::ActionFCurveMoveTest::TearDown(), blender::animrig::tests::ActionFilterTest::TearDown(), blender::animrig::tests::ActionIteratorsTest::TearDown(), blender::animrig::tests::ActionLayersTest::TearDown(), blender::animrig::tests::ActionLegacyTest::TearDown(), blender::animrig::tests::ActionQueryTest::TearDown(), blender::animrig::tests::AnimationEvaluationTest::TearDown(), blender::animrig::tests::AnimDrawTest::TearDown(), blender::animrig::tests::ArmatureBoneCollections::TearDown(), blender::animrig::tests::KeyframingTest::TearDown(), blender::animrig::tests::PoseTest::TearDown(), blender::bke::image::partial_update::ImagePartialUpdateTest::TearDown(), blender::bke::tests::ArmatureDeformTest::TearDown(), blender::bke::tests::BMainMergeTest::TearDown(), blender::bke::tests::BPathTest::TearDown(), blender::bke::tests::ImageTest::TearDown(), blender::bke::tests::SceneTest::TearDown(), blender::editor::animation::tests::KeylistSummaryTest::TearDown(), blender::interface::tests::CopyDriversToSelected::TearDown(), blender::io::alembic::AlembicExportTest::TearDown(), BrushTest::TearDown(), blender::bke::tests::TEST(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::ed::animation::tests::TEST_F(), Freestyle::BlenderStrokeRenderer::~BlenderStrokeRenderer(), blender::bke::greasepencil::tests::GreasePencilIDTestContext::~GreasePencilIDTestContext(), blender::ed::greasepencil::tests::GreasePencilIDTestContext::~GreasePencilIDTestContext(), blender::bke::tests::LibIDMainSortTestContext::~LibIDMainSortTestContext(), blender::bke::tests::TestData::~TestData(), and blender::nodes::tests::TestData::~TestData().
Create a GSet storing all IDs present in given bmain, by their pointers.
| gset | If not NULL, given GSet will be extended with IDs from given bmain, instead of creating a new one. |
Definition at line 623 of file main.cc.
References BLI_ghashutil_ptrcmp(), BLI_ghashutil_ptrhash(), BLI_gset_add(), BLI_gset_new(), FOREACH_MAIN_ID_BEGIN, and FOREACH_MAIN_ID_END.
Referenced by BKE_main_idmap_create().
| bool BKE_main_has_issues | ( | const Main * | bmain | ) |
Check whether the bmain has issues, e.g. for reporting in the status bar.
Definition at line 474 of file main.cc.
References Main::colorspace, Main::has_forward_compatibility_issues, Main::is_asset_edit_file, and MainColorspace::is_missing_opencolorio_config.
Referenced by uiTemplateStatusInfo().
| bool BKE_main_is_empty | ( | Main * | bmain | ) |
Check whether given bmain is empty or contains some IDs.
Definition at line 462 of file main.cc.
References FOREACH_MAIN_ID_BEGIN, FOREACH_MAIN_ID_END, and result.
Referenced by library_link_end(), and read_libblock_undo_restore_at_old_address().
| void BKE_main_library_weak_reference_add | ( | ID * | local_id, |
| const char * | library_filepath, | ||
| const char * | library_id_name ) |
Add library weak reference to ID, referencing the specified library and ID name. For cases where creating a full MainLibraryWeakReferenceMap is unnecessary.
Definition at line 803 of file main.cc.
References LibraryWeakReference::library_filepath, LibraryWeakReference::library_id_name, ID::library_weak_reference, MEM_callocN(), and STRNCPY().
Referenced by blender::bke::asset_edit_id_ensure_local(), BKE_main_library_weak_reference_add_item(), and BLO_update_defaults_startup_blend().
| void BKE_main_library_weak_reference_add_item | ( | MainLibraryWeakReferenceMap * | library_weak_reference_mapping, |
| const char * | library_filepath, | ||
| const char * | library_id_name, | ||
| ID * | new_id ) |
Add the given ID weak library reference to given local ID and the runtime mapping.
| library_weak_reference_mapping | the mapping data generated by BKE_main_library_weak_reference_create. |
| library_filepath | the path of a blend file library (relative to current working one). |
| library_id_name | the full ID name, including the leading two chars encoding the ID type. |
| new_id | New local ID matching given weak reference. |
Definition at line 709 of file main.cc.
References Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), BKE_idtype_idcode_append_is_reusable(), BKE_main_library_weak_reference_add(), BLI_assert, GS, ID::library_weak_reference, MainLibraryWeakReferenceMap::map, and ID::name.
Referenced by BKE_blendfile_append().
| MainLibraryWeakReferenceMap * BKE_main_library_weak_reference_create | ( | Main * | bmain | ) |
Generate a mapping between 'library path' of an ID (as a pair (relative blend file path, id name)), and a current local ID, if any.
This uses the information stored in ID.library_weak_reference.
Definition at line 664 of file main.cc.
References BKE_idtype_idcode_append_is_reusable(), BKE_idtype_idcode_is_linkable(), BLI_assert, ListBase::first, FOREACH_MAIN_LISTBASE_BEGIN, FOREACH_MAIN_LISTBASE_END, FOREACH_MAIN_LISTBASE_ID_BEGIN, FOREACH_MAIN_LISTBASE_ID_END, GS, LibraryWeakReference::library_filepath, LibraryWeakReference::library_id_name, ID::library_weak_reference, and ID::name.
Referenced by BKE_blendfile_append().
| void BKE_main_library_weak_reference_destroy | ( | MainLibraryWeakReferenceMap * | library_weak_reference_mapping | ) |
Destroy the data generated by BKE_main_library_weak_reference_create.
Definition at line 694 of file main.cc.
Referenced by BKE_blendfile_append().
| ID * BKE_main_library_weak_reference_find | ( | Main * | bmain, |
| const char * | library_filepath, | ||
| const char * | library_id_name ) |
Find local ID with weak library reference matching library and ID name. For cases where creating a full MainLibraryWeakReferenceMap is unnecessary.
Definition at line 772 of file main.cc.
References BKE_main_blendfile_path(), BLI_path_abs(), FILE_MAX, GS, LISTBASE_FOREACH, STREQ, STRNCPY(), and which_libbase().
Referenced by blender::bke::asset_edit_id_find_local().
| void BKE_main_library_weak_reference_remove_item | ( | MainLibraryWeakReferenceMap * | library_weak_reference_mapping, |
| const char * | library_filepath, | ||
| const char * | library_id_name, | ||
| ID * | old_id ) |
Remove the given ID weak library reference from the given local ID and the runtime mapping.
| library_weak_reference_mapping | the mapping data generated by BKE_main_library_weak_reference_create. |
| library_filepath | the path of a blend file library (relative to current working one). |
| library_id_name | the full ID name, including the leading two chars encoding the ID type. |
| old_id | Existing local ID matching given weak reference. |
Definition at line 755 of file main.cc.
References BLI_assert, GS, ID::library_weak_reference, Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup(), MainLibraryWeakReferenceMap::map, MEM_SAFE_FREE, ID::name, and Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::remove().
Referenced by blendfile_append_define_actions(), and foreach_libblock_append_ensure_reusable_local_id_callback().
| ID * BKE_main_library_weak_reference_search_item | ( | MainLibraryWeakReferenceMap * | library_weak_reference_mapping, |
| const char * | library_filepath, | ||
| const char * | library_id_name ) |
Search for a local ID matching the given linked ID reference.
| library_weak_reference_mapping | the mapping data generated by BKE_main_library_weak_reference_create. |
| library_filepath | the path of a blend file library (relative to current working one). |
| library_id_name | the full ID name, including the leading two chars encoding the ID type. |
Definition at line 700 of file main.cc.
References Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_default(), and MainLibraryWeakReferenceMap::map.
Referenced by blendfile_append_define_actions().
| void BKE_main_library_weak_reference_update_item | ( | MainLibraryWeakReferenceMap * | library_weak_reference_mapping, |
| const char * | library_filepath, | ||
| const char * | library_id_name, | ||
| ID * | old_id, | ||
| ID * | new_id ) |
Update the status of the given ID weak library reference in current local IDs and the runtime mapping.
This effectively transfers the 'ownership' of the given weak reference from old_id to new_id.
| library_weak_reference_mapping | the mapping data generated by BKE_main_library_weak_reference_create. |
| library_filepath | the path of a blend file library (relative to current working one). |
| library_id_name | the full ID name, including the leading two chars encoding the ID type. |
| old_id | Existing local ID matching given weak reference. |
| new_id | New local ID matching given weak reference. |
Definition at line 733 of file main.cc.
References Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_overwrite(), BLI_assert, GS, LibraryWeakReference::library_filepath, LibraryWeakReference::library_id_name, ID::library_weak_reference, Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup(), MainLibraryWeakReferenceMap::map, ID::name, and STREQ.
| MainListsArray BKE_main_lists_get | ( | Main & | bmain | ) |
Returns the pointers to all the ListBase structs in given bmain.
This is useful for generic traversal of all the blocks in a Main (by traversing all the lists in turn), without worrying about block types.
Definition at line 987 of file main.cc.
References Main::actions, Main::armatures, Main::brushes, Main::cachefiles, Main::cameras, Main::collections, Main::curves, Main::fonts, Main::gpencils, Main::grease_pencils, Main::hair_curves, Main::images, INDEX_ID_AC, INDEX_ID_AR, INDEX_ID_BR, INDEX_ID_CA, INDEX_ID_CF, INDEX_ID_CU_LEGACY, INDEX_ID_CV, INDEX_ID_GD_LEGACY, INDEX_ID_GP, INDEX_ID_GR, INDEX_ID_IM, INDEX_ID_KE, INDEX_ID_LA, INDEX_ID_LI, INDEX_ID_LP, INDEX_ID_LS, INDEX_ID_LT, INDEX_ID_MA, INDEX_ID_MB, INDEX_ID_MC, INDEX_ID_ME, INDEX_ID_MSK, INDEX_ID_NT, INDEX_ID_OB, INDEX_ID_PA, INDEX_ID_PAL, INDEX_ID_PC, INDEX_ID_PT, INDEX_ID_SCE, INDEX_ID_SCR, INDEX_ID_SO, INDEX_ID_SPK, INDEX_ID_TE, INDEX_ID_TXT, INDEX_ID_VF, INDEX_ID_VO, INDEX_ID_WM, INDEX_ID_WO, INDEX_ID_WS, Main::lattices, Main::libraries, Main::lightprobes, Main::lights, Main::linestyles, Main::masks, Main::materials, Main::meshes, Main::metaballs, Main::movieclips, Main::nodetrees, Main::objects, Main::paintcurves, Main::palettes, Main::particles, Main::pointclouds, Main::scenes, Main::screens, Main::shapekeys, Main::sounds, Main::speakers, Main::texts, Main::textures, Main::volumes, Main::wm, Main::workspaces, and Main::worlds.
Referenced by add_main_to_main(), BKE_blendfile_library_relocate(), BKE_library_ID_test_usages(), BKE_library_indirectly_used_data_tag_clear(), BKE_library_make_local(), BKE_main_clear(), BKE_main_id_flag_all(), BKE_main_id_tag_all(), blo_do_versions_270(), BLO_main_validate_libraries(), blo_read_file_internal(), blo_split_main(), blender::ed::outliner::TreeDisplayIDOrphans::build_tree(), has_linked_ids_to_read(), id_delete(), library_ID_is_used(), read_library_clear_weak_links(), read_library_linked_ids(), read_undo_reuse_noundo_local_ids(), and split_main_newid().
| void BKE_main_lock | ( | Main * | bmain | ) |
Definition at line 486 of file main.cc.
References BLI_spin_lock(), and Main::lock.
Referenced by BKE_blendfile_id_relocate(), BKE_blendfile_library_relocate(), BKE_libblock_alloc_in_lib(), BKE_libblock_management_main_add(), BKE_libblock_management_main_remove(), BKE_libblock_remap(), BKE_libblock_remap_multiple(), BKE_libblock_unlink(), BKE_objects_materials_sync_length_all(), BLO_main_validate_libraries(), BLO_main_validate_shapekeys(), filelist_readjob_main_assets_add_items(), id_delete(), id_free(), and libblock_remap_foreach_idpair().
| void BKE_main_merge | ( | Main * | bmain_dst, |
| Main ** | r_bmain_src, | ||
| MainMergeReport & | reports ) |
Merge the content of bmain_src into bmain_dst.
In case of collision (ID from same library with same name), the existing ID in bmain_dst is kept, the one from bmain_src is left in its original Main, and its usages in bmain_dst (from newly moved-in IDs) are remapped to its matching counterpart already in bmain_dst.
Libraries are also de-duplicated, based on their absolute filepath, and remapped accordingly. Note that local IDs in source Main always remain local IDs in destination Main.
In case some source IDs are linked data from the blendfile of bmain_dst, they are never moved. If a matching destination local ID is found, their usage get remapped as expected, otherwise they are dropped, their usages are remapped to null, and a warning is printed.
Since bmain_src is either empty or contains left-over IDs with (likely) invalid ID relationships and other potential issues after the merge, it is always freed.
Definition at line 326 of file main.cc.
References blender::bke::id::IDRemapper::add(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), are_ids_from_different_mains_matching(), BKE_bpath_absolute_convert(), BKE_bpath_relative_rebase(), BKE_libblock_management_main_add(), BKE_libblock_management_main_remove(), BKE_libblock_relink_multiple(), BKE_main_free(), BKE_main_namemap_clear(), BKE_main_namemap_validate(), BKE_reportf(), BLI_assert, BLI_path_normalize_native(), BLI_path_split_dir_part(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), FILE_MAXDIR, Main::filepath, FOREACH_MAIN_ID_BEGIN, FOREACH_MAIN_ID_END, GS, ID_LI, ID_REMAP_DO_LIBRARY_POINTERS, ID_REMAP_TYPE_REMAP, blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_default(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_or_add(), main_merge_add_id_to_move(), ID::name, MainMergeReport::num_merged_ids, MainMergeReport::num_remapped_ids, MainMergeReport::num_remapped_libraries, MainMergeReport::num_unknown_ids, MainMergeReport::reports, RPT_INFO, Library::runtime, and blender::Vector< T, InlineBufferCapacity, Allocator >::size().
Referenced by blender::ed::vse::sequencer_clipboard_paste_exec(), blender::bke::tests::TEST_F(), and blender::bke::tests::TEST_F().
| bool BKE_main_needs_overwrite_confirm | ( | const Main * | bmain | ) |
Check whether user confirmation should be required when overwriting this bmain into its source blendfile.
Definition at line 480 of file main.cc.
References Main::colorspace, Main::has_forward_compatibility_issues, Main::is_asset_edit_file, and MainColorspace::is_missing_opencolorio_config.
Referenced by block_create__close_file_dialog(), and wm_save_mainfile_invoke().
| Main * BKE_main_new | ( | ) |
Create a new Main data-base.
Definition at line 89 of file main.cc.
References IMB_colormanagement_working_space_init_default().
Referenced by BKE_blender_globals_init(), Freestyle::BlenderStrokeRenderer::BlenderStrokeRenderer(), blo_add_main_for_library(), BLO_library_temp_load_id(), blo_read_file_internal(), blo_split_main(), bpy_rna_data_context_enter(), direct_link_library(), blender::bke::greasepencil::tests::GreasePencilIDTestContext::GreasePencilIDTestContext(), blender::ed::greasepencil::tests::GreasePencilIDTestContext::GreasePencilIDTestContext(), blender::bke::tests::LibIDMainSortTestContext::LibIDMainSortTestContext(), library_link_end(), object_preview_render(), paste_material_exec(), pose_paste_exec(), read_libraries(), blender::seq::seq_prefetch_start_ex(), blender::animrig::nla::tests::NLASlottedActionTest::SetUp(), blender::animrig::tests::ActionFCurveMoveTest::SetUp(), blender::animrig::tests::ActionFilterTest::SetUp(), blender::animrig::tests::ActionIteratorsTest::SetUp(), blender::animrig::tests::ActionLayersTest::SetUp(), blender::animrig::tests::ActionLegacyTest::SetUp(), blender::animrig::tests::ActionQueryTest::SetUp(), blender::animrig::tests::AnimationEvaluationTest::SetUp(), blender::animrig::tests::AnimDrawTest::SetUp(), blender::animrig::tests::ArmatureBoneCollections::SetUp(), blender::animrig::tests::KeyframingTest::SetUp(), blender::animrig::tests::PoseTest::SetUp(), blender::bke::image::partial_update::ImagePartialUpdateTest::SetUp(), blender::bke::tests::ArmatureDeformTest::SetUp(), blender::bke::tests::BMainMergeTest::SetUp(), blender::bke::tests::BPathTest::SetUp(), blender::bke::tests::ImageTest::SetUp(), blender::bke::tests::SceneTest::SetUp(), blender::editor::animation::tests::KeylistSummaryTest::SetUp(), blender::interface::tests::CopyDriversToSelected::SetUp(), blender::io::alembic::AlembicExportTest::SetUp(), BrushTest::SetUp(), BlendfileLoadingBaseTest::SetUpTestCase(), blender::bke::tests::TEST(), blender::asset_system::tests::TEST_F(), blender::asset_system::tests::TEST_F(), blender::bke::tests::TEST_F(), blender::bke::tests::TEST_F(), blender::ed::animation::tests::TEST_F(), blender::bke::tests::TestData::TestData(), and blender::nodes::tests::TestData::TestData().
| void BKE_main_relations_create | ( | Main * | bmain, |
| short | flag ) |
Generate the mappings between used IDs and their users, and vice-versa.
Definition at line 551 of file main.cc.
References BKE_library_foreach_ID_link(), BKE_main_relations_free(), BLI_assert, BLI_ghash_ensure_p(), BLI_ghash_new(), BLI_ghashutil_ptrcmp(), BLI_ghashutil_ptrhash(), BLI_mempool_create(), BLI_MEMPOOL_NOP, MainIDRelations::entry_items_pool, flag, MainIDRelations::flag, FOREACH_MAIN_ID_BEGIN, FOREACH_MAIN_ID_END, IDWALK_INCLUDE_UI, IDWALK_NOP, IDWALK_READONLY, main_relations_create_idlink_cb(), MAINIDRELATIONS_INCLUDE_UI, MEM_callocN(), MEM_mallocN(), Main::relations, and MainIDRelations::relations_from_pointers.
Referenced by BKE_lib_override_library_delete(), BKE_lib_override_library_id_hierarchy_reset(), BKE_lib_override_library_main_hierarchy_root_ensure(), BKE_lib_query_unused_ids_amounts(), BKE_lib_query_unused_ids_tag(), BKE_library_main_rebuild_hierarchy(), BKE_library_make_local(), lib_override_library_create_do(), lib_override_library_main_resync_on_library_indirect_level(), and lib_override_library_resync().
| void BKE_main_relations_free | ( | Main * | bmain | ) |
Definition at line 588 of file main.cc.
References BLI_ghash_free(), BLI_mempool_destroy(), MainIDRelations::entry_items_pool, MEM_freeN(), Main::relations, and MainIDRelations::relations_from_pointers.
Referenced by BKE_lib_override_library_delete(), BKE_lib_override_library_id_hierarchy_reset(), BKE_lib_override_library_main_hierarchy_root_ensure(), BKE_lib_query_unused_ids_amounts(), BKE_lib_query_unused_ids_tag(), BKE_library_main_rebuild_hierarchy(), BKE_library_make_local(), BKE_main_clear(), BKE_main_relations_create(), lib_override_library_create_do(), lib_override_library_main_resync_on_library_indirect_level(), and lib_override_library_resync().
| void BKE_main_relations_tag_set | ( | Main * | bmain, |
| eMainIDRelationsEntryTags | tag, | ||
| bool | value ) |
Set or clear given tag in all relation entries of given bmain.
Definition at line 600 of file main.cc.
References BLI_ghashIterator_done(), BLI_ghashIterator_free(), BLI_ghashIterator_getValue(), BLI_ghashIterator_new(), BLI_ghashIterator_step(), Main::relations, MainIDRelations::relations_from_pointers, and MainIDRelationsEntry::tags.
Referenced by lib_override_library_create_do(), lib_override_library_main_hierarchy_id_root_ensure(), lib_override_library_main_resync_on_library_indirect_level(), lib_override_library_resync(), lib_override_linked_group_tag(), lib_override_resync_tagging_finalize(), and lib_query_unused_ids_tag().
| void BKE_main_thumbnail_create | ( | Main * | bmain | ) |
Generates an empty (black) thumbnail for given Main.
Definition at line 877 of file main.cc.
References Main::blen_thumb, BLEN_THUMB_MEMSIZE, BLEN_THUMB_SIZE, BlendThumbnail::height, MEM_callocN(), MEM_SAFE_FREE, and BlendThumbnail::width.
| BlendThumbnail * BKE_main_thumbnail_from_buffer | ( | Main * | bmain, |
| const uint8_t * | rect, | ||
| const int | size[2] ) |
Generates a raw .blend file thumbnail data from a raw image buffer.
| bmain | If not NULL, also store generated data in this Main. |
| rect | RGBA image buffer. |
| size | The size of rect. |
Definition at line 815 of file main.cc.
References Main::blen_thumb, BLEN_THUMB_MEMSIZE, data, MEM_mallocN(), MEM_SAFE_FREE, and size().
Referenced by blend_file_thumb_from_screenshot().
| BlendThumbnail * BKE_main_thumbnail_from_imbuf | ( | Main * | bmain, |
| ImBuf * | img ) |
Generates a raw .blend file thumbnail data from given image.
| bmain | If not NULL, also store generated data in this Main. |
| img | ImBuf image to generate thumbnail data from. |
Definition at line 837 of file main.cc.
References Main::blen_thumb, BLEN_THUMB_MEMSIZE, ImBuf::byte_buffer, data, ImBufByteBuffer::data, IMB_byte_from_float(), MEM_mallocN(), MEM_SAFE_FREE, ImBuf::x, and ImBuf::y.
Referenced by blend_file_thumb_from_camera(), and blend_file_thumb_from_screenshot().
| ImBuf * BKE_main_thumbnail_to_imbuf | ( | Main * | bmain, |
| BlendThumbnail * | data ) |
Generates an image from raw .blend file thumbnail data.
| bmain | Use this bmain->blen_thumb data if given data is NULL. |
| data | Raw .blend file thumbnail data. |
Definition at line 861 of file main.cc.
References Main::blen_thumb, data, and IMB_allocFromBuffer().
Referenced by imb_thumb_load_from_blendfile(), uiTemplateRecentFiles_tooltip_func(), and wm_file_write().
| void BKE_main_unlock | ( | Main * | bmain | ) |
Definition at line 491 of file main.cc.
References BLI_spin_unlock(), and Main::lock.
Referenced by BKE_blendfile_id_relocate(), BKE_blendfile_library_relocate(), BKE_libblock_alloc_in_lib(), BKE_libblock_management_main_add(), BKE_libblock_management_main_remove(), BKE_libblock_remap(), BKE_libblock_remap_multiple(), BKE_libblock_unlink(), BKE_objects_materials_sync_length_all(), BLO_main_validate_libraries(), BLO_main_validate_shapekeys(), filelist_readjob_main_assets_add_items(), id_delete(), id_free(), and libblock_remap_foreach_idpair().
Definition at line 902 of file main.cc.
References Main::actions, Main::armatures, Main::brushes, Main::cachefiles, Main::cameras, Main::collections, Main::curves, Main::fonts, Main::gpencils, Main::grease_pencils, Main::hair_curves, ID_AC, ID_AR, ID_BR, ID_CA, ID_CF, ID_CU_LEGACY, ID_CV, ID_GD_LEGACY, ID_GP, ID_GR, ID_IM, 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_SO, ID_SPK, ID_TE, ID_TXT, ID_VF, ID_VO, ID_WM, ID_WO, ID_WS, Main::images, Main::lattices, Main::libraries, Main::lightprobes, Main::lights, Main::linestyles, Main::masks, Main::materials, Main::meshes, Main::metaballs, Main::movieclips, Main::nodetrees, Main::objects, Main::paintcurves, Main::palettes, Main::particles, Main::pointclouds, Main::scenes, Main::screens, Main::shapekeys, Main::sounds, Main::speakers, Main::texts, Main::textures, Main::volumes, Main::wm, Main::workspaces, and Main::worlds.
Referenced by BKE_blendfile_library_relocate(), BKE_id_is_in_main(), BKE_id_move_to_same_lib(), BKE_lib_id_clear_library_data(), BKE_libblock_alloc_in_lib(), BKE_libblock_find_name(), BKE_libblock_find_name_and_library_filepath(), BKE_libblock_find_session_uid(), BKE_libblock_management_main_add(), BKE_libblock_management_main_remove(), BKE_libblock_rename(), BKE_main_id_tag_idcode(), BKE_main_idmap_lookup_name(), BKE_main_library_weak_reference_find(), BKE_mask_clipboard_paste_to_layer(), blendfile_library_relocate_id_remap_finalize(), blendfile_relocate_postprocess_cleanup(), blo_do_versions_280(), blo_do_versions_290(), blo_do_versions_300(), blender::ed::outliner::TreeDisplayIDOrphans::build_tree(), create_placeholder(), do_versions_rename_id(), id_free(), lib_override_library_create_from(), library_id_is_yet_read_main(), link_named_part(), main_namemap_validate_and_fix(), blender::ed::outliner::outliner_id_itemf(), blender::ed::outliner::outliner_id_remap_exec(), paste_material_nodetree_ids_relink_or_clear(), blender::ed::animation::pastebuf_match_path_property(), read_id_in_lib(), read_libblock(), read_libblock_undo_restore_at_old_address(), read_libblock_undo_restore_identical(), read_undo_reuse_noundo_local_ids(), reuse_bmain_move_id(), reuse_editable_asset_bmain_data_for_blendfile(), split_libdata(), swap_old_bmain_data_dependencies_process(), swap_old_bmain_data_for_blendfile(), ui_template_id(), and uiTemplateAction().