[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46732] trunk/blender/source/blender/ compositor: style cleanup: braces, compositor
Campbell Barton
ideasman42 at gmail.com
Thu May 17 15:44:15 CEST 2012
Revision: 46732
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46732
Author: campbellbarton
Date: 2012-05-17 13:44:15 +0000 (Thu, 17 May 2012)
Log Message:
-----------
style cleanup: braces, compositor
Modified Paths:
--------------
trunk/blender/source/blender/compositor/intern/COM_CompositorContext.cpp
trunk/blender/source/blender/compositor/intern/COM_Converter.cpp
trunk/blender/source/blender/compositor/intern/COM_ExecutionGroup.cpp
trunk/blender/source/blender/compositor/intern/COM_ExecutionSystem.cpp
trunk/blender/source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp
trunk/blender/source/blender/compositor/intern/COM_InputSocket.cpp
trunk/blender/source/blender/compositor/intern/COM_MemoryBuffer.cpp
trunk/blender/source/blender/compositor/intern/COM_MemoryManager.cpp
trunk/blender/source/blender/compositor/intern/COM_MemoryManagerState.cpp
trunk/blender/source/blender/compositor/intern/COM_Node.cpp
trunk/blender/source/blender/compositor/intern/COM_NodeBase.cpp
trunk/blender/source/blender/compositor/intern/COM_NodeOperation.cpp
trunk/blender/source/blender/compositor/intern/COM_OpenCLDevice.cpp
trunk/blender/source/blender/compositor/intern/COM_OutputSocket.cpp
trunk/blender/source/blender/compositor/intern/COM_SocketConnection.cpp
trunk/blender/source/blender/compositor/intern/COM_WorkScheduler.cpp
trunk/blender/source/blender/compositor/nodes/COM_AlphaOverNode.cpp
trunk/blender/source/blender/compositor/nodes/COM_BlurNode.cpp
trunk/blender/source/blender/compositor/nodes/COM_BokehBlurNode.cpp
trunk/blender/source/blender/compositor/nodes/COM_ChannelMatteNode.cpp
trunk/blender/source/blender/compositor/nodes/COM_ColorBalanceNode.cpp
trunk/blender/source/blender/compositor/nodes/COM_ColorSpillNode.cpp
trunk/blender/source/blender/compositor/nodes/COM_CombineRGBANode.cpp
trunk/blender/source/blender/compositor/nodes/COM_ConvertAlphaNode.cpp
trunk/blender/source/blender/compositor/nodes/COM_CropNode.cpp
trunk/blender/source/blender/compositor/nodes/COM_DefocusNode.cpp
trunk/blender/source/blender/compositor/nodes/COM_FilterNode.cpp
trunk/blender/source/blender/compositor/nodes/COM_GroupNode.cpp
trunk/blender/source/blender/compositor/nodes/COM_IDMaskNode.cpp
trunk/blender/source/blender/compositor/nodes/COM_ImageNode.cpp
trunk/blender/source/blender/compositor/nodes/COM_LensDistortionNode.cpp
trunk/blender/source/blender/compositor/nodes/COM_MathNode.cpp
trunk/blender/source/blender/compositor/nodes/COM_MovieClipNode.cpp
trunk/blender/source/blender/compositor/nodes/COM_RenderLayersNode.cpp
trunk/blender/source/blender/compositor/nodes/COM_SwitchNode.cpp
trunk/blender/source/blender/compositor/nodes/COM_TimeNode.cpp
trunk/blender/source/blender/compositor/nodes/COM_ViewLevelsNode.cpp
trunk/blender/source/blender/compositor/nodes/COM_ZCombineNode.cpp
trunk/blender/source/blender/compositor/operations/COM_AlphaOverKeyOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_AlphaOverMixedOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_AntiAliasOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_BilateralBlurOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_BlurBaseOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_BokehBlurOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_BokehImageOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_BoxMaskOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_BrightnessOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_CalculateMeanOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ChangeHSVOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ChannelMatteOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ChromaMatteOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ColorCurveOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ColorMatteOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ColorSpillOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_CompositorOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ConvertPremulToKeyOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ConvertRGBToYCCOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ConvertYCCToRGBOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_CropOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_DilateErodeOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_DistanceMatteOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_EllipseMaskOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_FlipOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ImageOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_InvertOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_LensGhostOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_MapUVOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_MapValueOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_MathBaseOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_MixBaseOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_MixColorOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_MixDarkenOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_MixDivideOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_MixHueOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_MixLightenOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_MixOverlayOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_MixSaturationOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_MovieClipOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_MultilayerImageOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_OpenCLKernels.cl.cpp
trunk/blender/source/blender/compositor/operations/COM_PreviewOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ReadBufferOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_RenderLayersAlphaProg.cpp
trunk/blender/source/blender/compositor/operations/COM_RenderLayersBaseProg.cpp
trunk/blender/source/blender/compositor/operations/COM_RotateOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_SetVectorOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_SplitViewerOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_TextureOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_VectorBlurOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ViewerBaseOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ViewerOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_WriteBufferOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ZCombineOperation.cpp
Modified: trunk/blender/source/blender/compositor/intern/COM_CompositorContext.cpp
===================================================================
--- trunk/blender/source/blender/compositor/intern/COM_CompositorContext.cpp 2012-05-17 13:30:20 UTC (rev 46731)
+++ trunk/blender/source/blender/compositor/intern/COM_CompositorContext.cpp 2012-05-17 13:44:15 UTC (rev 46732)
@@ -33,7 +33,8 @@
const int CompositorContext::getFramenumber() const {
if (this->scene) {
return this->scene->r.cfra;
- } else {
+ }
+ else {
return -1; /* this should never happen */
}
}
@@ -41,7 +42,8 @@
const int CompositorContext::isColorManaged() const {
if (this->scene) {
return this->scene->r.color_mgt_flag & R_COLOR_MANAGEMENT;
- } else {
+ }
+ else {
return 0; /* this should never happen */
}
}
Modified: trunk/blender/source/blender/compositor/intern/COM_Converter.cpp
===================================================================
--- trunk/blender/source/blender/compositor/intern/COM_Converter.cpp 2012-05-17 13:30:20 UTC (rev 46731)
+++ trunk/blender/source/blender/compositor/intern/COM_Converter.cpp 2012-05-17 13:44:15 UTC (rev 46732)
@@ -361,15 +361,20 @@
NodeOperation * converter = NULL;
if (fromDatatype == COM_DT_VALUE && toDatatype == COM_DT_COLOR) {
converter = new ConvertValueToColourProg();
- } else if (fromDatatype == COM_DT_VALUE && toDatatype == COM_DT_VECTOR) {
+ }
+ else if (fromDatatype == COM_DT_VALUE && toDatatype == COM_DT_VECTOR) {
converter = new ConvertValueToVectorOperation();
- } else if (fromDatatype == COM_DT_COLOR && toDatatype == COM_DT_VALUE) {
+ }
+ else if (fromDatatype == COM_DT_COLOR && toDatatype == COM_DT_VALUE) {
converter = new ConvertColourToValueProg();
- } else if (fromDatatype == COM_DT_COLOR && toDatatype == COM_DT_VECTOR) {
+ }
+ else if (fromDatatype == COM_DT_COLOR && toDatatype == COM_DT_VECTOR) {
converter = new ConvertColorToVectorOperation();
- } else if (fromDatatype == COM_DT_VECTOR && toDatatype == COM_DT_VALUE) {
+ }
+ else if (fromDatatype == COM_DT_VECTOR && toDatatype == COM_DT_VALUE) {
converter = new ConvertVectorToValueOperation();
- } else if (fromDatatype == COM_DT_VECTOR && toDatatype == COM_DT_COLOR) {
+ }
+ else if (fromDatatype == COM_DT_VECTOR && toDatatype == COM_DT_COLOR) {
converter = new ConvertVectorToColorOperation();
}
if (converter != NULL) {
@@ -418,7 +423,8 @@
scaleY = toHeight/fromHeight;
if (scaleX < scaleY) {
scaleX = scaleY;
- } else {
+ }
+ else {
scaleY = scaleX;
}
break;
@@ -435,7 +441,7 @@
NodeOperation *first = NULL;
SocketConnection *c;
ScaleOperation * scaleOperation = NULL;
- if(doScale) {
+ if (doScale) {
scaleOperation = new ScaleOperation();
first = scaleOperation;
SetValueOperation * sxop = new SetValueOperation();
Modified: trunk/blender/source/blender/compositor/intern/COM_ExecutionGroup.cpp
===================================================================
--- trunk/blender/source/blender/compositor/intern/COM_ExecutionGroup.cpp 2012-05-17 13:30:20 UTC (rev 46731)
+++ trunk/blender/source/blender/compositor/intern/COM_ExecutionGroup.cpp 2012-05-17 13:44:15 UTC (rev 46732)
@@ -83,7 +83,8 @@
if (!this->isComplex()) {
return (!operation->isComplex());
- } else {
+ }
+ else {
return false;
}
}
@@ -101,7 +102,8 @@
ReadBufferOperation* readOperation = (ReadBufferOperation*)operation;
WriteBufferOperation* writeOperation = readOperation->getMemoryProxy()->getWriteBufferOperation();
this->addOperation(system, writeOperation);
- } else {
+ }
+ else {
unsigned int index;
for (index = 0 ; index < operation->getNumberOfInputSockets(); index ++) {
InputSocket * inputSocket = operation->getInputSocket(index);
@@ -111,7 +113,8 @@
}
}
}
- } else {
+ }
+ else {
if (operation->isWriteBufferOperation()) {
WriteBufferOperation * writeoperation = (WriteBufferOperation*)operation;
if (writeoperation->getMemoryProxy()->getExecutor() == NULL) {
@@ -124,7 +127,7 @@
}
}
-NodeOperation* ExecutionGroup::getOutputNodeOperation() const{
+NodeOperation* ExecutionGroup::getOutputNodeOperation() const {
return this->operations[0]; // the first operation of the group is always the output operation.
}
@@ -328,11 +331,13 @@
finished=false;
startEvaluated = true;
numberEvaluated++;
- } else if (state == COM_ES_SCHEDULED) {
+ }
+ else if (state == COM_ES_SCHEDULED) {
finished=false;
startEvaluated = true;
numberEvaluated++;
- } else if (state == COM_ES_EXECUTED && !startEvaluated) {
+ }
+ else if (state == COM_ES_EXECUTED && !startEvaluated) {
startIndex = index+1;
}
}
@@ -533,7 +538,8 @@
if (!group->scheduleAreaWhenPossible(graph, &area)) {
canBeExecuted = false;
}
- } else {
+ }
+ else {
throw "ERROR";
}
}
Modified: trunk/blender/source/blender/compositor/intern/COM_ExecutionSystem.cpp
===================================================================
--- trunk/blender/source/blender/compositor/intern/COM_ExecutionSystem.cpp 2012-05-17 13:30:20 UTC (rev 46731)
+++ trunk/blender/source/blender/compositor/intern/COM_ExecutionSystem.cpp 2012-05-17 13:44:15 UTC (rev 46732)
@@ -46,7 +46,8 @@
/* initialize the CompositorContext */
if (rendering) {
context.setQuality((CompositorQuality)editingtree->render_quality);
- } else {
+ }
+ else {
context.setQuality((CompositorQuality)editingtree->edit_quality);
}
context.setRendering(rendering);
@@ -77,22 +78,22 @@
ExecutionSystem::~ExecutionSystem() {
unsigned int index;
- for(index = 0; index < this->connections.size(); index++) {
+ for (index = 0; index < this->connections.size(); index++) {
SocketConnection* connection = this->connections[index];
delete connection;
}
this->connections.clear();
- for(index = 0; index < this->nodes.size(); index++) {
+ for (index = 0; index < this->nodes.size(); index++) {
Node* node = this->nodes[index];
delete node;
}
this->nodes.clear();
- for(index = 0; index < this->operations.size(); index++) {
+ for (index = 0; index < this->operations.size(); index++) {
NodeOperation* operation = this->operations[index];
delete operation;
}
this->operations.clear();
- for(index = 0; index < this->groups.size(); index++) {
+ for (index = 0; index < this->groups.size(); index++) {
ExecutionGroup* group = this->groups[index];
delete group;
}
@@ -101,7 +102,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()) {
@@ -214,7 +215,7 @@
unsigned int index;
// first determine data types of the nodes, this can be used by the node to convert to a different operation system
this->determineActualSocketDataTypes((vector<NodeBase*>&)this->nodes);
- for(index = 0; index < this->nodes.size(); index++) {
+ for (index = 0; index < this->nodes.size(); index++) {
Node* node = (Node*)this->nodes[index];
node->convertToOperations(this, &this->context);
}
@@ -258,14 +259,14 @@
NodeOperation * operation;
unsigned int index;
// surround complex operations with ReadBufferOperation and WriteBufferOperation
- for(index = 0; index < this->operations.size(); index++) {
+ for (index = 0; index < this->operations.size(); index++) {
operation = this->operations[index];
if (operation->isComplex()) {
this->addReadWriteBufferOperations(operation);
}
}
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);
@@ -283,7 +284,7 @@
void ExecutionSystem::determineActualSocketDataTypes(vector<NodeBase*> &nodes) {
unsigned int index;
/* first do all input nodes */
- for(index = 0; index < nodes.size(); index++) {
+ for (index = 0; index < nodes.size(); index++) {
NodeBase* node = nodes[index];
if (node->isInputNode()) {
node->determineActualSocketDataTypes();
@@ -291,7 +292,7 @@
}
/* then all other nodes */
- for(index = 0; index < nodes.size(); index++) {
+ for (index = 0; index < nodes.size(); index++) {
NodeBase* node = nodes[index];
if (!node->isInputNode()) {
node->determineActualSocketDataTypes();
Modified: trunk/blender/source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp
===================================================================
--- trunk/blender/source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp 2012-05-17 13:30:20 UTC (rev 46731)
+++ trunk/blender/source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp 2012-05-17 13:44:15 UTC (rev 46732)
@@ -107,13 +107,14 @@
static InputSocket* find_input(NodeRange &node_range, bNode *bnode, bNodeSocket* bsocket) {
if (bnode != NULL) {
- for(NodeIterator it=node_range.first; it!=node_range.second; ++it) {
+ for (NodeIterator it=node_range.first; it!=node_range.second; ++it) {
Node* node = *it;
if (node->getbNode() == bnode)
return node->findInputSocketBybNodeSocket(bsocket);
}
- } else {
- for(NodeIterator it=node_range.first; it!=node_range.second; ++it) {
+ }
+ else {
+ for (NodeIterator it=node_range.first; it!=node_range.second; ++it) {
Node* node = *it;
if (node->isProxyNode()) {
InputSocket *proxySocket = node->getInputSocket(0);
@@ -126,13 +127,14 @@
}
static OutputSocket* find_output(NodeRange &node_range, bNode *bnode, bNodeSocket* bsocket) {
if (bnode != NULL) {
- for(NodeIterator it=node_range.first; it!=node_range.second; ++it) {
+ for (NodeIterator it=node_range.first; it!=node_range.second; ++it) {
Node* node = *it;
if (node->getbNode() == bnode)
return node->findOutputSocketBybNodeSocket(bsocket);
}
- } else {
- for(NodeIterator it=node_range.first; it!=node_range.second; ++it) {
+ }
+ else {
+ for (NodeIterator it=node_range.first; it!=node_range.second; ++it) {
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list