[Bf-blender-cvs] [4287265] master: Cleanup: remove RNA's `ID.destroy()` function.

Bastien Montagne noreply at git.blender.org
Sat Jun 25 18:36:50 CEST 2016


Commit: 42872656d85ffe95dfe2481264d01263bbb71942
Author: Bastien Montagne
Date:   Sat Jun 25 17:09:26 2016 +0200
Branches: master
https://developer.blender.org/rB42872656d85ffe95dfe2481264d01263bbb71942

Cleanup: remove RNA's `ID.destroy()` function.

We already have Main's ID lists' `remove()` function, better not do the same thing
in two different places!

===================================================================

M	source/blender/makesrna/intern/rna_ID.c

===================================================================

diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index 92f4d1a..dc6d308 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -336,11 +336,6 @@ static void rna_ID_user_clear(ID *id)
 	id->us = 0; /* don't save */
 }
 
-static void rna_ID_delete(ID *id, Main *bmain)
-{
-	BKE_libblock_delete(bmain, id);
-}
-
 static void rna_ID_user_remap(ID *id, Main *bmain, ID *new_id)
 {
 	if (GS(id->name) == GS(new_id->name)) {
@@ -989,10 +984,6 @@ static void rna_def_ID(BlenderRNA *brna)
 	parm = RNA_def_pointer(func, "id", "ID", "", "New copy of the ID");
 	RNA_def_function_return(func, parm);
 
-	func = RNA_def_function(srna, "destroy", "rna_ID_delete");
-	RNA_def_function_flag(func, FUNC_USE_MAIN);
-	RNA_def_function_ui_description(func, "Delete this ID from Blender (WARNING: no undo, do not use it after calling this!)");
-
 	func = RNA_def_function(srna, "user_clear", "rna_ID_user_clear");
 	RNA_def_function_ui_description(func, "Clear the user count of a data-block so its not saved, "
 	                                "on reload the data will be removed");




More information about the Bf-blender-cvs mailing list