Blender Git Loki
Git Commits -> Revision 874cf52
Revision 874cf52 by Bastien Montagne (master) October 7, 2020, 09:09 (GMT) |
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. |
Commit Details:
Full Hash: 874cf52c10d73911cfec709d9b0202ac690aab6f
Parent Commit: 94f9182
Lines Changed: +67, -145
11 Modified Paths:
/source/blender/blenkernel/BKE_lib_id.h (+6, -0) (Diff)
/source/blender/blenkernel/BKE_light.h (+0, -1) (Diff)
/source/blender/blenkernel/BKE_material.h (+0, -1) (Diff)
/source/blender/blenkernel/BKE_texture.h (+0, -1) (Diff)
/source/blender/blenkernel/BKE_world.h (+0, -1) (Diff)
/source/blender/blenkernel/intern/lib_id.c (+6, -0) (Diff)
/source/blender/blenkernel/intern/light.c (+9, -28) (Diff)
/source/blender/blenkernel/intern/material.c (+13, -39) (Diff)
/source/blender/blenkernel/intern/texture.c (+9, -36) (Diff)
/source/blender/blenkernel/intern/world.c (+9, -32) (Diff)
/source/blender/editors/render/render_preview.c (+15, -6) (Diff)
/source/blender/blenkernel/BKE_light.h (+0, -1) (Diff)
/source/blender/blenkernel/BKE_material.h (+0, -1) (Diff)
/source/blender/blenkernel/BKE_texture.h (+0, -1) (Diff)
/source/blender/blenkernel/BKE_world.h (+0, -1) (Diff)
/source/blender/blenkernel/intern/lib_id.c (+6, -0) (Diff)
/source/blender/blenkernel/intern/light.c (+9, -28) (Diff)
/source/blender/blenkernel/intern/material.c (+13, -39) (Diff)
/source/blender/blenkernel/intern/texture.c (+9, -36) (Diff)
/source/blender/blenkernel/intern/world.c (+9, -32) (Diff)
/source/blender/editors/render/render_preview.c (+15, -6) (Diff)