Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/io/io_collada.c
| Show All 37 Lines | |||||
| { | { | ||||
| Main *bmain = CTX_data_main(C); | Main *bmain = CTX_data_main(C); | ||||
| if (!RNA_struct_property_is_set(op->ptr, "filepath")) { | if (!RNA_struct_property_is_set(op->ptr, "filepath")) { | ||||
| char filepath[FILE_MAX]; | char filepath[FILE_MAX]; | ||||
| const char *blendfile_path = BKE_main_blendfile_path(bmain); | const char *blendfile_path = BKE_main_blendfile_path(bmain); | ||||
| if (blendfile_path[0] == '\0') { | if (blendfile_path[0] == '\0') { | ||||
| BLI_strncpy(filepath, "untitled", sizeof(filepath)); | BLI_strncpy(filepath, DATA_("untitled"), sizeof(filepath)); | ||||
| } | } | ||||
| else { | else { | ||||
| BLI_strncpy(filepath, blendfile_path, sizeof(filepath)); | BLI_strncpy(filepath, blendfile_path, sizeof(filepath)); | ||||
| } | } | ||||
| BLI_path_extension_replace(filepath, sizeof(filepath), ".dae"); | BLI_path_extension_replace(filepath, sizeof(filepath), ".dae"); | ||||
| RNA_string_set(op->ptr, "filepath", filepath); | RNA_string_set(op->ptr, "filepath", filepath); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 789 Lines • Show Last 20 Lines | |||||