Cleanup: IDManagement: Localize: tweak to flags.
Add a specific flag for nodetree deep-copy special localization code. And add a new `LIB_ID_CREATE_LOCALIZE` flag, similar to `LIB_ID_COPY_LOCALIZE`, for creation purposes. No behavioral changes expected here.
This commit is contained in:
parent
449e6124b5
commit
94f91827f8
|
@ -120,13 +120,18 @@ enum {
|
|||
LIB_ID_COPY_KEEP_LIB = 1 << 25,
|
||||
/** EXCEPTION! Deep-copy shapekeys used by copied obdata ID. */
|
||||
LIB_ID_COPY_SHAPEKEY = 1 << 26,
|
||||
/** EXCEPTION! Specific deep-copy of node trees used e.g. for rendering purposes. */
|
||||
LIB_ID_COPY_NODETREE_LOCALIZE = 1 << 27,
|
||||
|
||||
/* *** Helper 'defines' gathering most common flag sets. *** */
|
||||
/** Shapekeys are not real ID's, more like local data to geometry IDs... */
|
||||
LIB_ID_COPY_DEFAULT = LIB_ID_COPY_SHAPEKEY,
|
||||
|
||||
/** Create a local, outside of bmain, data-block to work on. */
|
||||
LIB_ID_CREATE_LOCALIZE = LIB_ID_CREATE_NO_MAIN | LIB_ID_CREATE_NO_USER_REFCOUNT |
|
||||
LIB_ID_CREATE_NO_DEG_TAG,
|
||||
/** Generate a local copy, outside of bmain, to work on (used by COW e.g.). */
|
||||
LIB_ID_COPY_LOCALIZE = LIB_ID_CREATE_NO_MAIN | LIB_ID_CREATE_NO_USER_REFCOUNT |
|
||||
LIB_ID_CREATE_NO_DEG_TAG | LIB_ID_COPY_NO_PREVIEW | LIB_ID_COPY_CACHES,
|
||||
LIB_ID_COPY_LOCALIZE = LIB_ID_CREATE_LOCALIZE | LIB_ID_COPY_NO_PREVIEW | LIB_ID_COPY_CACHES,
|
||||
};
|
||||
|
||||
void BKE_libblock_copy_ex(struct Main *bmain,
|
||||
|
|
|
@ -892,7 +892,7 @@ Mesh *BKE_mesh_new_nomain(
|
|||
int verts_len, int edges_len, int tessface_len, int loops_len, int polys_len)
|
||||
{
|
||||
Mesh *mesh = BKE_libblock_alloc(
|
||||
NULL, ID_ME, BKE_idtype_idcode_to_name(ID_ME), LIB_ID_COPY_LOCALIZE);
|
||||
NULL, ID_ME, BKE_idtype_idcode_to_name(ID_ME), LIB_ID_CREATE_LOCALIZE);
|
||||
BKE_libblock_init_empty(&mesh->id);
|
||||
|
||||
/* don't use CustomData_reset(...); because we dont want to touch customdata */
|
||||
|
|
Loading…
Reference in New Issue