[Bf-blender-cvs] [5426d7134db] blender2.8: Fix remaining issues with new Scene copying.

Bastien Montagne noreply at git.blender.org
Tue Aug 15 17:13:51 CEST 2017


Commit: 5426d7134db97ce96a3c977369894ba20effb643
Author: Bastien Montagne
Date:   Tue Aug 15 17:09:31 2017 +0200
Branches: blender2.8
https://developer.blender.org/rB5426d7134db97ce96a3c977369894ba20effb643

Fix remaining issues with new Scene copying.

Some idprops were not correctly merged from source into destination.

===================================================================

M	source/blender/blenkernel/intern/scene.c

===================================================================

diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index f1e27904d9b..6aca6e1be7f 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -262,7 +262,7 @@ void BKE_scene_copy_data(Main *bmain, Scene *sce_dst, const Scene *sce_src, cons
 		sl_dst->stats = NULL;
 		sl_dst->properties_evaluated = NULL;
 		sl_dst->properties = IDP_New(IDP_GROUP, &val, ROOT_PROP);
-		IDP_MergeGroup(sl_dst->properties, sl_src->properties, true);
+		IDP_MergeGroup_ex(sl_dst->properties, sl_src->properties, true, flag_subdata);
 
 		/* we start fresh with no overrides and no visibility flags set
 		 * instead of syncing both trees we simply unlink and relink the scene collection */
@@ -286,7 +286,13 @@ void BKE_scene_copy_data(Main *bmain, Scene *sce_dst, const Scene *sce_src, cons
 	}
 
 	sce_dst->collection_properties = IDP_New(IDP_GROUP, &val, ROOT_PROP);
+	if (sce_src->collection_properties) {
+		IDP_MergeGroup_ex(sce_dst->collection_properties, sce_src->collection_properties, true, flag_subdata);
+	}
 	sce_dst->layer_properties = IDP_New(IDP_GROUP, &val, ROOT_PROP);
+	if (sce_src->layer_properties) {
+		IDP_MergeGroup_ex(sce_dst->layer_properties, sce_src->layer_properties, true, flag_subdata);
+	}
 
 	BLI_duplicatelist(&(sce_dst->markers), &(sce_src->markers));
 	BLI_duplicatelist(&(sce_dst->r.layers), &(sce_src->r.layers));




More information about the Bf-blender-cvs mailing list