diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-05-04 16:56:38 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-05-04 17:06:55 +0300 |
commit | ddd6be1834692c63353e47ab8d94e8dfc576c906 (patch) | |
tree | 9199716d98ae1e51c3a8ef67a2833d5aa7cbffef /source/blender/compositor | |
parent | 980f3c36937a5b7b0a967b4c68c43168ccc583b9 (diff) |
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.
Diffstat (limited to 'source/blender/compositor')
-rw-r--r-- | source/blender/compositor/nodes/COM_ColorBalanceNode.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
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; |