Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/intern/wm_files.c
| Context not available. | |||||
| return ok; | return ok; | ||||
| } | } | ||||
| /* Check if file write permission is ok */ | /* Check if file write permission is ok. */ | ||||
| if (BLI_exists(filepath) && !BLI_file_is_writable(filepath)) { | if (BLI_exists(filepath) && !BLI_file_is_writable(filepath)) { | ||||
| BKE_reportf(reports, RPT_ERROR, "Cannot save blend file, path '%s' is not writable", filepath); | BKE_reportf(reports, RPT_ERROR, "Cannot save blend file, path \"%s\" is not writable", filepath); | ||||
| return ok; | return ok; | ||||
| } | } | ||||
| Context not available. | |||||
| ibuf_thumb = IMB_thumb_create(filepath, THB_LARGE, THB_SOURCE_BLEND, ibuf_thumb); | ibuf_thumb = IMB_thumb_create(filepath, THB_LARGE, THB_SOURCE_BLEND, ibuf_thumb); | ||||
| } | } | ||||
| /* Success. */ | /* Success, report since this can be called from key shortcuts. */ | ||||
| BKE_reportf(reports, RPT_INFO, "Saved \"%s\"", BLI_path_basename(filepath)); | |||||
| ok = true; | ok = true; | ||||
| } | } | ||||
| Context not available. | |||||
| } | } | ||||
| } | } | ||||
| /* Files without a filepath will go to "Save As". */ | |||||
| if (G.save_over) { | if (G.save_over) { | ||||
| char path[FILE_MAX]; | char path[FILE_MAX]; | ||||
| RNA_string_get(op->ptr, "filepath", path); | RNA_string_get(op->ptr, "filepath", path); | ||||
| ret = wm_save_as_mainfile_exec(C, op); | ret = wm_save_as_mainfile_exec(C, op); | ||||
| /* Without this there is no feedback the file was saved. */ | |||||
| BKE_reportf(op->reports, RPT_INFO, "Saved \"%s\"", BLI_path_basename(path)); | |||||
| } | } | ||||
| else { | else { | ||||
| WM_event_add_fileselect(C, op); | WM_event_add_fileselect(C, op); | ||||
| Context not available. | |||||