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:
authorDalai Felinto <dfelinto@gmail.com>2016-12-05 22:50:01 +0300
committerDalai Felinto <dfelinto@gmail.com>2016-12-05 23:52:38 +0300
commit3acb83c6f4434f908f05054241ab181845d6673a (patch)
tree8d1246de4d1769b466d23156083b7928a0c0201d /source/blender/blenkernel/intern/scene.c
parentd0ef44218ea076a4b247d7334fa1b17cf7761fe8 (diff)
Use pointer for master collection
This allows this pointer to be used, otherwise the pointer is not written
Diffstat (limited to 'source/blender/blenkernel/intern/scene.c')
-rw-r--r--source/blender/blenkernel/intern/scene.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 125d6962332..ed0e543ee48 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -462,6 +462,10 @@ void BKE_scene_free(Scene *sce)
BKE_previewimg_free(&sce->preview);
curvemapping_free_data(&sce->r.mblur_shutter_curve);
+
+ /* Master Collection */
+ MEM_freeN(sce->collection);
+ sce->collection = NULL;
}
void BKE_scene_init(Scene *sce)
@@ -792,6 +796,10 @@ void BKE_scene_init(Scene *sce)
sce->toolsettings->gpencil_v2d_align = GP_PROJECT_VIEWSPACE;
sce->toolsettings->gpencil_seq_align = GP_PROJECT_VIEWSPACE;
sce->toolsettings->gpencil_ima_align = GP_PROJECT_VIEWSPACE;
+
+ /* Master Collection */
+ sce->collection = MEM_callocN(sizeof(SceneCollection), "Master Collection");
+ BLI_strncpy(sce->collection->name, "Master Collection", sizeof(sce->collection->name));
}
Scene *BKE_scene_add(Main *bmain, const char *name)