[Bf-blender-cvs] [af47ae07023] blender2.8: Fix group duplication bug

Dalai Felinto noreply at git.blender.org
Fri Dec 8 15:04:17 CET 2017


Commit: af47ae07023f4a5b817bedca82c7b007ddefc8ba
Author: Dalai Felinto
Date:   Fri Dec 8 12:00:46 2017 -0200
Branches: blender2.8
https://developer.blender.org/rBaf47ae07023f4a5b817bedca82c7b007ddefc8ba

Fix group duplication bug

View Layer was not duplicated between destination and source.

This would lead to a crash if you duplicated the group and assigned
the new group to any object.

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

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

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

diff --git a/source/blender/blenkernel/intern/group.c b/source/blender/blenkernel/intern/group.c
index a68111de034..1bc2e951fe7 100644
--- a/source/blender/blenkernel/intern/group.c
+++ b/source/blender/blenkernel/intern/group.c
@@ -136,6 +136,7 @@ void BKE_group_copy_data(Main *UNUSED(bmain), Group *group_dst, const Group *gro
 	BKE_collection_copy_data(master_collection_dst, master_collection_src,
 	                         flag_subdata);
 
+	group_dst->view_layer = MEM_dupallocN(group_src->view_layer);
 	BKE_view_layer_copy_data(group_dst->view_layer, group_src->view_layer,
 	                          master_collection_dst, master_collection_src,
 	                          flag_subdata);



More information about the Bf-blender-cvs mailing list