Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorLukas Toenne <lukas.toenne@googlemail.com>2013-11-06 16:44:49 +0400
committerLukas Toenne <lukas.toenne@googlemail.com>2013-11-06 16:44:49 +0400
commitb9aa637b83e79d09781a351a956a60b545a7cec9 (patch)
tree64078443e3a05e12af5a5d996c142aacdd9b673b /source
parent50ac2ee8dea2df1f95ef700e271e4111adb1ef48 (diff)
Removed the DNA storage for LGG lift and inverse gamma in the color balance node. These values were always calculated at execution time, so there is no need to keep them around in DNA data and no forward compatibility break either. Only reason they were stored in DNA before is that the old compositor had no other means of keeping precomputed values around for every pixel than storing the DNA node data, with new compositor this is no longer necessary (values are stored in operations).
Diffstat (limited to 'source')
-rw-r--r--source/blender/compositor/nodes/COM_ColorBalanceNode.cpp18
-rw-r--r--source/blender/makesdna/DNA_node_types.h4
2 files changed, 8 insertions, 14 deletions
diff --git a/source/blender/compositor/nodes/COM_ColorBalanceNode.cpp b/source/blender/compositor/nodes/COM_ColorBalanceNode.cpp
index 5578fdae54e..68829940da5 100644
--- a/source/blender/compositor/nodes/COM_ColorBalanceNode.cpp
+++ b/source/blender/compositor/nodes/COM_ColorBalanceNode.cpp
@@ -43,18 +43,16 @@ void ColorBalanceNode::convertToOperations(ExecutionSystem *graph, CompositorCon
NodeOperation *operation;
if (node->custom1 == 0) {
ColorBalanceLGGOperation *operationLGG = new ColorBalanceLGGOperation();
- {
- int c;
-
- for (c = 0; c < 3; c++) {
- n->lift_lgg[c] = 2.0f - n->lift[c];
- n->gamma_inv[c] = (n->gamma[c] != 0.0f) ? 1.0f / n->gamma[c] : 1000000.0f;
- }
+
+ float lift_lgg[3], gamma_inv[3];
+ for (int c = 0; c < 3; c++) {
+ lift_lgg[c] = 2.0f - n->lift[c];
+ gamma_inv[c] = (n->gamma[c] != 0.0f) ? 1.0f / n->gamma[c] : 1000000.0f;
}
-
+
operationLGG->setGain(n->gain);
- operationLGG->setLift(n->lift_lgg);
- operationLGG->setGammaInv(n->gamma_inv);
+ operationLGG->setLift(lift_lgg);
+ operationLGG->setGammaInv(gamma_inv);
operation = operationLGG;
}
else {
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h
index 451dd20daa6..4ce4f6010b6 100644
--- a/source/blender/makesdna/DNA_node_types.h
+++ b/source/blender/makesdna/DNA_node_types.h
@@ -686,10 +686,6 @@ typedef struct NodeColorBalance {
float lift[3];
float gamma[3];
float gain[3];
-
- /* temp storage for inverted lift */
- float lift_lgg[3];
- float gamma_inv[3];
} NodeColorBalance;
typedef struct NodeColorspill {