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:
authorBastien Montagne <montagne29@wanadoo.fr>2017-07-10 22:12:42 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2017-07-10 22:12:42 +0300
commit665288ccd7afd37de9c1c21babc701f4b0fca7e3 (patch)
treee256b4c65f5e98d99ae078520b8b7c05a2a4cf3c /source/blender/blenkernel/intern/scene.c
parent46b9124241c27083eb2141f793c7c04b3e85452c (diff)
Fix (unreported) Scene's copying toolsettings' clone and canvas, and particles' scene and object pointers.
imapaint's clone and canvas are refcounting Image usages. And particle's editsettings' object and scene seem to be pure runtime data (they are reset to NULL in readcode), so resetting them to NULL here as well.
Diffstat (limited to 'source/blender/blenkernel/intern/scene.c')
-rw-r--r--source/blender/blenkernel/intern/scene.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 13623dcb597..4c8b07574af 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -292,7 +292,11 @@ Scene *BKE_scene_copy(Main *bmain, Scene *sce, int type)
BKE_paint_copy(&ts->imapaint.paint, &ts->imapaint.paint);
ts->imapaint.paintcursor = NULL;
id_us_plus((ID *)ts->imapaint.stencil);
+ id_us_plus((ID *)ts->imapaint.clone);
+ id_us_plus((ID *)ts->imapaint.canvas);
ts->particle.paintcursor = NULL;
+ ts->particle.scene = NULL;
+ ts->particle.object = NULL;
/* duplicate Grease Pencil Drawing Brushes */
BLI_listbase_clear(&ts->gp_brushes);