sculptmode mtex texture pointers are now duplicated too, should resolve scene copy errors.
This commit is contained in:
@@ -450,6 +450,8 @@ typedef struct BrushData
|
||||
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;
|
||||
|
||||
|
||||
@@ -1828,7 +1828,7 @@ void snapmenu()
|
||||
{
|
||||
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*/
|
||||
|
||||
@@ -337,7 +337,14 @@ Scene *copy_scene(Scene *sce, int level)
|
||||
/* 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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user