Cleanup: use new accessors to blendfile path (Main.name).
This commit is contained in:
@@ -727,7 +727,7 @@ void BPY_modules_load_user(bContext *C)
|
||||
G.f |= G_SCRIPT_AUTOEXEC_FAIL;
|
||||
BLI_snprintf(G.autoexec_fail, sizeof(G.autoexec_fail), "Text '%s'", text->id.name + 2);
|
||||
|
||||
printf("scripts disabled for \"%s\", skipping '%s'\n", bmain->name, text->id.name + 2);
|
||||
printf("scripts disabled for \"%s\", skipping '%s'\n", BKE_main_blendfile_path(bmain), text->id.name + 2);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@@ -205,7 +205,7 @@ static PyObject *bpy_lib_load(PyObject *UNUSED(self), PyObject *args, PyObject *
|
||||
|
||||
BLI_strncpy(ret->relpath, filename, sizeof(ret->relpath));
|
||||
BLI_strncpy(ret->abspath, filename, sizeof(ret->abspath));
|
||||
BLI_path_abs(ret->abspath, bmain->name);
|
||||
BLI_path_abs(ret->abspath, BKE_main_blendfile_path(bmain));
|
||||
|
||||
ret->blo_handle = NULL;
|
||||
ret->flag = ((is_link ? FILE_LINK : 0) |
|
||||
|
@@ -107,7 +107,7 @@ static PyObject *bpy_lib_write(PyObject *UNUSED(self), PyObject *args, PyObject
|
||||
}
|
||||
|
||||
BLI_strncpy(filepath_abs, filepath, FILE_MAX);
|
||||
BLI_path_abs(filepath_abs, G.main->name);
|
||||
BLI_path_abs(filepath_abs, BKE_main_blendfile_path_from_global());
|
||||
|
||||
BKE_blendfile_write_partial_begin(bmain_src);
|
||||
|
||||
|
Reference in New Issue
Block a user