diff options
author | Bastien Montagne <bastien@blender.org> | 2021-10-22 13:33:03 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2021-10-22 13:35:40 +0300 |
commit | 65dbeb1d81bff6c5742eb5f503b59207485041a9 (patch) | |
tree | b00961f1d03f95d2f4ac8b67fc71132ab4f9ae64 /source/blender/blenkernel/intern/object.c | |
parent | d092933abbadb3a6d5ab53a0b2b3b865cd5c9079 (diff) |
Fix T90638: Inconsistent object data behavior when link-duplicating collections.
Camera, lattice and speaker object types were missing there own proper
`USER_DUP_` flags, leading to not properly handling duplication of their
object data.
NOTE: We could probably simply opions here, by using categories (like
'GEOMETRY', 'SHADING', etc.) instead of exact object types. But this is
beyond bugfix scope.
Diffstat (limited to 'source/blender/blenkernel/intern/object.c')
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 3ec7370a47f..e85c6b4c7c5 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -2760,12 +2760,12 @@ Object *BKE_object_duplicate(Main *bmain, } break; case OB_LATTICE: - if (dupflag != 0) { + if (dupflag & USER_DUP_LATTICE) { id_new = BKE_id_copy_for_duplicate(bmain, id_old, dupflag, copy_flags); } break; case OB_CAMERA: - if (dupflag != 0) { + if (dupflag & USER_DUP_CAMERA) { id_new = BKE_id_copy_for_duplicate(bmain, id_old, dupflag, copy_flags); } break; @@ -2775,7 +2775,7 @@ Object *BKE_object_duplicate(Main *bmain, } break; case OB_SPEAKER: - if (dupflag != 0) { + if (dupflag & USER_DUP_SPEAKER) { id_new = BKE_id_copy_for_duplicate(bmain, id_old, dupflag, copy_flags); } break; |