diff --git a/source/blender/blenkernel/BKE_lib_id.h b/source/blender/blenkernel/BKE_lib_id.h index 889988cc7d9..a393d4f4f98 100644 --- a/source/blender/blenkernel/BKE_lib_id.h +++ b/source/blender/blenkernel/BKE_lib_id.h @@ -32,6 +32,8 @@ #include "BLI_compiler_attrs.h" #include "BLI_utildefines.h" +#include "DNA_userdef_enums.h" + #ifdef __cplusplus extern "C" { #endif @@ -448,7 +450,7 @@ struct ID *BKE_id_copy(struct Main *bmain, const struct ID *id); */ struct ID *BKE_id_copy_for_duplicate(struct Main *bmain, struct ID *id, - uint duplicate_flags, + eDupli_ID_Flags duplicate_flags, int copy_flags); /** diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h index 92ea5bd4986..960b0419029 100644 --- a/source/blender/blenkernel/BKE_object.h +++ b/source/blender/blenkernel/BKE_object.h @@ -11,6 +11,7 @@ #include "BLI_sys_types.h" #include "DNA_object_enums.h" +#include "DNA_userdef_enums.h" #ifdef __cplusplus extern "C" { @@ -234,7 +235,7 @@ bool BKE_object_obdata_is_libdata(const struct Object *ob); */ struct Object *BKE_object_duplicate(struct Main *bmain, struct Object *ob, - uint dupflag, + eDupli_ID_Flags dupflag, uint duplicate_options); /** diff --git a/source/blender/blenkernel/intern/object.cc b/source/blender/blenkernel/intern/object.cc index c05722ceda9..11fbdd5add7 100644 --- a/source/blender/blenkernel/intern/object.cc +++ b/source/blender/blenkernel/intern/object.cc @@ -2718,7 +2718,10 @@ void BKE_object_transform_copy(Object *ob_tar, const Object *ob_src) copy_v3_v3(ob_tar->scale, ob_src->scale); } -Object *BKE_object_duplicate(Main *bmain, Object *ob, uint dupflag, uint duplicate_options) +Object *BKE_object_duplicate(Main *bmain, + Object *ob, + eDupli_ID_Flags dupflag, + uint duplicate_options) { const bool is_subprocess = (duplicate_options & LIB_ID_DUPLICATE_IS_SUBPROCESS) != 0; const bool is_root_id = (duplicate_options & LIB_ID_DUPLICATE_IS_ROOT_ID) != 0; diff --git a/source/blender/makesdna/DNA_userdef_enums.h b/source/blender/makesdna/DNA_userdef_enums.h index dc368819ab0..44fbdff38db 100644 --- a/source/blender/makesdna/DNA_userdef_enums.h +++ b/source/blender/makesdna/DNA_userdef_enums.h @@ -6,6 +6,8 @@ #pragma once +#include "BLI_utildefines.h" + #ifdef __cplusplus extern "C" { #endif @@ -50,6 +52,7 @@ typedef enum eDupli_ID_Flags { /* Duplicate (and hence make local) linked data. */ USER_DUP_LINKED_ID = (1 << 30), } eDupli_ID_Flags; +ENUM_OPERATORS(eDupli_ID_Flags, USER_DUP_LINKED_ID) #ifdef __cplusplus }