Fix localview duplicated objects not in localview

Following the behaviour present in Blender 2.7x, where if you duplicate
an object it will show in all the local views the original object was
visible.
This commit is contained in:
Dalai Felinto 2018-11-27 14:52:01 -02:00
parent 365a5b75c1
commit 9c546c70d7
1 changed files with 1 additions and 0 deletions

View File

@ -2188,6 +2188,7 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, ViewLayer
BKE_collection_object_add(bmain, layer_collection->collection, obn);
}
basen = BKE_view_layer_base_find(view_layer, obn);
basen->local_view_bits = base->local_view_bits;
/* 1) duplis should end up in same collection as the original
* 2) Rigid Body sim participants MUST always be part of a collection...