[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [12815] branches/pyapi_devel/source/ blender/blenkernel/intern/library.c: invalidating python objects when removing ID's was lost in merge

Campbell Barton ideasman42 at gmail.com
Fri Dec 7 11:37:07 CET 2007


Revision: 12815
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=12815
Author:   campbellbarton
Date:     2007-12-07 11:37:07 +0100 (Fri, 07 Dec 2007)

Log Message:
-----------
invalidating python objects when removing ID's was lost in merge

Modified Paths:
--------------
    branches/pyapi_devel/source/blender/blenkernel/intern/library.c

Modified: branches/pyapi_devel/source/blender/blenkernel/intern/library.c
===================================================================
--- branches/pyapi_devel/source/blender/blenkernel/intern/library.c	2007-12-07 10:23:00 UTC (rev 12814)
+++ branches/pyapi_devel/source/blender/blenkernel/intern/library.c	2007-12-07 10:37:07 UTC (rev 12815)
@@ -116,6 +116,9 @@
 
 #include "BPI_script.h"
 
+/* for maintaining the python id hash when removign data */
+#include "BPY_extern.h"
+
 #define MAX_IDPUP		60	/* was 24 */
 
 /* ************* general ************************ */
@@ -432,6 +435,9 @@
 {
 	ID *id= idv;
 	
+	/* invalidate the data if its in the python pool */
+	BPY_idhash_invalidate(id);
+	
 	switch( GS(id->name) ) {	/* GetShort from util.h */
 		case ID_SCE:
 			free_scene((Scene *)id);





More information about the Bf-blender-cvs mailing list