From 3ada1949f8633293b4a424bf20789d94cf924c43 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 18 Jun 2020 15:25:22 +1000 Subject: Python API: path mapping options for library writing function When "Relative Remap" option was added, the intention was only to remap paths that were already relative. However it remapped all paths. This was reported as T62612 and fixed recently, however some Python script authors depended on the old behavior. For users, it's reasonable to use the existing operators to make paths absolute/relative. For scripts however it's useful to be able to write out individual data-blocks with the ability to make all paths relative. Now `bpy.data.libraries.write()` takes a path_remap argument which can be `NONE/RELATIVE/RELATIVE_ALL/ABSOLUTE` allowing the script author to choose how paths are handled when writing out data-blocks. Addresses T77768. --- source/blender/blenkernel/BKE_blendfile.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/blenkernel/BKE_blendfile.h') diff --git a/source/blender/blenkernel/BKE_blendfile.h b/source/blender/blenkernel/BKE_blendfile.h index 2bff684948d..e835137bfa1 100644 --- a/source/blender/blenkernel/BKE_blendfile.h +++ b/source/blender/blenkernel/BKE_blendfile.h @@ -74,6 +74,7 @@ void BKE_blendfile_write_partial_begin(struct Main *bmain_src); bool BKE_blendfile_write_partial(struct Main *bmain_src, const char *filepath, const int write_flags, + const int remap_mode, struct ReportList *reports); void BKE_blendfile_write_partial_end(struct Main *bmain_src); -- cgit v1.2.3