Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/intern/wm_files_link.c
| Show First 20 Lines • Show All 1,051 Lines • ▼ Show 20 Lines | if (!BLI_exists(path)) { | ||||
| BKE_reportf(op->reports, | BKE_reportf(op->reports, | ||||
| RPT_ERROR_INVALID_INPUT, | RPT_ERROR_INVALID_INPUT, | ||||
| "Trying to reload or relocate library '%s' to invalid path '%s'", | "Trying to reload or relocate library '%s' to invalid path '%s'", | ||||
| lib->id.name, | lib->id.name, | ||||
| path); | path); | ||||
| return OPERATOR_CANCELLED; | return OPERATOR_CANCELLED; | ||||
| } | } | ||||
| if (BLI_path_cmp(bmain->name, path) == 0) { | |||||
mont29: Please use API `BKE_main_blendfile_path` | |||||
| BKE_reportf(op->reports, | |||||
| RPT_ERROR_INVALID_INPUT, | |||||
| "Cannot relocate library '%s' to current blend file '%s'", | |||||
| lib->id.name, | |||||
| path); | |||||
| return OPERATOR_CANCELLED; | |||||
| } | |||||
| if (BLI_path_cmp(lib->filepath_abs, path) == 0) { | if (BLI_path_cmp(lib->filepath_abs, path) == 0) { | ||||
| #ifdef PRINT_DEBUG | #ifdef PRINT_DEBUG | ||||
| printf("We are supposed to reload '%s' lib (%d)...\n", lib->filepath, lib->id.us); | printf("We are supposed to reload '%s' lib (%d)...\n", lib->filepath, lib->id.us); | ||||
| #endif | #endif | ||||
| do_reload = true; | do_reload = true; | ||||
| lapp_data = wm_link_append_data_new(flag); | lapp_data = wm_link_append_data_new(flag); | ||||
| ▲ Show 20 Lines • Show All 129 Lines • Show Last 20 Lines | |||||
Please use API BKE_main_blendfile_path