Fix #109561: Overwrite existing imagepath based on relativepath property #109815
@ -1268,12 +1268,8 @@ static void image_open_cancel(bContext * /*C*/, wmOperator *op)
|
||||
op->customdata = nullptr;
|
||||
}
|
||||
|
||||
static Image *image_open_single(Main *bmain,
|
||||
wmOperator *op,
|
||||
ImageFrameRange *range,
|
||||
const char *relbase,
|
||||
bool is_relative_path,
|
||||
bool use_multiview)
|
||||
static Image *image_open_single(
|
||||
Main *bmain, wmOperator *op, ImageFrameRange *range, const char *relbase, bool use_multiview)
|
||||
{
|
||||
bool exists = false;
|
||||
Image *ima = nullptr;
|
||||
@ -1300,11 +1296,6 @@ static Image *image_open_single(Main *bmain,
|
||||
return ima;
|
||||
}
|
||||
|
||||
/* only image path after save, never ibuf */
|
||||
if (is_relative_path) {
|
||||
BLI_path_rel(ima->filepath, relbase);
|
||||
}
|
||||
|
||||
/* handle multiview images */
|
||||
if (use_multiview) {
|
||||
ImageOpenData *iod = static_cast<ImageOpenData *>(op->customdata);
|
||||
@ -1357,7 +1348,7 @@ static int image_open_exec(bContext *C, wmOperator *op)
|
||||
ListBase ranges = ED_image_filesel_detect_sequences(bmain, op, use_udim);
|
||||
LISTBASE_FOREACH (ImageFrameRange *, range, &ranges) {
|
||||
Image *ima_range = image_open_single(
|
||||
bmain, op, range, BKE_main_blendfile_path(bmain), is_relative_path, use_multiview);
|
||||
bmain, op, range, BKE_main_blendfile_path(bmain), use_multiview);
|
||||
|
||||
/* take the first image */
|
||||
if ((ima == nullptr) && ima_range) {
|
||||
|
Loading…
Reference in New Issue
Block a user