Merge branch 'blender-v4.2-release'

This commit is contained in:
Sean Kim
2024-06-06 13:16:59 -07:00
2 changed files with 12 additions and 2 deletions

View File

@@ -2574,13 +2574,16 @@ static blender::draw::pbvh::PBVH_GPU_Args pbvh_draw_args_init(const Mesh &mesh,
args.pbvh_type = pbvh.header.type;
/* Occasionally, the evaluated and original meshes are out of sync. Prefer using the pbvh mesh in
* these cases. See #115856 and #121008 */
args.face_sets_color_default = pbvh.mesh ? pbvh.mesh->face_sets_color_default :
mesh.face_sets_color_default;
args.face_sets_color_seed = pbvh.mesh ? pbvh.mesh->face_sets_color_seed :
mesh.face_sets_color_seed;
args.active_color = mesh.active_color_attribute;
args.render_color = mesh.default_color_attribute;
args.active_color = pbvh.mesh ? pbvh.mesh->active_color_attribute : mesh.active_color_attribute;
args.render_color = pbvh.mesh ? pbvh.mesh->default_color_attribute :
mesh.default_color_attribute;
switch (pbvh.header.type) {
case PBVH_FACES:

View File

@@ -1021,6 +1021,13 @@ class NodesModifierSimulationParams : public nodes::GeoNodesSimulationParams {
{
if (node_cache->cache_status != bake::CacheStatus::Baked) {
node_cache->cache_status = bake::CacheStatus::Invalid;
if (!node_cache->bake.frames.is_empty()) {
if (node_cache->bake.frames.last()->frame == current_frame_) {
/* Remove the last (which is the current) cached frame so that it is simulated
* again. */
node_cache->bake.frames.pop_last();
}
}
}
}
}