Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/blendfile.c
| Show First 20 Lines • Show All 62 Lines • ▼ Show 20 Lines | |||||
| #include "RNA_access.h" | #include "RNA_access.h" | ||||
| #include "RE_pipeline.h" | #include "RE_pipeline.h" | ||||
| #ifdef WITH_PYTHON | #ifdef WITH_PYTHON | ||||
| # include "BPY_extern.h" | # include "BPY_extern.h" | ||||
| #endif | #endif | ||||
| #include "CLG_log.h" | |||||
| static CLG_LogRef LOG = {"bke.blender"}; | |||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name High Level `.blend` file read/write. | /** \name High Level `.blend` file read/write. | ||||
| * \{ */ | * \{ */ | ||||
| static bool clean_paths_visit_cb(void *UNUSED(userdata), char *path_dst, const char *path_src) | static bool clean_paths_visit_cb(void *UNUSED(userdata), char *path_dst, const char *path_src) | ||||
| { | { | ||||
| strcpy(path_dst, path_src); | strcpy(path_dst, path_src); | ||||
| BLI_path_native_slash(path_dst); | BLI_path_native_slash(path_dst); | ||||
| ▲ Show 20 Lines • Show All 301 Lines • ▼ Show 20 Lines | int BKE_blendfile_read( | ||||
| const struct BlendFileReadParams *params, | const struct BlendFileReadParams *params, | ||||
| ReportList *reports) | ReportList *reports) | ||||
| { | { | ||||
| BlendFileData *bfd; | BlendFileData *bfd; | ||||
| int retval = BKE_BLENDFILE_READ_OK; | int retval = BKE_BLENDFILE_READ_OK; | ||||
| /* don't print user-pref loading */ | /* don't print user-pref loading */ | ||||
| if (strstr(filepath, BLENDER_STARTUP_FILE) == NULL) { | if (strstr(filepath, BLENDER_STARTUP_FILE) == NULL) { | ||||
| printf("Read blend: %s\n", filepath); | CLOG_INFO(&LOG, 1, "Read blend: %s", filepath); | ||||
| } | } | ||||
| bfd = BLO_read_from_file(filepath, params->skip_flags, reports); | bfd = BLO_read_from_file(filepath, params->skip_flags, reports); | ||||
| if (bfd) { | if (bfd) { | ||||
| if (bfd->user) { | if (bfd->user) { | ||||
| retval = BKE_BLENDFILE_READ_OK_USERPREFS; | retval = BKE_BLENDFILE_READ_OK_USERPREFS; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 339 Lines • Show Last 20 Lines | |||||