|
Cache ID (name, library lookups). This doesn't account for adding/removing data-blocks, and should only be used when performing many lookups.
- Note
- GHash's are initialized on demand, since its likely some types will never have lookups run on them, so its a waste to create and never use.
|
| IDNameLib_Map * | blender::BKE_main_idmap_create (Main *bmain, bool create_valid_ids_set, Main *old_bmain, int idmap_types) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) |
| void | blender::BKE_main_idmap_clear (IDNameLib_Map &id_map) |
| void | blender::BKE_main_idmap_destroy (IDNameLib_Map *id_map) ATTR_NONNULL() |
| void | blender::BKE_main_idmap_insert_id (IDNameLib_Map *id_map, ID *id) ATTR_NONNULL() |
| void | blender::BKE_main_idmap_remove_id (IDNameLib_Map *id_map, const ID *id) ATTR_NONNULL() |
| Main * | blender::BKE_main_idmap_main_get (IDNameLib_Map *id_map) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() |
| ID * | blender::BKE_main_idmap_lookup_name (IDNameLib_Map *id_map, short id_type, const char *name, const Library *lib) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1 |
| ID ID * | blender::BKE_main_idmap_lookup_id (IDNameLib_Map *id_map, const ID *id) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1 |
| ID ID ID * | blender::BKE_main_idmap_lookup_uid (IDNameLib_Map *id_map, uint session_uid) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) |
API to generate and use a mapping from [ID type & name] to [id pointer], within a given Main data-base.
- Note
- BKE_main files are for operations over the Main database itself, or generating extra temp data to help working with it. Those should typically not affect the data-blocks themselves.
Names
- BKE_main_idmap_ Should be used for functions in that file.
Definition in file BKE_main_idmap.hh.