From 6491387fbaabfa7bd5c629e225d294c67bf63c02 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Fri, 12 May 2023 10:40:51 -0400 Subject: [PATCH] Fix: Incorrect value retrieval in simulation subframe mixing --- .../nodes/geometry/nodes/node_geo_simulation_output.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/blender/nodes/geometry/nodes/node_geo_simulation_output.cc b/source/blender/nodes/geometry/nodes/node_geo_simulation_output.cc index 8f3c47b04c9..8797abc14b9 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_simulation_output.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_simulation_output.cc @@ -607,12 +607,12 @@ static void mix_simulation_state(const NodeSimulationItem &item, break; } - void *prev = value_or_field_type.get_value_ptr(prev); - const void *next = value_or_field_type.get_value_ptr(next); + void *prev_value = value_or_field_type.get_value_ptr(prev); + const void *next_value = value_or_field_type.get_value_ptr(next); bke::attribute_math::convert_to_static_type(value_or_field_type.value, [&](auto dummy) { using T = decltype(dummy); - *static_cast(prev) = bke::attribute_math::mix2( - factor, *static_cast(prev), *static_cast(next)); + *static_cast(prev_value) = bke::attribute_math::mix2( + factor, *static_cast(prev_value), *static_cast(next_value)); }); break; }