Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenkernel/intern/scene.c')
-rw-r--r--source/blender/blenkernel/intern/scene.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 71271e77adf..1138f805538 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -76,6 +76,7 @@
#include "BKE_main.h"
#include "BKE_node.h"
#include "BKE_object.h"
+#include "BKE_paint.h"
#include "BKE_scene.h"
#include "BKE_sequence.h"
#include "BKE_world.h"
@@ -173,7 +174,7 @@ Scene *copy_scene(Main *bmain, Scene *sce, int type)
}
if(ts->sculpt) {
ts->sculpt= MEM_dupallocN(ts->sculpt);
- id_us_plus((ID *)ts->sculpt->brush);
+ copy_paint(&ts->sculpt->paint, &ts->sculpt->paint);
}
id_us_plus((ID *)ts->imapaint.brush);
@@ -275,8 +276,10 @@ void free_scene(Scene *sce)
MEM_freeN(sce->toolsettings->vpaint);
if(sce->toolsettings->wpaint)
MEM_freeN(sce->toolsettings->wpaint);
- if(sce->toolsettings->sculpt)
+ if(sce->toolsettings->sculpt) {
+ free_paint(&sce->toolsettings->sculpt->paint);
MEM_freeN(sce->toolsettings->sculpt);
+ }
MEM_freeN(sce->toolsettings);
sce->toolsettings = NULL;