diff options
author | Bastien Montagne <bastien@blender.org> | 2020-10-06 18:43:12 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2020-10-07 12:09:36 +0300 |
commit | 874cf52c10d73911cfec709d9b0202ac690aab6f (patch) | |
tree | eb168090d49f83ac37bfd259a7b0e794e92b1937 /source/blender/blenkernel/BKE_texture.h | |
parent | 94f91827f8938153dad7d4b7f88fa8431f2f756c (diff) |
Refactor: Remove `BKE_XXX_localize()`, in favor of using regular ID copying code.
Besides the NodeTree case (which remains unchanged), the localize code
is only used in one place (to generate previews of shading data-blocks).
This commit introduces a new `LIB_ID_CREATE_LOCAL` option for ID
creation/copying, which essentially implements the behavior of the
removed `BKE_XXX_localize()` functions into regular mainstream ID copy
code. When this option is set:
- new ID is tagged with `LIB_TAG_LOCALIZED`;
- Some ID copying callbacks have specific behaviors, mainly the root
nodetree of shading IDs gets duplicated with specialized
`ntreeLocalize()` function.
Note that I would not consider getting rid of `ntreeLocalize` for now,
this function is recursive, which should ideally never happen within ID
management copying code (this introduces all kind of complications).
No behavioral change expected from this commit.
Diffstat (limited to 'source/blender/blenkernel/BKE_texture.h')
-rw-r--r-- | source/blender/blenkernel/BKE_texture.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_texture.h b/source/blender/blenkernel/BKE_texture.h index aae8ffc47b9..47ef0c4c63b 100644 --- a/source/blender/blenkernel/BKE_texture.h +++ b/source/blender/blenkernel/BKE_texture.h @@ -47,7 +47,6 @@ void BKE_texture_mtex_foreach_id(struct LibraryForeachIDData *data, struct MTex void BKE_texture_default(struct Tex *tex); struct Tex *BKE_texture_copy(struct Main *bmain, const struct Tex *tex); struct Tex *BKE_texture_add(struct Main *bmain, const char *name); -struct Tex *BKE_texture_localize(struct Tex *tex); void BKE_texture_type_set(struct Tex *tex, int type); void BKE_texture_mtex_default(struct MTex *mtex); |