60 id->properties =
NULL;
65 id->override_library =
NULL;
79 if (idtype_info !=
NULL) {
110 if (use_flag_from_idtag) {
237 Link dummy_link = {0};
251 if (do_tagged_deletion) {
259 bool keep_looping =
true;
260 while (keep_looping) {
262 ID *last_remapped_id = tagged_deleted_ids.
last;
263 keep_looping =
false;
268 for (i = 0; i < base_count; i++) {
271 for (
id = lb->
first;
id;
id = id_next) {
285 if (last_remapped_id ==
NULL) {
286 dummy_link.
next = tagged_deleted_ids.
first;
287 last_remapped_id = (
ID *)(&dummy_link);
289 for (
id = last_remapped_id->
next;
id;
id =
id->
next) {
321 for (i = 0; i < base_count; i++) {
325 for (
id = lb->
first;
id;
id = id_next) {
353 size_t num_datablocks_deleted = 0;
354 for (i = do_tagged_deletion ? 1 : base_count; i--;) {
358 for (
id = do_tagged_deletion ? tagged_deleted_ids.
first : lb->
first;
id;
id = id_next) {
363 printf(
"%s: deleting %s (%d)\n", __func__,
id->
name,
id->
us);
368 ++num_datablocks_deleted;
374 return num_datablocks_deleted;
416 # ifdef WITH_PYTHON_SAFETY
void BKE_animdata_free(struct ID *id, const bool do_id_user)
void BKE_asset_metadata_free(struct AssetMetaData **asset_data)
void IDP_FreePropertyContent_ex(struct IDProperty *prop, const bool do_id_user)
const struct IDTypeInfo * BKE_idtype_get_info_from_id(const struct ID *id)
struct Key * BKE_key_from_id(struct ID *id)
void id_us_min(struct ID *id)
void BKE_main_id_tag_all(struct Main *mainvar, const int tag, const bool value)
@ LIB_ID_FREE_NOT_ALLOCATED
@ LIB_ID_FREE_NO_USER_REFCOUNT
void id_us_clear_real(struct ID *id)
void BKE_lib_override_library_free(struct IDOverrideLibrary **override, const bool do_id_user)
void void void BKE_libblock_unlink(struct Main *bmain, void *idv, const bool do_flag_never_null, const bool do_skip_indirect) ATTR_NONNULL()
void BKE_libblock_relink_ex(struct Main *bmain, void *idv, void *old_idv, void *new_idv, const short remap_flags) ATTR_NONNULL(1
@ ID_REMAP_FORCE_INTERNAL_RUNTIME_POINTERS
@ ID_REMAP_FLAG_NEVER_NULL_USAGE
@ ID_REMAP_FORCE_NEVER_NULL_USAGE
void BKE_libblock_remap_locked(struct Main *bmain, void *old_idv, void *new_idv, const short remap_flags) ATTR_NONNULL(1
int set_listbasepointers(struct Main *main, struct ListBase *lb[])
void BKE_main_unlock(struct Main *bmain)
void BKE_main_lock(struct Main *bmain)
struct ListBase * which_libbase(struct Main *bmain, short type)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_remlink(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BPY_DECREF_RNA_INVALIDATE(void *pyob_ptr)
void BPY_id_release(struct ID *id)
void DEG_id_type_tag(struct Main *bmain, short id_type)
ID and Library types, which are fundamental for sdna.
@ LIB_TAG_NO_USER_REFCOUNT
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
Read Guarded memory(de)allocation.
static size_t id_delete(Main *bmain, const bool do_tagged_deletion)
void BKE_libblock_free_datablock(ID *id, const int UNUSED(flag))
size_t BKE_id_multi_tagged_delete(Main *bmain)
void BKE_libblock_free_data_py(ID *id)
void BKE_id_free(Main *bmain, void *idv)
void BKE_libblock_free_data(ID *id, const bool do_id_user)
void BKE_id_free_ex(Main *bmain, void *idv, int flag, const bool use_flag_from_idtag)
void BKE_id_free_us(Main *bmain, void *idv)
void BKE_id_delete(Main *bmain, void *idv)
BKE_library_remap_editor_id_reference_cb remap_editor_id_reference_cb
BKE_library_free_notifier_reference_cb free_notifier_reference_cb
void(* MEM_freeN)(void *vmemh)
IDTypeFreeDataFunction free_data
struct AssetMetaData * asset_data
IDOverrideLibrary * override_library
char is_locked_for_linking
char is_memfile_undo_written