From ddd6be1834692c63353e47ab8d94e8dfc576c906 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 4 May 2016 23:56:38 +1000 Subject: Compositor: negative color support for ASC-CDL offset Since the color wheel can't handle negative colors usefully, use a basis value for the initial RGB. --- source/blender/compositor/nodes/COM_ColorBalanceNode.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'source/blender/compositor/nodes') diff --git a/source/blender/compositor/nodes/COM_ColorBalanceNode.cpp b/source/blender/compositor/nodes/COM_ColorBalanceNode.cpp index a531493d486..46a70716349 100644 --- a/source/blender/compositor/nodes/COM_ColorBalanceNode.cpp +++ b/source/blender/compositor/nodes/COM_ColorBalanceNode.cpp @@ -58,7 +58,12 @@ void ColorBalanceNode::convertToOperations(NodeConverter &converter, const Compo } else { ColorBalanceASCCDLOperation *operationCDL = new ColorBalanceASCCDLOperation(); - operationCDL->setOffset(n->offset); + + float offset[3]; + copy_v3_fl(offset, n->offset_basis); + add_v3_v3(offset, n->offset); + + operationCDL->setOffset(offset); operationCDL->setPower(n->power); operationCDL->setSlope(n->slope); operation = operationCDL; -- cgit v1.2.3