Blender Git Loki

Git Commits -> Revision e5e8db7

Revision e5e8db7 by Bastien Montagne (master)
November 29, 2021, 13:22 (GMT)
Refactor BKE_bpath module.

The main goal of this refactor is to make BPath module use `IDTypeInfo`,
and move each ID-specific part of the `foreach_path` looper into their
own IDTypeInfo struct, using a new `foreach_path` callback.

Additionally, following improvements/cleanups are included:
* Attempt to get better, more consistent namings.
** In particular, move from `path_visitor` to more standard `foreach_path`.
* Update and extend documentation.
** API doc was moved to header, according to recent discussions on this
topic.
* Remove `BKE_bpath_relocate_visitor` from API, this is specific
callback that belongs in `lib_id.c` user code.

NOTE: This commit is expected to be 100% non-behavioral-change. This
implies that several potential further changes were only noted as
comments (like using a more generic solution for
`lib_id_library_local_paths`, addressing inconsistencies like path of
packed libraries always being skipped, regardless of the
`BKE_BPATH_FOREACH_PATH_SKIP_PACKED` `eBPathForeachFlag` flag value,
etc.).

NOTE: basic unittests were added to master already in
rBdcc500e5a265093bc9cc.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D13381

Commit Details:

Full Hash: e5e8db73df86ee04260c5f2bd2c61dfa8eb7943f
Parent Commit: 6ae34bb
Lines Changed: +883, -658

49 Modified Paths:

/source/blender/blenkernel/BKE_bpath.h (+159, -46) (Diff)
/source/blender/blenkernel/BKE_idtype.h (+8, -0) (Diff)
/source/blender/blenkernel/intern/action.c (+1, -0) (Diff)
/source/blender/blenkernel/intern/armature.c (+1, -0) (Diff)
/source/blender/blenkernel/intern/blendfile.c (+11, -7) (Diff)
/source/blender/blenkernel/intern/bpath.c (+332, -581) (Diff)
/source/blender/blenkernel/intern/bpath_test.cc (+2, -2) (Diff)
/source/blender/blenkernel/intern/brush.c (+10, -0) (Diff)
/source/blender/blenkernel/intern/cachefile.c (+8, -0) (Diff)
/source/blender/blenkernel/intern/camera.c (+1, -0) (Diff)
/source/blender/blenkernel/intern/collection.c (+1, -0) (Diff)
/source/blender/blenkernel/intern/curve.c (+1, -0) (Diff)
/source/blender/blenkernel/intern/gpencil.c (+1, -0) (Diff)
/source/blender/blenkernel/intern/hair.c (+1, -0) (Diff)
/source/blender/blenkernel/intern/image.c (+30, -0) (Diff)
/source/blender/blenkernel/intern/ipo.c (+1, -0) (Diff)
/source/blender/blenkernel/intern/key.c (+1, -0) (Diff)
/source/blender/blenkernel/intern/lattice.c (+1, -0) (Diff)
/source/blender/blenkernel/intern/library.c (+18, -0) (Diff)
/source/blender/blenkernel/intern/lib_id.c (+45, -5) (Diff)
/source/blender/blenkernel/intern/light.c (+1, -0) (Diff)
/source/blender/blenkernel/intern/lightprobe.c (+1, -0) (Diff)
/source/blender/blenkernel/intern/linestyle.c (+1, -0) (Diff)
/source/blender/blenkernel/intern/mask.c (+1, -0) (Diff)
/source/blender/blenkernel/intern/material.c (+1, -0) (Diff)
/source/blender/blenkernel/intern/mball.c (+1, -0) (Diff)
/source/blender/blenkernel/intern/mesh.cc (+10, -0) (Diff)
/source/blender/blenkernel/intern/movieclip.c (+8, -0) (Diff)
/source/blender/blenkernel/intern/node.cc (+25, -0) (Diff)
/source/blender/blenkernel/intern/object.cc (+62, -0) (Diff)
/source/blender/blenkernel/intern/paint.c (+2, -0) (Diff)
/source/blender/blenkernel/intern/particle.c (+1, -0) (Diff)
/source/blender/blenkernel/intern/pointcloud.cc (+1, -0) (Diff)
/source/blender/blenkernel/intern/scene.c (+41, -0) (Diff)
/source/blender/blenkernel/intern/screen.c (+1, -0) (Diff)
/source/blender/blenkernel/intern/simulation.cc (+1, -0) (Diff)
/source/blender/blenkernel/intern/sound.c (+13, -0) (Diff)
/source/blender/blenkernel/intern/speaker.c (+1, -0) (Diff)
/source/blender/blenkernel/intern/text.c (+11, -0) (Diff)
/source/blender/blenkernel/intern/texture.c (+1, -0) (Diff)
/source/blender/blenkernel/intern/vfont.c (+17, -0) (Diff)
/source/blender/blenkernel/intern/volume.cc (+13, -0) (Diff)
/source/blender/blenkernel/intern/workspace.c (+1, -0) (Diff)
/source/blender/blenkernel/intern/world.c (+1, -0) (Diff)
/source/blender/blenloader/intern/writefile.c (+2, -1) (Diff)
/source/blender/editors/asset/intern/asset_ops.cc (+16, -8) (Diff)
/source/blender/makesdna/DNA_scene_types.h (+1, -0) (Diff)
/source/blender/python/intern/bpy.c (+14, -8) (Diff)
/source/blender/windowmanager/intern/wm.c (+1, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021