From 68627626854c27c2135cab72b48b648cb638c8cb Mon Sep 17 00:00:00 2001 From: Lukas Stockner Date: Thu, 24 May 2018 02:51:41 +0200 Subject: Cycles/Compositor: Add arctan2 operation to the Math node The Math node currently has the normal atan() function, but for actual angles this is fairly useless without additional nodes to handle the signs. Since the node has two inputs anyways, it only makes sense to add an arctan2 option. Reviewers: sergey, brecht Differential Revision: https://developer.blender.org/D3430 --- source/blender/compositor/nodes/COM_MathNode.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/compositor/nodes') diff --git a/source/blender/compositor/nodes/COM_MathNode.cpp b/source/blender/compositor/nodes/COM_MathNode.cpp index eb6bb2caf56..0fb6933afe7 100644 --- a/source/blender/compositor/nodes/COM_MathNode.cpp +++ b/source/blender/compositor/nodes/COM_MathNode.cpp @@ -86,6 +86,9 @@ void MathNode::convertToOperations(NodeConverter &converter, const CompositorCon case NODE_MATH_ABS: operation = new MathAbsoluteOperation(); break; + case NODE_MATH_ATAN2: + operation = new MathArcTan2Operation(); + break; } if (operation) { -- cgit v1.2.3