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/editors/space_image
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/editors/space_image')
-rw-r--r--source/blender/editors/space_image/image_ops.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index 95cbc4fe4a2..d17eb357ff6 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -227,7 +227,7 @@ static int space_image_file_exists_poll(bContext *C)
ibuf = ED_space_image_acquire_buffer(sima, &lock);
if (ibuf) {
BLI_strncpy(name, ibuf->name, FILE_MAX);
- BLI_path_abs(name, bmain->name);
+ BLI_path_abs(name, BKE_main_blendfile_path(bmain));
if (BLI_exists(name) == false) {
CTX_wm_operator_poll_msg_set(C, "image file not found");
@@ -1263,11 +1263,11 @@ static int image_open_exec(bContext *C, wmOperator *op)
BLI_strncpy(filepath_range, frame_range->filepath, sizeof(filepath_range));
if (was_relative) {
- BLI_path_rel(filepath_range, bmain->name);
+ BLI_path_rel(filepath_range, BKE_main_blendfile_path(bmain));
}
Image *ima_range = image_open_single(
- op, filepath_range, bmain->name,
+ op, filepath_range, BKE_main_blendfile_path(bmain),
is_relative_path, use_multiview, frame_range_seq_len);
/* take the first image */
@@ -1282,7 +1282,7 @@ static int image_open_exec(bContext *C, wmOperator *op)
else {
/* for drag & drop etc. */
ima = image_open_single(
- op, filepath, bmain->name,
+ op, filepath, BKE_main_blendfile_path(bmain),
is_relative_path, use_multiview, 1);
}
@@ -1692,12 +1692,12 @@ static int save_image_options_init(Main *bmain, SaveImageOptions *simopts, Space
}
else {
BLI_strncpy(simopts->filepath, "//untitled", sizeof(simopts->filepath));
- BLI_path_abs(simopts->filepath, bmain->name);
+ BLI_path_abs(simopts->filepath, BKE_main_blendfile_path(bmain));
}
}
else {
BLI_snprintf(simopts->filepath, sizeof(simopts->filepath), "//%s", ima->id.name + 2);
- BLI_path_abs(simopts->filepath, is_prev_save ? G.ima : bmain->name);
+ BLI_path_abs(simopts->filepath, is_prev_save ? G.ima : BKE_main_blendfile_path(bmain));
}
}
@@ -1721,7 +1721,7 @@ static void save_image_options_from_op(Main *bmain, SaveImageOptions *simopts, w
if (RNA_struct_property_is_set(op->ptr, "filepath")) {
RNA_string_get(op->ptr, "filepath", simopts->filepath);
- BLI_path_abs(simopts->filepath, bmain->name);
+ BLI_path_abs(simopts->filepath, BKE_main_blendfile_path(bmain));
}
}
@@ -2302,7 +2302,7 @@ static int image_save_sequence_exec(bContext *C, wmOperator *op)
char name[FILE_MAX];
BLI_strncpy(name, ibuf->name, sizeof(name));
- BLI_path_abs(name, bmain->name);
+ BLI_path_abs(name, BKE_main_blendfile_path(bmain));
if (0 == IMB_saveiff(ibuf, name, IB_rect | IB_zbuf | IB_zbuffloat)) {
BKE_reportf(op->reports, RPT_ERROR, "Could not write image: %s", strerror(errno));