Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2018-06-05 18:02:50 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-06-05 18:02:50 +0300
commitf0d9dbae0dae4deae84824833096c38e625073cb (patch)
treea9fa826eb5860e9b62d16c3498703bde1bb5d4aa /source/blender/blenkernel/intern/image.c
parentce6db959c7d96792edad3a6d606e3662a4ef0798 (diff)
parent481cdb08ed6f33a09d0e6843d1024db93c301178 (diff)
Merge branch 'master' into blender2.8
Conflicts: source/blender/blenkernel/intern/blendfile.c source/blender/blenloader/intern/readfile.h source/blender/blenloader/intern/versioning_250.c source/blender/blenloader/intern/versioning_260.c source/blender/blenloader/intern/versioning_270.c source/blender/blenloader/intern/versioning_legacy.c source/blender/editors/render/render_shading.c source/blender/makesrna/intern/rna_movieclip.c source/blender/render/intern/source/pipeline.c source/blender/render/intern/source/voxeldata.c
Diffstat (limited to 'source/blender/blenkernel/intern/image.c')
-rw-r--r--source/blender/blenkernel/intern/image.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index e5c192b3e1e..9a29a8a898b 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -592,7 +592,7 @@ Image *BKE_image_load(Main *bmain, const char *filepath)
char str[FILE_MAX];
STRNCPY(str, filepath);
- BLI_path_abs(str, bmain->name);
+ BLI_path_abs(str, BKE_main_blendfile_path(bmain));
/* exists? */
file = BLI_open(str, O_BINARY | O_RDONLY, 0);
@@ -621,7 +621,7 @@ Image *BKE_image_load_exists_ex(const char *filepath, bool *r_exists)
char str[FILE_MAX], strtest[FILE_MAX];
STRNCPY(str, filepath);
- BLI_path_abs(str, G.main->name);
+ BLI_path_abs(str, BKE_main_blendfile_path_from_global());
/* first search an identical filepath */
for (ima = G.main->image.first; ima; ima = ima->id.next) {
@@ -1648,7 +1648,8 @@ static void stampdata(Scene *scene, Object *camera, StampData *stamp_data, int d
time_t t;
if (scene->r.stamp & R_STAMP_FILENAME) {
- SNPRINTF(stamp_data->file, do_prefix ? "File %s" : "%s", G.relbase_valid ? G.main->name : "<untitled>");
+ SNPRINTF(stamp_data->file, do_prefix ? "File %s" : "%s",
+ G.relbase_valid ? BKE_main_blendfile_path_from_global() : "<untitled>");
}
else {
stamp_data->file[0] = '\0';
@@ -4698,7 +4699,7 @@ static void image_update_views_format(Image *ima, ImageUser *iuser)
char str[FILE_MAX];
STRNCPY(str, iv->filepath);
- BLI_path_abs(str, G.main->name);
+ BLI_path_abs(str, BKE_main_blendfile_path_from_global());
/* exists? */
file = BLI_open(str, O_BINARY | O_RDONLY, 0);