Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_image/image_ops.c
| Show First 20 Lines • Show All 2,345 Lines • ▼ Show 20 Lines | for (Image *ima = bmain->images.first; ima; ima = ima->id.next) { | ||||
| if (image_should_be_saved(ima, &is_format_writable)) { | if (image_should_be_saved(ima, &is_format_writable)) { | ||||
| if (BKE_image_has_packedfile(ima) || (ima->source == IMA_SRC_GENERATED)) { | if (BKE_image_has_packedfile(ima) || (ima->source == IMA_SRC_GENERATED)) { | ||||
| if (ima->id.lib == NULL) { | if (ima->id.lib == NULL) { | ||||
| num_saveable_images++; | num_saveable_images++; | ||||
| } | } | ||||
| else { | else { | ||||
| BKE_reportf(reports, | BKE_reportf(reports, | ||||
| RPT_WARNING, | RPT_WARNING, | ||||
| "Packed library image: %s from library %s can't be saved", | "Packed library image can't be saved: \"%s\" from \"%s\"", | ||||
| ima->id.name + 2, | ima->id.name + 2, | ||||
campbellbarton: No reason to format static strings, they can be left as-is. | |||||
| ima->id.lib->name); | ima->id.lib->name); | ||||
| } | } | ||||
| } | } | ||||
| else if (!is_format_writable) { | else if (!is_format_writable) { | ||||
| BKE_reportf(reports, | BKE_reportf(reports, | ||||
| RPT_WARNING, | RPT_WARNING, | ||||
| "Image %s can't be saved automatically, must use a different file format", | "Image can't be saved, use a different file format: \"%s\"", | ||||
| ima->id.name + 2); | ima->id.name + 2); | ||||
| } | } | ||||
| else { | else { | ||||
| if (image_has_valid_path(ima)) { | if (image_has_valid_path(ima)) { | ||||
| num_saveable_images++; | num_saveable_images++; | ||||
| if (BLI_gset_haskey(unique_paths, ima->name)) { | if (BLI_gset_haskey(unique_paths, ima->name)) { | ||||
| BKE_reportf(reports, | BKE_reportf(reports, | ||||
| RPT_WARNING, | RPT_WARNING, | ||||
| "File path used by more than one saved image: %s", | "Multiple images can't be saved to an identical path: \"%s\"", | ||||
| ima->name); | ima->name); | ||||
| } | } | ||||
| else { | else { | ||||
| BLI_gset_insert(unique_paths, BLI_strdup(ima->name)); | BLI_gset_insert(unique_paths, BLI_strdup(ima->name)); | ||||
| } | } | ||||
| } | } | ||||
| else { | else { | ||||
| BKE_reportf(reports, | BKE_reportf(reports, | ||||
| RPT_WARNING, | RPT_WARNING, | ||||
| "Image %s can't be saved, no valid file path: %s", | "Image can't be saved, no valid file path: \"%s\"", | ||||
| ima->id.name + 2, | |||||
| ima->name); | ima->name); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| BLI_gset_free(unique_paths, MEM_freeN); | BLI_gset_free(unique_paths, MEM_freeN); | ||||
| return num_saveable_images; | return num_saveable_images; | ||||
| ▲ Show 20 Lines • Show All 2,003 Lines • Show Last 20 Lines | |||||
No reason to format static strings, they can be left as-is.