Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/BKE_main.h
| Show First 20 Lines • Show All 206 Lines • ▼ Show 20 Lines | |||||
| void BKE_main_relations_create(struct Main *bmain, const short flag); | void BKE_main_relations_create(struct Main *bmain, const short flag); | ||||
| void BKE_main_relations_free(struct Main *bmain); | void BKE_main_relations_free(struct Main *bmain); | ||||
| void BKE_main_relations_tag_set(struct Main *bmain, | void BKE_main_relations_tag_set(struct Main *bmain, | ||||
| const MainIDRelationsEntryTags tag, | const MainIDRelationsEntryTags tag, | ||||
| const bool value); | const bool value); | ||||
| struct GSet *BKE_main_gset_create(struct Main *bmain, struct GSet *gset); | struct GSet *BKE_main_gset_create(struct Main *bmain, struct GSet *gset); | ||||
| /* | |||||
| * Temporary runtime API to allow re-using local (already appended) IDs instead of appending a new | |||||
| * copy again. | |||||
| */ | |||||
| struct GHash *BKE_main_library_weak_reference_create(struct Main *bmain) ATTR_NONNULL(); | |||||
| void BKE_main_library_weak_reference_destroy(struct GHash *library_weak_reference_mapping) | |||||
| ATTR_NONNULL(); | |||||
| struct ID *BKE_main_library_weak_reference_search_item( | |||||
| struct GHash *library_weak_reference_mapping, | |||||
| const char *library_filepath, | |||||
| const char *library_id_name) ATTR_NONNULL(); | |||||
| void BKE_main_library_weak_reference_add_item(struct GHash *library_weak_reference_mapping, | |||||
| const char *library_filepath, | |||||
| const char *library_id_name, | |||||
| struct ID *new_id) ATTR_NONNULL(); | |||||
| void BKE_main_library_weak_reference_update_item(struct GHash *library_weak_reference_mapping, | |||||
| const char *library_filepath, | |||||
| const char *library_id_name, | |||||
| struct ID *old_id, | |||||
| struct ID *new_id) ATTR_NONNULL(); | |||||
| void BKE_main_library_weak_reference_remove_item(struct GHash *library_weak_reference_mapping, | |||||
| const char *library_filepath, | |||||
| const char *library_id_name, | |||||
| struct ID *old_id) ATTR_NONNULL(); | |||||
| /* *** Generic utils to loop over whole Main database. *** */ | /* *** Generic utils to loop over whole Main database. *** */ | ||||
| #define FOREACH_MAIN_LISTBASE_ID_BEGIN(_lb, _id) \ | #define FOREACH_MAIN_LISTBASE_ID_BEGIN(_lb, _id) \ | ||||
| { \ | { \ | ||||
| ID *_id_next = (_lb)->first; \ | ID *_id_next = (_lb)->first; \ | ||||
| for ((_id) = _id_next; (_id) != NULL; (_id) = _id_next) { \ | for ((_id) = _id_next; (_id) != NULL; (_id) = _id_next) { \ | ||||
| _id_next = (_id)->next; | _id_next = (_id)->next; | ||||
| ▲ Show 20 Lines • Show All 69 Lines • Show Last 20 Lines | |||||