*** tuhopuu2/source/blender/src/usiblender.c	4 Jul 2004 06:20:19 -0000	1.17
--- tuhopuu2/source/blender/src/usiblender.c	19 Jul 2004 23:08:09 -0000
***************
*** 121,126 ****
--- 121,127 ----
  
  #include "PIL_time.h"
  
+ #include "BPY_extern.h"
  /***/
  
  void BIF_read_file(char *name)
***************
*** 369,374 ****
--- 370,380 ----
  	Library *li;
  	char di[FILE_MAXDIR];
  	char *err;
+ 	
+ 	/*Send the OnSave event*/
+ 	if (G.f & G_SCENESCRIPT) {
+ 		BPY_do_pyscript(&G.scene->id, SCRIPT_ONSAVE);
+ 	}
  	
  	if (BLI_streq(target, "")) return;
  	
