diff options
author | Bastien Montagne <bastien@blender.org> | 2021-08-24 13:23:39 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2021-08-24 13:23:39 +0300 |
commit | 46913bf0a08c7e9ae5525ff95af0c7dc3b2f622f (patch) | |
tree | cb7ba247bd1746e92a749fd66d35ee6475b7ea4a /source/blender/blenkernel/BKE_lib_id.h | |
parent | 4e4ac5a867add13035958479fb1e5bae419b7785 (diff) |
Fix T90840: Can't duplicate or copy (Ctrl-C) object from linked file.
We need to separate the flag telling duplicate code to not handle
remapping to new IDs etc., from the one telling the code that we are
currently duplicating a 'root' ID (i.e. not a dependency of another
duplicated ID).
This whole duplicate code/logic is still fairly unsatisfying, think it
will need further refactor, or maybe even re-design, at some point...
Diffstat (limited to 'source/blender/blenkernel/BKE_lib_id.h')
-rw-r--r-- | source/blender/blenkernel/BKE_lib_id.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_lib_id.h b/source/blender/blenkernel/BKE_lib_id.h index bb875f8d1c9..a50faedcc3c 100644 --- a/source/blender/blenkernel/BKE_lib_id.h +++ b/source/blender/blenkernel/BKE_lib_id.h @@ -166,8 +166,14 @@ struct ID *BKE_libblock_find_name(struct Main *bmain, */ typedef enum eLibIDDuplicateFlags { /** This call to a duplicate function is part of another call for some parent ID. - * Therefore, this sub-process should not clear `newid` pointers, nor handle remapping itself. */ + * Therefore, this sub-process should not clear `newid` pointers, nor handle remapping itself. + * NOTE: In some cases (like Object one), the duplicate function may be called on the root ID + * with this flag set, as remapping and/or other similar tasks need to be handled by the caller. + */ LIB_ID_DUPLICATE_IS_SUBPROCESS = 1 << 0, + /** This call is performed on a 'root' ID, and should therefore perform some decisions regarding + * sub-IDs (dependencies), check for linked vs. locale data, etc. */ + LIB_ID_DUPLICATE_IS_ROOT_ID = 1 << 1, } eLibIDDuplicateFlags; /* lib_remap.c (keep here since they're general functions) */ |