Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2019-03-29 16:54:50 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2019-03-29 16:57:32 +0300
commitd66ed7d5408c93eff4ed3fc2bd6fd172b0f76889 (patch)
tree00af91c273fc27b30c7847aa8eaaa8146d91c527 /source/blender/blenkernel/intern/object.c
parentd9829efb0a8bdc7ca6e81cf6cde71bf4aa79770f (diff)
Fix T63042: Grease pencil and armature will sometimes copy successfully because of the put in Collection order, sometimes fail.
Remove remapping to new IDs from `BKE_object_duplicate()` itself, doing it here will break later remapping done after all desired objects have been duplicated, preventing complete remap of ID pointers used in obdata and other sub-data of duplicated objects. Checked, the only two usages of this function were already doing separated later step for this anyway.
Diffstat (limited to 'source/blender/blenkernel/intern/object.c')
-rw-r--r--source/blender/blenkernel/intern/object.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 0a08f5f8270..9985c8026e7 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -1431,6 +1431,7 @@ Object *BKE_object_copy(Main *bmain, const Object *ob)
*
* \param dupflag Controls which sub-data are also duplicated (see \a eDupli_ID_Flags in \a DNA_userdef_types.h).
*
+ * \note This function does not do any remapping to new IDs, caller must do it (\a BKE_libblock_relink_to_newid()).
* \note Caller MUST free \a newid pointers itself (\a BKE_main_id_clear_newpoins()) and call updates of DEG too
* (\a DAG_relations_tag_update()).
*/
@@ -1657,8 +1658,6 @@ Object *BKE_object_duplicate(Main *bmain, const Object *ob, const int dupflag)
#undef ID_NEW_REMAP_US
#undef ID_NEW_REMAP_US2
- BKE_libblock_relink_to_newid(&obn->id);
-
if (ob->data != NULL) {
DEG_id_tag_update_ex(bmain, (ID *)obn->data, ID_RECALC_EDITORS);
}