From 924f31e54f59e13007b75f9388ef4bd089f847b2 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 18 May 2015 13:42:47 +1000 Subject: Fix T44543: painted texture lost after first save Fix for T36639 caused all path changes to reload (which could loose user content). Change behavior: - Only reload data when a flag is explicitly passed (currently only used by Find Files operator) - Don't reload images which have been painted onto and not saved (dirty flag set). --- source/blender/blenkernel/BKE_bpath.h | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'source/blender/blenkernel/BKE_bpath.h') diff --git a/source/blender/blenkernel/BKE_bpath.h b/source/blender/blenkernel/BKE_bpath.h index 990b414a4cf..10ee504f244 100644 --- a/source/blender/blenkernel/BKE_bpath.h +++ b/source/blender/blenkernel/BKE_bpath.h @@ -48,13 +48,21 @@ void *BKE_bpath_list_backup(struct Main *bmain, const int flag); void BKE_bpath_list_restore(struct Main *bmain, const int flag, void *ls_handle); void BKE_bpath_list_free(void *ls_handle); -#define BKE_BPATH_TRAVERSE_ABS (1 << 0) /* convert paths to absolute */ -#define BKE_BPATH_TRAVERSE_SKIP_LIBRARY (1 << 2) /* skip library paths */ -#define BKE_BPATH_TRAVERSE_SKIP_PACKED (1 << 3) /* skip packed data */ -#define BKE_BPATH_TRAVERSE_SKIP_MULTIFILE (1 << 4) /* skip paths where a single dir is used with an array of files, eg. - * sequence strip images and pointcache. in this case only use the first - * file, this is needed for directory manipulation functions which might - * otherwise modify the same directory multiple times */ +enum { + /* convert paths to absolute */ + BKE_BPATH_TRAVERSE_ABS = (1 << 0), + /* skip library paths */ + BKE_BPATH_TRAVERSE_SKIP_LIBRARY = (1 << 1), + /* skip packed data */ + BKE_BPATH_TRAVERSE_SKIP_PACKED = (1 << 2), + /* skip paths where a single dir is used with an array of files, eg. + * sequence strip images and pointcache. in this case only use the first + * file, this is needed for directory manipulation functions which might + * otherwise modify the same directory multiple times */ + BKE_BPATH_TRAVERSE_SKIP_MULTIFILE = (1 << 3), + /* reload data (when the path is edited) */ + BKE_BPATH_TRAVERSE_RELOAD_EDITED = (1 << 4), +}; /* high level funcs */ -- cgit v1.2.3