|
Blender V4.3
|
Go to the source code of this file.
Classes | |
| struct | IDCacheKey |
| struct | IDTypeInfo |
Macros | |
| #define | BKE_idtype_idcode_is_localizable BKE_idtype_idcode_is_linkable |
Typedefs | |
| using | IDTypeInitDataFunction = void (*)(ID *id) |
| using | IDTypeCopyDataFunction |
| using | IDTypeFreeDataFunction = void (*)(ID *id) |
| using | IDTypeMakeLocalFunction = void (*)(Main *bmain, ID *id, int flags) |
| using | IDTypeForeachIDFunction = void (*)(ID *id, LibraryForeachIDData *data) |
| using | IDTypeForeachCacheFunctionCallback |
| using | IDTypeForeachCacheFunction |
| using | IDTypeForeachPathFunction = void (*)(ID *id, BPathForeachPathData *bpath_data) |
| using | IDTypeEmbeddedOwnerPointerGetFunction = ID **(*)(ID *id, bool debug_relationship_assert) |
| using | IDTypeBlendWriteFunction = void (*)(BlendWriter *writer, ID *id, const void *id_address) |
| using | IDTypeBlendReadDataFunction = void (*)(BlendDataReader *reader, ID *id) |
| using | IDTypeBlendReadAfterLiblinkFunction = void (*)(BlendLibReader *reader, ID *id) |
| using | IDTypeBlendReadUndoPreserve = void (*)(BlendLibReader *reader, ID *id_new, ID *id_old) |
| using | IDTypeLibOverrideApplyPost = void (*)(ID *id_dst, ID *id_src) |
Enumerations | |
| enum | { IDTYPE_FLAGS_NO_COPY = 1 << 0 , IDTYPE_FLAGS_NO_LIBLINKING = 1 << 1 , IDTYPE_FLAGS_ONLY_APPEND = 1 << 2 , IDTYPE_FLAGS_APPEND_IS_REUSABLE = 1 << 3 , IDTYPE_FLAGS_NO_ANIMDATA = 1 << 4 , IDTYPE_FLAGS_NO_MEMFILE_UNDO = 1 << 5 , IDTYPE_FLAGS_NEVER_UNUSED = 1 << 6 } |
| enum | eIDTypeInfoCacheCallbackFlags { IDTYPE_CACHE_CB_FLAGS_PERSISTENT = 1 << 0 } |
ID type structure, helping to factorize common operations and data for all data-block types.
Definition in file BKE_idtype.hh.
| #define BKE_idtype_idcode_is_localizable BKE_idtype_idcode_is_linkable |
Definition at line 364 of file BKE_idtype.hh.
Referenced by template_ID().
| using IDTypeBlendReadAfterLiblinkFunction = void (*)(BlendLibReader *reader, ID *id) |
Definition at line 118 of file BKE_idtype.hh.
| using IDTypeBlendReadDataFunction = void (*)(BlendDataReader *reader, ID *id) |
Definition at line 117 of file BKE_idtype.hh.
| using IDTypeBlendReadUndoPreserve = void (*)(BlendLibReader *reader, ID *id_new, ID *id_old) |
Definition at line 120 of file BKE_idtype.hh.
| using IDTypeBlendWriteFunction = void (*)(BlendWriter *writer, ID *id, const void *id_address) |
Definition at line 116 of file BKE_idtype.hh.
| using IDTypeCopyDataFunction |
| flag | Copying options (see BKE_lib_id.hh's LIB_ID_COPY_... flags for more). |
Definition at line 83 of file BKE_idtype.hh.
| using IDTypeEmbeddedOwnerPointerGetFunction = ID **(*)(ID *id, bool debug_relationship_assert) |
Callback returning the address of the pointer to the owner ID, for embedded (and Shape-key) ones.
| debug_relationship_assert | usually the owner <-> embedded relation pointers should be fully valid, and can be asserted on. But in some cases, they are not (fully) valid, e.g when copying an ID and all of its embedded data. |
Definition at line 114 of file BKE_idtype.hh.
Definition at line 100 of file BKE_idtype.hh.
Definition at line 98 of file BKE_idtype.hh.
| using IDTypeForeachIDFunction = void (*)(ID *id, LibraryForeachIDData *data) |
Definition at line 91 of file BKE_idtype.hh.
| using IDTypeForeachPathFunction = void (*)(ID *id, BPathForeachPathData *bpath_data) |
Definition at line 104 of file BKE_idtype.hh.
| using IDTypeFreeDataFunction = void (*)(ID *id) |
Definition at line 86 of file BKE_idtype.hh.
| using IDTypeInitDataFunction = void (*)(ID *id) |
Definition at line 80 of file BKE_idtype.hh.
| using IDTypeLibOverrideApplyPost = void (*)(ID *id_dst, ID *id_src) |
Definition at line 122 of file BKE_idtype.hh.
| using IDTypeMakeLocalFunction = void (*)(Main *bmain, ID *id, int flags) |
| flags | See BKE_lib_id.hh's LIB_ID_MAKELOCAL_... flags. |
Definition at line 89 of file BKE_idtype.hh.
| anonymous enum |
| Enumerator | |
|---|---|
| IDTYPE_FLAGS_NO_COPY | Indicates that the given IDType does not support copying. |
| IDTYPE_FLAGS_NO_LIBLINKING | Indicates that the given IDType does not support linking/appending from a library file. |
| IDTYPE_FLAGS_ONLY_APPEND | Indicates that the given IDType should not be directly linked from a library file, but may be appended. NOTE: Mutually exclusive with |
| IDTYPE_FLAGS_APPEND_IS_REUSABLE | Allow to re-use an existing local ID with matching weak library reference instead of creating a new copy of it, when appending. See also LibraryWeakReference in |
| IDTYPE_FLAGS_NO_ANIMDATA | Indicates that the given IDType does not have animation data. |
| IDTYPE_FLAGS_NO_MEMFILE_UNDO | Indicates that the given IDType is not handled through memfile (aka global) undo.
|
| IDTYPE_FLAGS_NEVER_UNUSED | Indicates that the given IDType is considered as unused. This is used for some 'root' ID types which typically do not have any actual user (WM. Scene...). It prevents e.g. their deletion through the 'Purge' operation.
|
Definition at line 28 of file BKE_idtype.hh.
| Enumerator | |
|---|---|
| IDTYPE_CACHE_CB_FLAGS_PERSISTENT | Indicates to the callback that cache may be stored in the .blend file, so its pointer should not be cleared at read-time. |
Definition at line 93 of file BKE_idtype.hh.
| bool BKE_idtype_cache_key_cmp | ( | const void * | key_a_v, |
| const void * | key_b_v ) |
Definition at line 41 of file idtype.cc.
References IDCacheKey::id_session_uid, and IDCacheKey::identifier.
Referenced by blo_cache_storage_init().
| uint BKE_idtype_cache_key_hash | ( | const void * | key_v | ) |
Definition at line 33 of file idtype.cc.
References BLI_ghashutil_combine_hash(), BLI_ghashutil_uinthash(), hash, IDCacheKey::id_session_uid, and IDCacheKey::identifier.
Referenced by blo_cache_storage_init().
| const IDTypeInfo * BKE_idtype_get_info_from_id | ( | const ID * | id | ) |
Definition at line 150 of file idtype.cc.
References BKE_idtype_get_info_from_idcode(), and GS.
Referenced by absolute_convert_foreach_path_cb(), after_liblink_id_process(), blender::bke::asset_write_in_library(), BKE_bpath_foreach_path_id(), BKE_id_copy_in_lib(), BKE_id_owner_get(), BKE_idtype_id_foreach_cache(), BKE_lib_id_clear_library_data(), BKE_lib_id_make_local(), BKE_libblock_copy_in_lib(), BKE_libblock_free_datablock(), BKE_libblock_init_empty(), BKE_library_id_can_use_filter_id(), BKE_library_id_can_use_idtype(), blo_cache_storage_init(), blo_cache_storage_old_bmain_clear(), BLO_write_init_id_buffer_from_id(), blender::ed::asset::clear_id(), direct_link_id(), direct_link_id_common(), id_buffer_init_from_id(), id_swap(), lib_link_all(), lib_query_unused_ids_tag_recurse(), library_foreach_ID_link(), blender::ed::asset::mark_id(), read_libblock_undo_restore(), read_undo_reuse_noundo_local_ids(), relative_convert_foreach_path_cb(), RNA_struct_override_apply(), and write_file_handle().
| const IDTypeInfo * BKE_idtype_get_info_from_idcode | ( | short | id_code | ) |
Definition at line 145 of file idtype.cc.
References BKE_idtype_get_info_from_idtype_index(), and BKE_idtype_idcode_to_index().
Referenced by blender::bke::asset_root_path_for_save(), BKE_idtype_get_info_from_id(), BKE_idtype_id_foreach_cache(), BKE_idtype_idcode_append_is_reusable(), BKE_idtype_idcode_is_linkable(), BKE_idtype_idcode_is_only_appendable(), BKE_idtype_idcode_is_valid(), BKE_idtype_idcode_to_name(), BKE_idtype_idcode_to_name_plural(), BKE_idtype_idcode_to_translation_context(), BKE_libblock_get_alloc_info(), and id_type_can_have_animdata().
| const IDTypeInfo * BKE_idtype_get_info_from_idtype_index | ( | const int | idtype_index | ) |
Definition at line 133 of file idtype.cc.
References id_types, and IDTypeInfo::name.
Referenced by BKE_idtype_get_info_from_idcode(), BKE_idtype_index_to_idcode(), BKE_idtype_index_to_idfilter(), get_alloc_name(), and setup_app_data().
| void BKE_idtype_id_foreach_cache | ( | ID * | id, |
| IDTypeForeachCacheFunctionCallback | function_callback, | ||
| void * | user_data ) |
Wrapper around IDTypeInfo foreach_cache that also handles embedded IDs.
Definition at line 385 of file idtype.cc.
References BKE_idtype_get_info_from_id(), BKE_idtype_get_info_from_idcode(), IDTypeInfo::foreach_cache, GS, bNodeTree::id, ID_NT, ID_SCE, and blender::bke::node_tree_from_id().
Referenced by blo_cache_storage_init(), blo_cache_storage_old_bmain_clear(), and direct_link_id().
| bool BKE_idtype_idcode_append_is_reusable | ( | short | idcode | ) |
Check if an ID type can try to reuse and existing matching local one when being appended again.
| idcode | The IDType code to check. |
Definition at line 220 of file idtype.cc.
References BKE_idtype_get_info_from_idcode(), BLI_assert, IDTypeInfo::flags, IDTYPE_FLAGS_APPEND_IS_REUSABLE, and IDTYPE_FLAGS_NO_LIBLINKING.
Referenced by BKE_blendfile_append(), BKE_main_library_weak_reference_add_item(), BKE_main_library_weak_reference_create(), and blendfile_append_define_actions().
| short BKE_idtype_idcode_from_name | ( | const char * | idtype_name | ) |
Convert an ID-type name into an idcode (ie. ID_SCE)
| idtype_name | The ID-type's "user visible name" to convert. |
Definition at line 189 of file idtype.cc.
References BLI_assert, IDTypeInfo::id_code, and idtype_get_info_from_name().
Referenced by groupname_to_code(), imb_thumb_load_from_blend_id(), wm_link_append_exec(), and wm_link_append_item_poll().
| bool BKE_idtype_idcode_is_linkable | ( | short | idcode | ) |
Check if an ID type is linkable.
| idcode | The IDType code to check. |
Definition at line 201 of file idtype.cc.
References BKE_idtype_get_info_from_idcode(), BLI_assert, IDTypeInfo::flags, and IDTYPE_FLAGS_NO_LIBLINKING.
Referenced by BKE_blendfile_library_relocate(), BKE_blendfile_link_append_context_item_idtypes_from_library_add(), BKE_id_can_be_asset(), BKE_lib_override_library_create_from_tag(), BKE_library_make_local(), BKE_main_library_weak_reference_create(), BLO_blendhandle_get_linkable_groups(), bpy_lib_enter(), bpy_lib_exit(), foreach_libblock_link_append_common_processing(), id_lib_extern(), id_lib_indirect_weak_link(), blender::ed::outliner::id_override_library_create_hierarchy_pre_process(), lib_id_expand_local_cb(), link_named_part(), read_file_bhead_idname_map_create(), read_library_linked_id(), wm_link_append_item_poll(), write_file_handle(), write_id_direct_linked_data_process_cb(), and write_libraries().
| bool BKE_idtype_idcode_is_only_appendable | ( | short | idcode | ) |
Check if an ID type is only appendable.
| idcode | The IDType code to check. |
Definition at line 208 of file idtype.cc.
References BKE_idtype_get_info_from_idcode(), BLI_assert, IDTypeInfo::flags, IDTYPE_FLAGS_NO_LIBLINKING, and IDTYPE_FLAGS_ONLY_APPEND.
Referenced by wm_link_append_item_poll().
| bool BKE_idtype_idcode_is_valid | ( | short | idcode | ) |
Return if the ID code is a valid ID code.
| idcode | The code to check. |
Definition at line 196 of file idtype.cc.
References BKE_idtype_get_info_from_idcode(), and true.
Referenced by blo_bhead_is_id_valid_type(), BLO_blendhandle_get_linkable_groups(), and link_named_part().
| short BKE_idtype_idcode_iter_step | ( | int * | idtype_index | ) |
Return an ID code and steps the index forward 1.
| index | start as 0. |
Definition at line 379 of file idtype.cc.
References BKE_idtype_index_to_idcode(), and id_types.
Referenced by BKE_blendfile_link_append_context_item_idtypes_from_library_add(), BKE_main_idmap_create(), bpy_lib_enter(), bpy_lib_exit(), and main_namemap_validate_and_fix().
| uint64_t BKE_idtype_idcode_to_idfilter | ( | short | idcode | ) |
Convert an idcode into an idfilter (e.g. ID_OB -> FILTER_ID_OB).
Definition at line 369 of file idtype.cc.
References BKE_idtype_idcode_to_index(), and BKE_idtype_index_to_idfilter().
Referenced by blender::bke::id::IDRemapper::add(), blender::bke::id::IDRemapper::add_overwrite(), BKE_blendfile_link_append_context_item_idtypes_from_library_add(), BKE_library_id_can_use_idtype(), blender::ed::asset::filter_matches_asset(), is_filtered_id_file_type(), and previews_clear_exec().
| int BKE_idtype_idcode_to_index | ( | short | idcode | ) |
Convert an idcode into an idtype_index (e.g. ID_OB -> INDEX_ID_OB).
Definition at line 232 of file idtype.cc.
References BR, CASE_IDINDEX, CV, ID_LINK_PLACEHOLDER, INDEX_ID_NULL, and LT.
Referenced by blender::deg::Depsgraph::add_id_node(), BKE_idtype_get_info_from_idcode(), BKE_idtype_idcode_to_idfilter(), DEG_graph_id_type_tag(), DEG_id_type_any_exists(), DEG_id_type_updated(), UniqueName_Map::find_by_type(), lib_query_unused_ids_tag_id(), read_libblock(), and blender::ed::outliner::tree_element_id_type_to_index().
| const char * BKE_idtype_idcode_to_name | ( | short | idcode | ) |
Convert an idcode into a name.
| idcode | The code to convert. |
Definition at line 168 of file idtype.cc.
References BKE_idtype_get_info_from_idcode(), BLI_assert, and IDTypeInfo::name.
Referenced by blender::ed::object::apply_objects_internal(), blender::bke::asset_edit_weak_reference_from_id(), blender::bke::asset_weak_reference_for_essentials(), blender::bke::asset_weak_reference_for_user_library(), BKE_id_new_in_lib(), BKE_id_new_name_validate(), BKE_id_new_nomain(), BKE_mesh_new_nomain(), BKE_pointcloud_new_nomain(), BLO_blendhandle_get_linkable_groups(), blender::ed::space_node::create_inspection_string_for_generic_value(), datadropper_init(), delete_key_button_exec(), blender::animrig::delete_keyframe(), filelist_readjob_list_lib_add_from_indexer_entries(), filelist_readjob_main_assets_add_items(), pydriver_error(), pyrna_struct_keyframe_delete(), read_library_linked_id(), rna_id_write_error(), setup_app_data(), UI_context_copy_to_selected_list(), ui_tooltip_data_from_search_item_tooltip_data(), uiTemplatePreview(), blender::ed::outliner::unused_message_gen(), and WM_operator_drop_load_path().
| const char * BKE_idtype_idcode_to_name_plural | ( | short | idcode | ) |
Convert an idcode into a name (plural).
| idcode | The code to convert. |
Definition at line 175 of file idtype.cc.
References BKE_idtype_get_info_from_idcode(), BLI_assert, and IDTypeInfo::name_plural.
Referenced by blender::bke::asset_weak_reference_for_essentials(), bpy_lib_enter(), bpy_lib_exit(), bpy_lib_exit_lapp_context_items_cb(), idp_repr_fn_recursive(), blender::ed::outliner::outliner_idcode_to_plural(), pyrna_prop_repr_ex(), pyrna_struct_repr(), RNA_path_full_ID_py(), blender::ed::outliner::unused_message_gen(), and WM_drag_get_item_name().
| const char * BKE_idtype_idcode_to_translation_context | ( | short | idcode | ) |
Convert an idcode into its translations' context.
| idcode | The code to convert. |
Definition at line 182 of file idtype.cc.
References BKE_idtype_get_info_from_idcode(), BLI_assert, BLT_I18NCONTEXT_DEFAULT, and IDTypeInfo::translation_context.
| short BKE_idtype_idfilter_to_idcode | ( | uint64_t | idfilter | ) |
Convert an idfilter into an idcode (e.g. FILTER_ID_OB -> ID_OB).
Definition at line 374 of file idtype.cc.
References BKE_idtype_idfilter_to_index(), and BKE_idtype_index_to_idcode().
Convert an id_filter into an idtype_index (e.g. FILTER_ID_OB -> INDEX_ID_OB).
Definition at line 291 of file idtype.cc.
References BR, CASE_IDINDEX, CV, and LT.
Referenced by BKE_idtype_idfilter_to_idcode().
| short BKE_idtype_index_to_idcode | ( | int | idtype_index | ) |
Convert an idtype_index into an idcode (e.g. INDEX_ID_OB -> ID_OB).
Definition at line 347 of file idtype.cc.
References BKE_idtype_get_info_from_idtype_index(), BLI_assert_unreachable, and IDTypeInfo::id_code.
Referenced by BKE_idtype_idcode_iter_step(), BKE_idtype_idfilter_to_idcode(), and blender::ed::outliner::unused_message_gen().
Convert an idtype_index into an idfilter (e.g. INDEX_ID_OB -> FILTER_ID_OB).
Definition at line 358 of file idtype.cc.
References BKE_idtype_get_info_from_idtype_index(), BLI_assert_unreachable, and IDTypeInfo::id_filter.
Referenced by BKE_idtype_idcode_to_idfilter().
| void BKE_idtype_init | ( | ) |
Definition at line 127 of file idtype.cc.
References id_type_init().
Referenced by blender::bke::tests::Context< TestData >::Context(), blender::bke::greasepencil::tests::GreasePencilIDTestContext::GreasePencilIDTestContext(), blender::ed::greasepencil::tests::GreasePencilIDTestContext::GreasePencilIDTestContext(), blender::bke::tests::LibIDMainSortTestContext::LibIDMainSortTestContext(), main(), blender::bke::image::partial_update::ImagePartialUpdateTest::SetUp(), BlendfileLoadingBaseTest::SetUpTestCase(), blender::animrig::nla::tests::NLASlottedActionTest::SetUpTestSuite(), blender::animrig::tests::ActionFCurveMoveTest::SetUpTestSuite(), blender::animrig::tests::ActionFilterTest::SetUpTestSuite(), blender::animrig::tests::ActionIteratorsTest::SetUpTestSuite(), blender::animrig::tests::ActionLayersTest::SetUpTestSuite(), blender::animrig::tests::ActionLegacyTest::SetUpTestSuite(), blender::animrig::tests::ActionQueryTest::SetUpTestSuite(), blender::animrig::tests::AnimationEvaluationTest::SetUpTestSuite(), blender::animrig::tests::KeyframingTest::SetUpTestSuite(), blender::bke::tests::BMainTest::SetUpTestSuite(), blender::bke::tests::BPathTest::SetUpTestSuite(), blender::bke::tests::ImageTest::SetUpTestSuite(), blender::interface::tests::CopyDriversToSelected::SetUpTestSuite(), blender::animrig::tests::ArmatureBoneCollections::TearDown(), blender::animrig::tests::ArmatureBoneCollectionsTestList::TearDown(), blender::bke::id::tests::TEST(), blender::bke::id::tests::TEST(), blender::bke::id::tests::TEST(), blender::bke::id::tests::TEST(), blender::bke::id::tests::TEST(), and blender::bke::tests::TEST().
|
extern |
Definition at line 767 of file blenkernel/intern/action.cc.
Referenced by id_type_init().
|
extern |
Definition at line 477 of file armature.cc.
|
extern |
|
extern |
Definition at line 227 of file blenkernel/intern/camera.cc.
|
extern |
Definition at line 123 of file cachefile.cc.
|
extern |
|
extern |
Definition at line 141 of file blenkernel/intern/curves.cc.
|
extern |
Definition at line 269 of file gpencil_legacy.cc.
|
extern |
Definition at line 240 of file grease_pencil.cc.
|
extern |
Definition at line 382 of file collection.cc.
|
extern |
Definition at line 482 of file source/blender/blenkernel/intern/image.cc.
|
extern |
|
extern |
|
extern |
Definition at line 164 of file blenkernel/intern/light.cc.
|
extern |
Definition at line 105 of file library.cc.
|
extern |
Empty shell mostly, but needed for read code.
Definition at line 87 of file lib_id.cc.
Referenced by id_type_init().
|
extern |
Definition at line 53 of file lightprobe.cc.
|
extern |
Definition at line 650 of file linestyle.cc.
|
extern |
Definition at line 165 of file lattice.cc.
|
extern |
Definition at line 240 of file blenkernel/intern/material.cc.
|
extern |
|
extern |
Definition at line 287 of file movieclip.cc.
|
extern |
Definition at line 391 of file blenkernel/intern/mesh.cc.
|
extern |
Definition at line 181 of file blenkernel/intern/mask.cc.
|
extern |
|
extern |
Definition at line 1070 of file blenkernel/intern/object.cc.
|
extern |
Definition at line 381 of file particle.cc.
|
extern |
|
extern |
|
extern |
Definition at line 149 of file pointcloud.cc.
|
extern |
Definition at line 1607 of file scene.cc.
Referenced by blender::bke::tests::TEST(), and blender::bke::tests::TEST().
|
extern |
|
extern |
Definition at line 194 of file blenkernel/intern/sound.cc.
|
extern |
Definition at line 51 of file speaker.cc.
|
extern |
Definition at line 200 of file texture.cc.
|
extern |
|
extern |
|
extern |
Definition at line 283 of file blenkernel/intern/volume.cc.
|
extern |
|
extern |
Definition at line 190 of file blenkernel/intern/world.cc.
|
extern |
Definition at line 177 of file workspace.cc.