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
This commit is contained in:
Garry R. Osgood 2020-12-20 18:46:24 -06:00 committed by Hans Goudey
parent c229d9876b
commit 84cc00f3b6
Notes: blender-bot 2023-02-14 11:28:43 +01:00
Referenced by issue #83989, Geometry Nodes: Attribute Math Node Always Adds Its Operands Regardless of the Operator Setting
1 changed files with 2 additions and 1 deletions

View File

@ -97,7 +97,8 @@ static void do_math_operation(const FloatReadAttribute &input_a,
static void attribute_math_calc(GeometryComponent &component, const GeoNodeExecParams &params)
{
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;