[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43652] branches/soc-2008-mxcurioni/source /blender: Fix for invalid pointers within a copied line set.

Tamito Kajiyama rd6t-kjym at asahi-net.or.jp
Tue Jan 24 00:32:13 CET 2012


Revision: 43652
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43652
Author:   kjym3
Date:     2012-01-23 23:32:09 +0000 (Mon, 23 Jan 2012)
Log Message:
-----------
Fix for invalid pointers within a copied line set.

Now the line set buffer is cleared when a new .blend file is opened, so
that a line set may not be copied and pasted between two .blend files.

Modified Paths:
--------------
    branches/soc-2008-mxcurioni/source/blender/freestyle/FRS_freestyle.h
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
    branches/soc-2008-mxcurioni/source/blender/windowmanager/CMakeLists.txt
    branches/soc-2008-mxcurioni/source/blender/windowmanager/intern/wm_files.c

Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/FRS_freestyle.h
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/FRS_freestyle.h	2012-01-23 22:57:46 UTC (rev 43651)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/FRS_freestyle.h	2012-01-23 23:32:09 UTC (rev 43652)
@@ -52,6 +52,7 @@
 	// Rendering
 	void FRS_initialize(void);
 	void FRS_set_context(bContext* C);
+	void FRS_read_file(bContext* C);
 	int FRS_is_freestyle_enabled(struct SceneRenderLayer* srl);
 	void FRS_init_stroke_rendering(struct Render* re);
 	struct Render* FRS_do_stroke_rendering(struct Render* re, struct SceneRenderLayer* srl);

Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp	2012-01-23 22:57:46 UTC (rev 43651)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp	2012-01-23 23:32:09 UTC (rev 43652)
@@ -82,6 +82,10 @@
 		controller->setContext(C);
 	}
 
+	void FRS_read_file(bContext* C) {
+		lineset_copied = false;
+	}
+
 	void FRS_exit() {
 		delete pathconfig;
 		delete controller;

Modified: branches/soc-2008-mxcurioni/source/blender/windowmanager/CMakeLists.txt
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/windowmanager/CMakeLists.txt	2012-01-23 22:57:46 UTC (rev 43651)
+++ branches/soc-2008-mxcurioni/source/blender/windowmanager/CMakeLists.txt	2012-01-23 23:32:09 UTC (rev 43652)
@@ -31,6 +31,7 @@
 	../blenloader
 	../editors/include
 	../gpu
+	../freestyle
 	../imbuf
 	../makesdna
 	../makesrna

Modified: branches/soc-2008-mxcurioni/source/blender/windowmanager/intern/wm_files.c
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/windowmanager/intern/wm_files.c	2012-01-23 22:57:46 UTC (rev 43651)
+++ branches/soc-2008-mxcurioni/source/blender/windowmanager/intern/wm_files.c	2012-01-23 23:32:09 UTC (rev 43652)
@@ -111,6 +111,8 @@
 #include "BPY_extern.h"
 #endif
 
+#include "FRS_freestyle.h"
+
 #include "WM_api.h"
 #include "WM_types.h"
 #include "wm.h"
@@ -414,6 +416,7 @@
 		BPY_app_handlers_reset(FALSE);
 		BPY_modules_load_user(C);
 #endif
+		FRS_read_file(C);
 
 		/* important to do before NULL'ing the context */
 		BLI_exec_cb(CTX_data_main(C), NULL, BLI_CB_EVT_LOAD_POST);



More information about the Bf-blender-cvs mailing list