WIP: Basic Blender Project Support (experimental feature) #107655

Draft
Julian Eisel wants to merge 94 commits from blender-projects-basics into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
2 changed files with 9 additions and 2 deletions
Showing only changes of commit 5fb4b2d6ce - Show all commits

View File

@ -448,6 +448,13 @@ static void setup_app_blend_file_data(bContext *C,
}
}
static void setup_app_project_data(BlendFileData *bfd, const struct BlendFileReadParams *params)
{
if ((params->skip_flags & BLO_READ_SKIP_DATA) == 0) {
BKE_project_active_load_from_path(bfd->main->filepath);
}
}
static void handle_subversion_warning(Main *main, BlendFileReadReport *reports)
{
if (main->minversionfile > BLENDER_FILE_VERSION ||
@ -474,8 +481,8 @@ void BKE_blendfile_read_setup_ex(bContext *C,
BLO_update_defaults_startup_blend(bfd->main, startup_app_template);
}
}
setup_app_project_data(bfd, params);
setup_app_blend_file_data(C, bfd, params, reports);
BKE_project_active_load_from_path(bfd->filepath);
BLO_blendfiledata_free(bfd);
}

View File

@ -1443,7 +1443,7 @@ bool BLO_write_file(Main *mainvar,
}
/* Update active project information based on the new file location. */
BKE_project_active_load_from_path(mainvar->filepath);
BKE_project_active_load_from_path(filepath);
/* actual file writing */
const bool err = write_file_handle(