diff options
author | Garry R. Osgood <grosgood> | 2020-12-21 03:46:24 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2020-12-21 03:46:24 +0300 |
commit | 84cc00f3b68e12209e000008f992fad3ac48f757 (patch) | |
tree | fd0ea4bfaece7d99d6423a2c4a564b1af74ea29b | |
parent | c229d9876b78460179adaea9b8ea1b71a5ad19b1 (diff) |
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
-rw-r--r-- | source/blender/nodes/geometry/nodes/node_geo_attribute_math.cc | 3 |
1 files changed, 2 insertions, 1 deletions
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; |