Blender  V3.3
BKE_main_idmap.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 #pragma once
3 
18 #include "BLI_compiler_attrs.h"
19 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
24 struct ID;
25 struct IDNameLib_Map;
26 struct Main;
27 
28 enum {
31 };
32 
45  bool create_valid_ids_set,
46  struct Main *old_bmain,
48  ATTR_NONNULL(1);
50 
51 void BKE_main_idmap_insert_id(struct IDNameLib_Map *id_map, struct ID *id) ATTR_NONNULL();
52 void BKE_main_idmap_remove_id(struct IDNameLib_Map *id_map, struct ID *id) ATTR_NONNULL();
53 
55  ATTR_NONNULL();
56 
58  short id_type,
59  const char *name,
60  const struct Library *lib) ATTR_WARN_UNUSED_RESULT
61  ATTR_NONNULL(1, 3);
63  const struct ID *id) ATTR_WARN_UNUSED_RESULT
64  ATTR_NONNULL(1, 2);
65 
68 
69 #ifdef __cplusplus
70 }
71 #endif
struct IDNameLib_Map * BKE_main_idmap_create(struct Main *bmain, bool create_valid_ids_set, struct Main *old_bmain, int idmap_types) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
Definition: main_idmap.c:77
struct ID struct ID struct ID * BKE_main_idmap_lookup_uuid(struct IDNameLib_Map *id_map, uint session_uuid) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
Definition: main_idmap.c:250
@ MAIN_IDMAP_TYPE_UUID
@ MAIN_IDMAP_TYPE_NAME
void BKE_main_idmap_destroy(struct IDNameLib_Map *id_map) ATTR_NONNULL()
Definition: main_idmap.c:258
struct Main * BKE_main_idmap_main_get(struct IDNameLib_Map *id_map) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
Definition: main_idmap.c:182
void BKE_main_idmap_remove_id(struct IDNameLib_Map *id_map, struct ID *id) ATTR_NONNULL()
Definition: main_idmap.c:158
struct ID * BKE_main_idmap_lookup_name(struct IDNameLib_Map *id_map, short id_type, const char *name, const struct Library *lib) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
void BKE_main_idmap_insert_id(struct IDNameLib_Map *id_map, struct ID *id) ATTR_NONNULL()
Definition: main_idmap.c:128
struct ID struct ID * BKE_main_idmap_lookup_id(struct IDNameLib_Map *id_map, const struct ID *id) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
#define ATTR_WARN_UNUSED_RESULT
#define ATTR_NONNULL(...)
unsigned int uint
Definition: BLI_sys_types.h:67
Definition: id_map.h:23
DRWShaderLibrary * lib
struct Main * bmain
Definition: main_idmap.c:56
Definition: DNA_ID.h:368
unsigned int session_uuid
Definition: DNA_ID.h:407
char name[66]
Definition: DNA_ID.h:378
Definition: BKE_main.h:121