diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/BKE_library.h | 11 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/blendfile.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/collection.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/library_remap.c | 2 | ||||
-rw-r--r-- | source/blender/collada/BCAnimationSampler.h | 2 | ||||
-rw-r--r-- | source/blender/editors/object/object_add.c | 2 | ||||
-rw-r--r-- | source/blender/editors/object/object_collection.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_outliner/outliner_edit.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_text/text_ops.c | 2 | ||||
-rw-r--r-- | source/blender/freestyle/intern/system/PythonInterpreter.h | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_main_api.c | 2 |
11 files changed, 15 insertions, 16 deletions
diff --git a/source/blender/blenkernel/BKE_library.h b/source/blender/blenkernel/BKE_library.h index 4d96c271785..d03834d2995 100644 --- a/source/blender/blenkernel/BKE_library.h +++ b/source/blender/blenkernel/BKE_library.h @@ -140,23 +140,22 @@ enum { LIB_ID_FREE_NO_UI_USER = 1 << 9, /* Do not attempt to remove freed ID from UI data/notifiers/... */ }; +void BKE_libblock_free_datablock(struct ID *id, const int flag) ATTR_NONNULL(); +void BKE_libblock_free_data(struct ID *id, const bool do_id_user) ATTR_NONNULL(); + void BKE_id_free_ex(struct Main *bmain, void *idv, int flag, const bool use_flag_from_idtag); void BKE_id_free(struct Main *bmain, void *idv); void BKE_id_free_us(struct Main *bmain, void *idv) ATTR_NONNULL(); +void BKE_id_delete(struct Main *bmain, void *idv) ATTR_NONNULL(); + void BKE_libblock_management_main_add(struct Main *bmain, void *idv); void BKE_libblock_management_main_remove(struct Main *bmain, void *idv); void BKE_libblock_management_usercounts_set(struct Main *bmain, void *idv); void BKE_libblock_management_usercounts_clear(struct Main *bmain, void *idv); -/* TODO should be named "BKE_id_delete()". */ -void BKE_libblock_delete(struct Main *bmain, void *idv) ATTR_NONNULL(); - -void BKE_libblock_free_datablock(struct ID *id, const int flag) ATTR_NONNULL(); -void BKE_libblock_free_data(struct ID *id, const bool do_id_user) ATTR_NONNULL(); - void BKE_id_lib_local_paths(struct Main *bmain, struct Library *lib, struct ID *id); void id_lib_extern(struct ID *id); void BKE_library_filepath_set(struct Main *bmain, struct Library *lib, const char *filepath); diff --git a/source/blender/blenkernel/intern/blendfile.c b/source/blender/blenkernel/intern/blendfile.c index d75274d4daa..a8809de0431 100644 --- a/source/blender/blenkernel/intern/blendfile.c +++ b/source/blender/blenkernel/intern/blendfile.c @@ -476,7 +476,7 @@ void BKE_blendfile_read_make_empty(bContext *C) continue; } while ((id = lbarray[a]->first)) { - BKE_libblock_delete(bmain, id); + BKE_id_delete(bmain, id); } } } diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c index e8e3b9229b6..5f4d57d9c5c 100644 --- a/source/blender/blenkernel/intern/collection.c +++ b/source/blender/blenkernel/intern/collection.c @@ -173,7 +173,7 @@ bool BKE_collection_delete(Main *bmain, Collection *collection, bool hierarchy) } } - BKE_libblock_delete(bmain, collection); + BKE_id_delete(bmain, collection); BKE_main_collection_sync(bmain); diff --git a/source/blender/blenkernel/intern/library_remap.c b/source/blender/blenkernel/intern/library_remap.c index cc7967a9bdd..39d7b690447 100644 --- a/source/blender/blenkernel/intern/library_remap.c +++ b/source/blender/blenkernel/intern/library_remap.c @@ -946,7 +946,7 @@ void BKE_id_free_us(Main *bmain, void *idv) /* test users */ } } -void BKE_libblock_delete(Main *bmain, void *idv) +void BKE_id_delete(Main *bmain, void *idv) { ListBase *lbarray[MAX_LIBARRAY]; int base_count, i; diff --git a/source/blender/collada/BCAnimationSampler.h b/source/blender/collada/BCAnimationSampler.h index ae0a04a706c..0233f073fc5 100644 --- a/source/blender/collada/BCAnimationSampler.h +++ b/source/blender/collada/BCAnimationSampler.h @@ -65,7 +65,7 @@ public: if (reference && reference->id.us == 0) { Main *bmain = CTX_data_main(mContext); - BKE_libblock_delete(bmain, &reference->id); + BKE_id_delete(bmain, &reference->id); } curve_map.clear(); } diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index f58fc013ea2..7a2b1d8ada2 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -1361,7 +1361,7 @@ static int object_delete_exec(bContext *C, wmOperator *op) */ if (use_global && ob->id.lib == NULL) { /* We want to nuke the object, let's nuke it the easy way (not for linked data though)... */ - BKE_libblock_delete(bmain, &ob->id); + BKE_id_delete(bmain, &ob->id); changed_count += 1; continue; } diff --git a/source/blender/editors/object/object_collection.c b/source/blender/editors/object/object_collection.c index 5e1773bf3c2..1a9b69b38ad 100644 --- a/source/blender/editors/object/object_collection.c +++ b/source/blender/editors/object/object_collection.c @@ -538,7 +538,7 @@ static int collection_unlink_exec(bContext *C, wmOperator *UNUSED(op)) if (!collection) return OPERATOR_CANCELLED; - BKE_libblock_delete(bmain, collection); + BKE_id_delete(bmain, collection); DEG_relations_tag_update(bmain); diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c index b5059cf6bb3..7926081c38d 100644 --- a/source/blender/editors/space_outliner/outliner_edit.c +++ b/source/blender/editors/space_outliner/outliner_edit.c @@ -379,7 +379,7 @@ static void id_delete(bContext *C, ReportList *reports, TreeElement *te, TreeSto } - BKE_libblock_delete(bmain, id); + BKE_id_delete(bmain, id); WM_event_add_notifier(C, NC_WINDOW, NULL); } diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index d1dd2f4affd..fe6c43cb74a 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -387,7 +387,7 @@ static int text_unlink_exec(bContext *C, wmOperator *UNUSED(op)) } } - BKE_libblock_delete(bmain, text); + BKE_id_delete(bmain, text); text_drawcache_tag_update(st, 1); WM_event_add_notifier(C, NC_TEXT | NA_REMOVED, NULL); diff --git a/source/blender/freestyle/intern/system/PythonInterpreter.h b/source/blender/freestyle/intern/system/PythonInterpreter.h index cb49e7718a0..2d93b518bc6 100644 --- a/source/blender/freestyle/intern/system/PythonInterpreter.h +++ b/source/blender/freestyle/intern/system/PythonInterpreter.h @@ -84,7 +84,7 @@ public: Text *text = BKE_text_load(&_freestyle_bmain, fn, G_MAIN->name); if (text) { ok = BPY_execute_text(_context, text, reports, false); - BKE_libblock_delete(&_freestyle_bmain, text); + BKE_id_delete(&_freestyle_bmain, text); } else { BKE_reportf(reports, RPT_ERROR, "Cannot open file: %s", fn); diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c index 3d8768bc7e1..af2f007307b 100644 --- a/source/blender/makesrna/intern/rna_main_api.c +++ b/source/blender/makesrna/intern/rna_main_api.c @@ -133,7 +133,7 @@ static void rna_Main_ID_remove( { ID *id = id_ptr->data; if (do_unlink) { - BKE_libblock_delete(bmain, id); + BKE_id_delete(bmain, id); RNA_POINTER_INVALIDATE(id_ptr); } else if (ID_REAL_USERS(id) <= 0) { |