Commit: 6ea6c516708abb1f82de7716de7f2a63646e82ee Author: Dalai Felinto Date: Tue Jun 13 16:15:43 2017 +0200 Branches: blender2.8 https://developer.blender.org/rB6ea6c516708abb1f82de7716de7f2a63646e82ee
Better Fix for T51777: Separating objects by selected vertices This reverts commit 47b9d0d040300fcd56db20a8a898166d47520bcc. And implement a fix that doesn't require Depsgraph refresh. =================================================================== M source/blender/blenkernel/intern/collection.c M source/blender/editors/object/object_add.c =================================================================== diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c index f0ae3d8be1c..507ae1a4e70 100644 --- a/source/blender/blenkernel/intern/collection.c +++ b/source/blender/blenkernel/intern/collection.c @@ -34,6 +34,7 @@ #include "BLI_string_utils.h" #include "BKE_collection.h" +#include "BKE_idprop.h" #include "BKE_layer.h" #include "BKE_library.h" #include "BKE_main.h" @@ -254,6 +255,14 @@ void BKE_collection_object_add_from(Scene *scene, Object *ob_src, Object *ob_dst } } FOREACH_SCENE_COLLECTION_END + + for (SceneLayer *sl = scene->render_layers.first; sl; sl = sl->next) { + Base *base_src = BKE_scene_layer_base_find(sl, ob_src); + if (base_src != NULL) { + Base *base_dst = BKE_scene_layer_base_find(sl, ob_dst); + IDP_MergeGroup(base_dst->collection_properties, base_src->collection_properties, true); + } + } } /** diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 40ec1b56d17..2649a6d6d69 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -2064,9 +2064,6 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, SceneLayer obn = ID_NEW_SET(ob, BKE_object_copy(bmain, ob)); DEG_id_tag_update(&obn->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); - /* TODO(sergey): Use proper flag for tagging here. */ - DEG_id_tag_update(&scene->id, 0); - BKE_collection_object_add_from(scene, ob, obn); basen = BKE_scene_layer_base_find(sl, obn); _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs