[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [13719] trunk/blender/source/blender: sculptmode mtex texture pointers are now duplicated too, should resolve scene copy errors.

Campbell Barton ideasman42 at gmail.com
Sat Feb 16 20:13:40 CET 2008


Revision: 13719
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=13719
Author:   campbellbarton
Date:     2008-02-16 20:13:40 +0100 (Sat, 16 Feb 2008)

Log Message:
-----------
sculptmode mtex texture pointers are now duplicated too, should resolve scene copy errors.

Modified Paths:
--------------
    trunk/blender/source/blender/makesdna/DNA_scene_types.h
    trunk/blender/source/blender/src/edit.c
    trunk/blender/source/blender/src/header_info.c

Modified: trunk/blender/source/blender/makesdna/DNA_scene_types.h
===================================================================
--- trunk/blender/source/blender/makesdna/DNA_scene_types.h	2008-02-16 18:49:54 UTC (rev 13718)
+++ trunk/blender/source/blender/makesdna/DNA_scene_types.h	2008-02-16 19:13:40 UTC (rev 13719)
@@ -450,6 +450,8 @@
 struct SculptSession;
 typedef struct SculptData
 {
+	/* Note! all pointers in this struct must be duplicated header_info.c's copy_scene function */
+	
 	/* Data stored only from entering sculptmode until exiting sculptmode */
 	struct SculptSession *session;
 

Modified: trunk/blender/source/blender/src/edit.c
===================================================================
--- trunk/blender/source/blender/src/edit.c	2008-02-16 18:49:54 UTC (rev 13718)
+++ trunk/blender/source/blender/src/edit.c	2008-02-16 19:13:40 UTC (rev 13719)
@@ -1828,7 +1828,7 @@
 {
 	short event;
 
-	event = pupmenu("Snap %t|Selection -> Grid%x1|Selection -> Cursor%x2|Cursor-> Grid%x3|Cursor-> Selection%x4|Selection-> Center%x5|Cursor-> Active%x6");
+	event = pupmenu("Snap %t|Selection -> Grid%x1|Selection -> Cursor%x2|Cursor -> Grid%x3|Cursor -> Selection%x4|Selection -> Center%x5|Cursor -> Active%x6");
 
 	switch (event) {
 		case 1: /*Selection to grid*/

Modified: trunk/blender/source/blender/src/header_info.c
===================================================================
--- trunk/blender/source/blender/src/header_info.c	2008-02-16 18:49:54 UTC (rev 13718)
+++ trunk/blender/source/blender/src/header_info.c	2008-02-16 19:13:40 UTC (rev 13719)
@@ -337,7 +337,14 @@
 		/* sculpt data */
 		sce->sculptdata.session = NULL;
 		if (sce->sculptdata.cumap) {
+			int a;
 			scen->sculptdata.cumap = curvemapping_copy(sce->sculptdata.cumap);
+			scen->sculptdata.session = NULL; /* this is only for temp data storage anyway */
+			for(a=0; a<MAX_MTEX; ++a) {
+				if (sce->sculptdata.mtex[a]) {
+					scen->sculptdata.mtex[a]= MEM_dupallocN(sce->sculptdata.mtex[a]);
+				}
+			}
 		}
 	}
 	





More information about the Bf-blender-cvs mailing list