Fix T62614: Copy eevee settings when scene is copied
authorJacques Lucke <mail@jlucke.com>
Fri, 15 Mar 2019 15:06:30 +0000 (16:06 +0100)
committerJacques Lucke <mail@jlucke.com>
Fri, 15 Mar 2019 15:06:30 +0000 (16:06 +0100)
Reviewers: brecht, fclem

Differential Revision: https://developer.blender.org/D4520

source/blender/blenkernel/intern/scene.c

index 83df851f0d1630f49485d654f8e4508a694663db..9c174c8025fb8cbf9a2423de99f671ed1eaeeaa3 100644 (file)
@@ -318,6 +318,7 @@ void BKE_scene_copy_data(Main *bmain, Scene *sce_dst, const Scene *sce_src, cons
        }
 
        sce_dst->eevee.light_cache = NULL;
+       sce_dst->eevee.light_cache_info[0] = '\0';
        /* TODO Copy the cache. */
 }
 
@@ -339,6 +340,9 @@ Scene *BKE_scene_copy(Main *bmain, Scene *sce, int type)
                sce_copy->unit = sce->unit;
                sce_copy->physics_settings = sce->physics_settings;
                sce_copy->audio = sce->audio;
+               sce_copy->eevee = sce->eevee;
+               sce_copy->eevee.light_cache = NULL;
+               sce_copy->eevee.light_cache_info[0] = '\0';
 
                if (sce->id.properties)
                        sce_copy->id.properties = IDP_CopyProperty(sce->id.properties);