Simulation Nodes: bake simulation states to disk #106937

Merged
Jacques Lucke merged 116 commits from JacquesLucke/blender:sim-bake into geometry-nodes-simulation 2023-04-22 14:48:56 +02:00
1 changed files with 3 additions and 1 deletions
Showing only changes of commit 1cf3e710f2 - Show all commits

View File

@ -1215,7 +1215,9 @@ static GeometrySet compute_geometry(const bNodeTree &btree,
{
/* Try to use baked data. */
if (nmd_orig->simulation_cache->cache_state() != bke::sim::CacheState::Baked) {
const StringRefNull bmain_path = BKE_main_blendfile_path(bmain);
if (nmd_orig->simulation_cache->cache_state() != bke::sim::CacheState::Baked &&
!bmain_path.is_empty()) {
nmd_orig->simulation_cache->try_discover_bake(
bke::sim::get_meta_directory(*bmain, *ctx->object, nmd->modifier),
bke::sim::get_bdata_directory(*bmain, *ctx->object, nmd->modifier));