[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [61160] trunk/blender/source/blender: Removed the DNA storage for LGG lift and inverse gamma in the color balance node .

Lukas Toenne lukas.toenne at googlemail.com
Wed Nov 6 13:44:50 CET 2013


Revision: 61160
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=61160
Author:   lukastoenne
Date:     2013-11-06 12:44:49 +0000 (Wed, 06 Nov 2013)
Log Message:
-----------
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).

Modified Paths:
--------------
    trunk/blender/source/blender/compositor/nodes/COM_ColorBalanceNode.cpp
    trunk/blender/source/blender/makesdna/DNA_node_types.h

Modified: trunk/blender/source/blender/compositor/nodes/COM_ColorBalanceNode.cpp
===================================================================
--- trunk/blender/source/blender/compositor/nodes/COM_ColorBalanceNode.cpp	2013-11-06 10:59:05 UTC (rev 61159)
+++ trunk/blender/source/blender/compositor/nodes/COM_ColorBalanceNode.cpp	2013-11-06 12:44:49 UTC (rev 61160)
@@ -43,18 +43,16 @@
 	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 {

Modified: trunk/blender/source/blender/makesdna/DNA_node_types.h
===================================================================
--- trunk/blender/source/blender/makesdna/DNA_node_types.h	2013-11-06 10:59:05 UTC (rev 61159)
+++ trunk/blender/source/blender/makesdna/DNA_node_types.h	2013-11-06 12:44:49 UTC (rev 61160)
@@ -686,10 +686,6 @@
 	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 {




More information about the Bf-blender-cvs mailing list