[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46946] trunk/blender/source/blender: style cleanup: also correct comment

Campbell Barton ideasman42 at gmail.com
Wed May 23 19:26:50 CEST 2012


Revision: 46946
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46946
Author:   campbellbarton
Date:     2012-05-23 17:26:49 +0000 (Wed, 23 May 2012)
Log Message:
-----------
style cleanup: also correct comment

Modified Paths:
--------------
    trunk/blender/source/blender/compositor/intern/COM_ExecutionSystem.cpp
    trunk/blender/source/blender/compositor/intern/COM_InputSocket.cpp
    trunk/blender/source/blender/compositor/nodes/COM_ViewerNode.cpp
    trunk/blender/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp
    trunk/blender/source/blender/compositor/operations/COM_CompositorOperation.cpp
    trunk/blender/source/blender/compositor/operations/COM_LensGhostOperation.cpp
    trunk/blender/source/blender/compositor/operations/COM_MathBaseOperation.cpp
    trunk/blender/source/blender/makesrna/intern/rna_userdef.c

Modified: trunk/blender/source/blender/compositor/intern/COM_ExecutionSystem.cpp
===================================================================
--- trunk/blender/source/blender/compositor/intern/COM_ExecutionSystem.cpp	2012-05-23 17:16:53 UTC (rev 46945)
+++ trunk/blender/source/blender/compositor/intern/COM_ExecutionSystem.cpp	2012-05-23 17:26:49 UTC (rev 46946)
@@ -105,7 +105,7 @@
 void ExecutionSystem::execute()
 {
 	unsigned int order = 0;
-	for ( vector<NodeOperation*>::iterator iter = this->operations.begin(); iter != operations.end(); ++iter ) {
+	for (vector<NodeOperation*>::iterator iter = this->operations.begin(); iter != operations.end(); ++iter) {
 		NodeBase *node = *iter;
 		NodeOperation *operation = (NodeOperation*) node;
 		if (operation->isReadBufferOperation()) {
@@ -273,7 +273,7 @@
 		}
 	}
 	ExecutionSystemHelper::findOutputNodeOperations(&outputOperations, this->getOperations(), this->context.isRendering());
-	for ( vector<NodeOperation*>::iterator iter = outputOperations.begin(); iter != outputOperations.end(); ++iter ) {
+	for (vector<NodeOperation*>::iterator iter = outputOperations.begin(); iter != outputOperations.end(); ++iter) {
 		operation = *iter;
 		ExecutionGroup *group = new ExecutionGroup();
 		group->addOperation(this, operation);

Modified: trunk/blender/source/blender/compositor/intern/COM_InputSocket.cpp
===================================================================
--- trunk/blender/source/blender/compositor/intern/COM_InputSocket.cpp	2012-05-23 17:16:53 UTC (rev 46945)
+++ trunk/blender/source/blender/compositor/intern/COM_InputSocket.cpp	2012-05-23 17:26:49 UTC (rev 46946)
@@ -168,7 +168,8 @@
 {
 	if (isConnected()) {
 		relinkConnections(relinkToSocket);
-	} else {
+	}
+	else {
 		Node *node = (Node*)this->getNode();
 		switch (this->getActualDataType()) {
 		case COM_DT_UNKNOWN:

Modified: trunk/blender/source/blender/compositor/nodes/COM_ViewerNode.cpp
===================================================================
--- trunk/blender/source/blender/compositor/nodes/COM_ViewerNode.cpp	2012-05-23 17:16:53 UTC (rev 46945)
+++ trunk/blender/source/blender/compositor/nodes/COM_ViewerNode.cpp	2012-05-23 17:26:49 UTC (rev 46946)
@@ -39,8 +39,8 @@
 	if (imageSocket->isConnected()) {
 		bNode *editorNode = this->getbNode();
 		ViewerOperation *viewerOperation = new ViewerOperation();
-		viewerOperation->setColorManagement( context->getScene()->r.color_mgt_flag & R_COLOR_MANAGEMENT);
-		viewerOperation->setColorPredivide( context->getScene()->r.color_mgt_flag & R_COLOR_MANAGEMENT_PREDIVIDE);
+		viewerOperation->setColorManagement(context->getScene()->r.color_mgt_flag & R_COLOR_MANAGEMENT);
+		viewerOperation->setColorPredivide(context->getScene()->r.color_mgt_flag & R_COLOR_MANAGEMENT_PREDIVIDE);
 		viewerOperation->setbNodeTree(context->getbNodeTree());
 		viewerOperation->setImage(image);
 		viewerOperation->setImageUser(imageUser);

Modified: trunk/blender/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp
===================================================================
--- trunk/blender/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp	2012-05-23 17:16:53 UTC (rev 46945)
+++ trunk/blender/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp	2012-05-23 17:26:49 UTC (rev 46946)
@@ -64,7 +64,7 @@
 	float levelHighlights = 0.0;
 #define MARGIN 0.10
 #define MARGIN_DIV (0.5/MARGIN)
-	if ( level < this->data->startmidtones-MARGIN) {
+	if (level < this->data->startmidtones-MARGIN) {
 		levelShadows = 1.0f;
 	}
 	else if (level < this->data->startmidtones+MARGIN) {
@@ -95,9 +95,9 @@
 	
 	float invgamma = 1.0f/gamma;
 	float luma = 0.2126 * r + 0.7152 * g + 0.0722 * b;
-	r = ( luma + saturation * (r - luma));
-	g = ( luma + saturation * (g - luma));
-	b = ( luma + saturation * (b - luma));
+	r = (luma + saturation * (r - luma));
+	g = (luma + saturation * (g - luma));
+	b = (luma + saturation * (b - luma));
 	CLAMP (r, 0.0f, 1.0f);
 	CLAMP (g, 0.0f, 1.0f);
 	CLAMP (b, 0.0f, 1.0f);

Modified: trunk/blender/source/blender/compositor/operations/COM_CompositorOperation.cpp
===================================================================
--- trunk/blender/source/blender/compositor/operations/COM_CompositorOperation.cpp	2012-05-23 17:16:53 UTC (rev 46945)
+++ trunk/blender/source/blender/compositor/operations/COM_CompositorOperation.cpp	2012-05-23 17:26:49 UTC (rev 46946)
@@ -74,7 +74,8 @@
 			re = NULL;
 		}
 		BKE_image_signal(BKE_image_verify_viewer(IMA_TYPE_R_RESULT, "Render Result"), NULL, IMA_SIGNAL_FREE);
-	} else {
+	}
+	else {
 		if (this->outputBuffer) {
 			MEM_freeN(this->outputBuffer);
 		}

Modified: trunk/blender/source/blender/compositor/operations/COM_LensGhostOperation.cpp
===================================================================
--- trunk/blender/source/blender/compositor/operations/COM_LensGhostOperation.cpp	2012-05-23 17:16:53 UTC (rev 46945)
+++ trunk/blender/source/blender/compositor/operations/COM_LensGhostOperation.cpp	2012-05-23 17:26:49 UTC (rev 46946)
@@ -314,24 +314,24 @@
 
 		float rs01 = -sin(theta0-theta1)/sin(theta0+theta1);
 		float rp01 = tan( theta0-theta1)/tan(theta0+theta1);
-		float ts01 = 2 * sin ( theta1 ) * cos ( theta0 ) / sin ( theta0+theta1 ) ;
+		float ts01 = 2 * sin( theta1 ) * cos( theta0 ) / sin( theta0+theta1 ) ;
 		float tp01 = ts01*cos(theta0-theta1);
 		// amplitude for inner reflection
-		float rs12 = -sin ( theta1-theta2 ) / sin ( theta1+theta2 ) ;
-		float rp12 = +tan ( theta1-theta2 ) / tan ( theta1+theta2 ) ;
+		float rs12 = -sin( theta1-theta2 ) / sin( theta1+theta2 ) ;
+		float rp12 = +tan( theta1-theta2 ) / tan( theta1+theta2 ) ;
 		// after passing through first surface twice :
 		// 2 transmissions and 1 reflection
 		float ris = ts01 * ts01 * rs12 ;
 		float rip = tp01 * tp01 * rp12 ;
 		// phase difference between outer and inner reflections
 		float dy = d1 * n1 ;
-		float dx = tan ( theta1 ) * dy ;
-		float delay = sqrt ( dx * dx+dy * dy ) ;
-		float relPhase = 4 * M_PI / lambda * ( delay-dx * sin ( theta0 ) ) ;
+		float dx = tan( theta1 ) * dy ;
+		float delay = sqrt( dx * dx+dy * dy ) ;
+		float relPhase = 4 * M_PI / lambda * ( delay-dx * sin( theta0 ) ) ;
 		// Add up sines of different phase and amplitude
-		float out_s2 = rs01 * rs01 + ris * ris + 2 * rs01 * ris * cos ( relPhase ) ;
-		float out_p2 = rp01 * rp01 + rip * rip + 2 * rp01 * rip * cos ( relPhase ) ;
-		return ( out_s2+out_p2 ) / 2 ;
+		float out_s2 = rs01 * rs01 + ris * ris + 2 * rs01 * ris * cos( relPhase ) ;
+		float out_p2 = rp01 * rp01 + rip * rip + 2 * rp01 * rip * cos( relPhase ) ;
+		return (out_s2 + out_p2) / 2 ;
 	}
 
 	void detectHit(Ray *result, Ray *inputRay, Bounce *bounce) {

Modified: trunk/blender/source/blender/compositor/operations/COM_MathBaseOperation.cpp
===================================================================
--- trunk/blender/source/blender/compositor/operations/COM_MathBaseOperation.cpp	2012-05-23 17:16:53 UTC (rev 46945)
+++ trunk/blender/source/blender/compositor/operations/COM_MathBaseOperation.cpp	2012-05-23 17:26:49 UTC (rev 46946)
@@ -174,7 +174,7 @@
 	inputValue1Operation->read(&inputValue1[0], x, y, sampler, inputBuffers);
 	inputValue2Operation->read(&inputValue2[0], x, y, sampler, inputBuffers);
 	
-	if ( inputValue1[0] >= 0 ) {
+	if (inputValue1[0] >= 0) {
 		outputValue[0] = pow(inputValue1[0], inputValue2[0]);
 	}
 	else {
@@ -197,7 +197,7 @@
 	inputValue1Operation->read(&inputValue1[0], x, y, sampler, inputBuffers);
 	inputValue2Operation->read(&inputValue2[0], x, y, sampler, inputBuffers);
 	
-	if ( inputValue1[0] > 0  && inputValue2[0] > 0 )
+	if (inputValue1[0] > 0  && inputValue2[0] > 0)
 		outputValue[0] = log(inputValue1[0]) / log(inputValue2[0]);
 	else
 		outputValue[0] = 0.0;

Modified: trunk/blender/source/blender/makesrna/intern/rna_userdef.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_userdef.c	2012-05-23 17:16:53 UTC (rev 46945)
+++ trunk/blender/source/blender/makesrna/intern/rna_userdef.c	2012-05-23 17:26:49 UTC (rev 46946)
@@ -3053,7 +3053,7 @@
 
 	prop = RNA_def_property(srna, "memory_cache_limit", PROP_INT, PROP_NONE);
 	RNA_def_property_int_sdna(prop, NULL, "memcachelimit");
-	RNA_def_property_range(prop, 0, (sizeof(void *) == 8) ? 1024 * 32 : 1024); /* 32 bit 2 GB, 64 bit 16 GB */
+	RNA_def_property_range(prop, 0, (sizeof(void *) == 8) ? 1024 * 32 : 1024); /* 32 bit 2 GB, 64 bit 32 GB */
 	RNA_def_property_ui_text(prop, "Memory Cache Limit", "Memory cache limit (in megabytes)");
 	RNA_def_property_update(prop, 0, "rna_Userdef_memcache_update");
 




More information about the Bf-blender-cvs mailing list