From 84cc00f3b68e12209e000008f992fad3ac48f757 Mon Sep 17 00:00:00 2001 From: "Garry R. Osgood" Date: Sun, 20 Dec 2020 18:46:24 -0600 Subject: Fix T83989: Attribute Math node ignores its operation setting T83989 observes that the Attribute Math node always adds its operands regardless of its operator setting. This was caused by an oversight committed in rB23233fcf056e42, which overlooked adjusting the exec function to use the new storage location. Differential Revision: https://developer.blender.org/D9909 --- source/blender/nodes/geometry/nodes/node_geo_attribute_math.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/nodes') diff --git a/source/blender/nodes/geometry/nodes/node_geo_attribute_math.cc b/source/blender/nodes/geometry/nodes/node_geo_attribute_math.cc index a7b71fa614f..997b85c5e9d 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_attribute_math.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_attribute_math.cc @@ -97,7 +97,8 @@ static void do_math_operation(const FloatReadAttribute &input_a, static void attribute_math_calc(GeometryComponent &component, const GeoNodeExecParams ¶ms) { const bNode &node = params.node(); - const int operation = node.custom1; + const NodeAttributeMath *node_storage = (const NodeAttributeMath *)node.storage; + const int operation = node_storage->operation; /* The result type of this node is always float. */ const CustomDataType result_type = CD_PROP_FLOAT; -- cgit v1.2.3