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.
This commit is contained in:
Dalai Felinto 2017-12-08 12:00:46 -02:00
parent 0d4ab09da7
commit af47ae0702
1 changed files with 1 additions and 0 deletions

View File

@ -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);