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
diff options
context:
space:
mode:
-rw-r--r--intern/bsp/intern/BSP_CSGMesh_CFIterator.h4
-rw-r--r--intern/container/intern/CTR_List.cpp115
-rw-r--r--intern/ghost/intern/GHOST_DisplayManagerNULL.h2
-rw-r--r--intern/ghost/intern/GHOST_WindowNULL.h26
-rw-r--r--intern/ghost/test/multitest/EventToBuf.c2
-rw-r--r--intern/memutil/MEM_Allocator.h2
-rw-r--r--intern/memutil/MEM_RefCountPtr.h2
-rw-r--r--intern/memutil/MEM_SmartPtr.h2
-rw-r--r--intern/mikktspace/mikktspace.c44
-rw-r--r--intern/raskter/raskter.c2
-rw-r--r--intern/utfconv/utfconv.c2
-rw-r--r--source/blender/blenkernel/intern/particle_system.c2
-rw-r--r--source/blender/blenkernel/intern/writeffmpeg.c8
-rw-r--r--source/blender/blenlib/intern/math_color.c28
-rw-r--r--source/blender/blenlib/intern/string_utf8.c4
-rw-r--r--source/blender/blenloader/intern/readfile.c2
-rw-r--r--source/blender/collada/AnimationImporter.cpp2
-rw-r--r--source/blender/compositor/operations/COM_ImageOperation.cpp4
-rw-r--r--source/blender/editors/interface/interface_panel.c13
-rw-r--r--source/blender/editors/space_clip/clip_buttons.c2
-rw-r--r--source/blender/editors/space_clip/clip_editor.c10
-rw-r--r--source/blender/editors/space_clip/space_clip.c8
-rw-r--r--source/blender/editors/space_node/drawnode.c4
-rw-r--r--source/blender/editors/space_node/node_edit.c16
-rw-r--r--source/blender/editors/space_node/node_select.c2
-rw-r--r--source/blender/editors/transform/transform_conversions.c2
-rw-r--r--source/blender/gpu/intern/gpu_material.c2
-rw-r--r--source/blender/imbuf/intern/dds/ColorBlock.cpp2
-rw-r--r--source/blender/modifiers/intern/MOD_explode.c12
-rw-r--r--source/blender/modifiers/intern/MOD_solidify.c2
-rw-r--r--source/blender/nodes/intern/node_common.c2
-rw-r--r--source/blender/python/intern/bpy_library.c24
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c4
-rw-r--r--source/gameengine/Ketsji/KX_Scene.cpp8
34 files changed, 174 insertions, 192 deletions
diff --git a/intern/bsp/intern/BSP_CSGMesh_CFIterator.h b/intern/bsp/intern/BSP_CSGMesh_CFIterator.h
index cadd3df4360..928d04eda20 100644
--- a/intern/bsp/intern/BSP_CSGMesh_CFIterator.h
+++ b/intern/bsp/intern/BSP_CSGMesh_CFIterator.h
@@ -127,10 +127,10 @@ BSP_CSGMeshVertexIt_Construct(
BSP_CSGMesh_VertexIt * v_it = new BSP_CSGMesh_VertexIt;
v_it->mesh = mesh;
- if( output->num_elements > 0 )
+ if ( output->num_elements > 0 )
v_it->pos = &mesh->VertexSet()[0];
output->it = v_it;
-};
+}
/**
diff --git a/intern/container/intern/CTR_List.cpp b/intern/container/intern/CTR_List.cpp
index 2fc7b0261ef..c72d3ccf0d8 100644
--- a/intern/container/intern/CTR_List.cpp
+++ b/intern/container/intern/CTR_List.cpp
@@ -33,118 +33,95 @@
#include "CTR_List.h"
-CTR_Link::
-CTR_Link(
-) :
+CTR_Link::CTR_Link() :
m_next(0),
m_prev(0)
{
}
-CTR_Link::
-CTR_Link(
- CTR_Link *next,
- CTR_Link *prev
-) :
+CTR_Link::CTR_Link(CTR_Link *next, CTR_Link *prev) :
m_next(next),
m_prev(prev)
{
}
- CTR_Link *
-CTR_Link::
-getNext(
-) const {
+CTR_Link *
+CTR_Link::getNext() const
+{
return m_next;
}
- CTR_Link *
-CTR_Link::
-getPrev(
-) const {
+CTR_Link *
+CTR_Link::getPrev() const
+{
return m_prev;
}
- bool
-CTR_Link::
-isHead(
-) const {
+bool
+CTR_Link::isHead() const
+{
return m_prev == 0;
}
- bool
-CTR_Link::
-isTail(
-) const {
+bool
+CTR_Link::isTail() const
+{
return m_next == 0;
}
- void
-CTR_Link::
-insertBefore(
- CTR_Link *link
-) {
- m_next = link;
- m_prev = link->m_prev;
- m_next->m_prev = this;
- m_prev->m_next = this;
+void
+CTR_Link::insertBefore(CTR_Link *link)
+{
+ m_next = link;
+ m_prev = link->m_prev;
+ m_next->m_prev = this;
+ m_prev->m_next = this;
}
- void
-CTR_Link::
-insertAfter(
- CTR_Link *link
-) {
- m_next = link->m_next;
- m_prev = link;
- m_next->m_prev = this;
- m_prev->m_next = this;
+void
+CTR_Link::insertAfter(CTR_Link *link)
+{
+ m_next = link->m_next;
+ m_prev = link;
+ m_next->m_prev = this;
+ m_prev->m_next = this;
}
- void
-CTR_Link::
-remove(
-) {
- m_next->m_prev = m_prev;
- m_prev->m_next = m_next;
+void
+CTR_Link::remove()
+{
+ m_next->m_prev = m_prev;
+ m_prev->m_next = m_next;
}
-CTR_List::
-CTR_List(
-) :
+CTR_List::CTR_List() :
m_head(&m_tail, 0),
m_tail(0, &m_head)
{
}
- CTR_Link *
-CTR_List::
-getHead(
-) const {
+CTR_Link *
+CTR_List:: getHead() const
+{
return m_head.getNext();
}
- CTR_Link *
-CTR_List::
-getTail(
-) const {
+CTR_Link *
+CTR_List::getTail() const
+{
return m_tail.getPrev();
}
- void
-CTR_List::
-addHead(
- CTR_Link *link
-) {
+void
+CTR_List::addHead(CTR_Link *link)
+{
link->insertAfter(&m_head);
}
- void
-CTR_List::
-addTail(
- CTR_Link *link
-) {
+void
+CTR_List::addTail(CTR_Link *link)
+{
link->insertBefore(&m_tail);
}
diff --git a/intern/ghost/intern/GHOST_DisplayManagerNULL.h b/intern/ghost/intern/GHOST_DisplayManagerNULL.h
index eb116e30d2d..4d5a0b008dc 100644
--- a/intern/ghost/intern/GHOST_DisplayManagerNULL.h
+++ b/intern/ghost/intern/GHOST_DisplayManagerNULL.h
@@ -41,7 +41,7 @@ public:
GHOST_TSuccess getNumDisplaySettings( GHOST_TUns8 display, GHOST_TInt32& numSettings ) const{ return GHOST_kFailure; }
GHOST_TSuccess getDisplaySetting( GHOST_TUns8 display, GHOST_TInt32 index, GHOST_DisplaySetting& setting ) const { return GHOST_kFailure; }
GHOST_TSuccess getCurrentDisplaySetting( GHOST_TUns8 display, GHOST_DisplaySetting& setting ) const { return getDisplaySetting(display,GHOST_TInt32(0),setting); }
- GHOST_TSuccess setCurrentDisplaySetting( GHOST_TUns8 display, const GHOST_DisplaySetting& setting ){ return GHOST_kSuccess; }
+ GHOST_TSuccess setCurrentDisplaySetting( GHOST_TUns8 display, const GHOST_DisplaySetting& setting ) { return GHOST_kSuccess; }
private:
GHOST_SystemNULL * m_system;
diff --git a/intern/ghost/intern/GHOST_WindowNULL.h b/intern/ghost/intern/GHOST_WindowNULL.h
index cde2cb0ba76..dcbb7d2b346 100644
--- a/intern/ghost/intern/GHOST_WindowNULL.h
+++ b/intern/ghost/intern/GHOST_WindowNULL.h
@@ -60,27 +60,27 @@ public:
}
protected:
- GHOST_TSuccess installDrawingContext( GHOST_TDrawingContextType type ){ return GHOST_kSuccess; }
- GHOST_TSuccess removeDrawingContext( ){ return GHOST_kSuccess; }
- GHOST_TSuccess setWindowCursorGrab( GHOST_TGrabCursorMode mode ){ return GHOST_kSuccess; }
- GHOST_TSuccess setWindowCursorShape( GHOST_TStandardCursor shape ){ return GHOST_kSuccess; }
+ GHOST_TSuccess installDrawingContext( GHOST_TDrawingContextType type ) { return GHOST_kSuccess; }
+ GHOST_TSuccess removeDrawingContext( ) { return GHOST_kSuccess; }
+ GHOST_TSuccess setWindowCursorGrab( GHOST_TGrabCursorMode mode ) { return GHOST_kSuccess; }
+ GHOST_TSuccess setWindowCursorShape( GHOST_TStandardCursor shape ) { return GHOST_kSuccess; }
GHOST_TSuccess setWindowCustomCursorShape( GHOST_TUns8 bitmap[16][2], GHOST_TUns8 mask[16][2], int hotX, int hotY ) { return GHOST_kSuccess; }
- GHOST_TSuccess setWindowCustomCursorShape( GHOST_TUns8 *bitmap, GHOST_TUns8 *mask, int sizex, int sizey, int hotX, int hotY, int fg_color, int bg_color ){ return GHOST_kSuccess; }
+ GHOST_TSuccess setWindowCustomCursorShape( GHOST_TUns8 *bitmap, GHOST_TUns8 *mask, int sizex, int sizey, int hotX, int hotY, int fg_color, int bg_color ) { return GHOST_kSuccess; }
bool getValid( ) const { return true; }
- void setTitle( const STR_String& title ){ /* nothing */ }
+ void setTitle( const STR_String& title ) { /* nothing */ }
void getTitle( STR_String& title ) const { title= "untitled"; }
void getWindowBounds( GHOST_Rect& bounds ) const { getClientBounds(bounds); }
void getClientBounds( GHOST_Rect& bounds ) const { /* nothing */ }
- GHOST_TSuccess setClientWidth( GHOST_TUns32 width ){ return GHOST_kFailure; }
- GHOST_TSuccess setClientHeight( GHOST_TUns32 height ){ return GHOST_kFailure; }
- GHOST_TSuccess setClientSize( GHOST_TUns32 width, GHOST_TUns32 height ){ return GHOST_kFailure; }
+ GHOST_TSuccess setClientWidth( GHOST_TUns32 width ) { return GHOST_kFailure; }
+ GHOST_TSuccess setClientHeight( GHOST_TUns32 height ) { return GHOST_kFailure; }
+ GHOST_TSuccess setClientSize( GHOST_TUns32 width, GHOST_TUns32 height ) { return GHOST_kFailure; }
void screenToClient( GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY ) const { outX = inX; outY = inY; }
void clientToScreen( GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY ) const { outX = inX; outY = inY; }
- GHOST_TSuccess swapBuffers( ){ return GHOST_kFailure; }
- GHOST_TSuccess activateDrawingContext( ){ return GHOST_kFailure; }
- ~GHOST_WindowNULL( ){ /* nothing */ }
- GHOST_TSuccess setWindowCursorVisibility( bool visible ){ return GHOST_kSuccess; }
+ GHOST_TSuccess swapBuffers( ) { return GHOST_kFailure; }
+ GHOST_TSuccess activateDrawingContext( ) { return GHOST_kFailure; }
+ ~GHOST_WindowNULL( ) { /* nothing */ }
+ GHOST_TSuccess setWindowCursorVisibility( bool visible ) { return GHOST_kSuccess; }
GHOST_TSuccess setState(GHOST_TWindowState state) { return GHOST_kSuccess; }
GHOST_TWindowState getState() const { return GHOST_kWindowStateNormal; }
GHOST_TSuccess invalidate() { return GHOST_kSuccess; }
diff --git a/intern/ghost/test/multitest/EventToBuf.c b/intern/ghost/test/multitest/EventToBuf.c
index f988f0fb86a..034fbe04447 100644
--- a/intern/ghost/test/multitest/EventToBuf.c
+++ b/intern/ghost/test/multitest/EventToBuf.c
@@ -36,7 +36,7 @@
char *eventtype_to_string(GHOST_TEventType type)
{
- switch(type) {
+ switch (type) {
case GHOST_kEventCursorMove: return "CursorMove";
case GHOST_kEventButtonDown: return "ButtonDown";
case GHOST_kEventButtonUp: return "ButtonUp";
diff --git a/intern/memutil/MEM_Allocator.h b/intern/memutil/MEM_Allocator.h
index 9541604b680..0020094ebbb 100644
--- a/intern/memutil/MEM_Allocator.h
+++ b/intern/memutil/MEM_Allocator.h
@@ -72,7 +72,7 @@ struct MEM_Allocator
}
// __p is not permitted to be a null pointer.
- void deallocate(pointer __p, size_type){
+ void deallocate(pointer __p, size_type) {
MEM_freeN(__p);
}
diff --git a/intern/memutil/MEM_RefCountPtr.h b/intern/memutil/MEM_RefCountPtr.h
index 4f475345076..ffdf927b551 100644
--- a/intern/memutil/MEM_RefCountPtr.h
+++ b/intern/memutil/MEM_RefCountPtr.h
@@ -98,7 +98,7 @@
*
* static
* MEM_RefCountPtr<RcUsefullClass>
- * New(...){
+ * New(...) {
* return MEM_RefCountPtr<RcUsefullClass> output(
* new UsefullClass(...)
* );
diff --git a/intern/memutil/MEM_SmartPtr.h b/intern/memutil/MEM_SmartPtr.h
index 6a0dc1723c4..722a0a8fd3b 100644
--- a/intern/memutil/MEM_SmartPtr.h
+++ b/intern/memutil/MEM_SmartPtr.h
@@ -119,7 +119,7 @@ public :
MEM_SmartPtr(
const MEM_SmartPtr &rhs
- ){
+ ) {
m_val = rhs.Release();
}
diff --git a/intern/mikktspace/mikktspace.c b/intern/mikktspace/mikktspace.c
index 24c77c439a7..cba4c406759 100644
--- a/intern/mikktspace/mikktspace.c
+++ b/intern/mikktspace/mikktspace.c
@@ -258,7 +258,7 @@ tbool genTangSpace(const SMikkTSpaceContext * pContext, const float fAngularThre
{
const int verts = pContext->m_pInterface->m_getNumVerticesOfFace(pContext, f);
if (verts==3) ++iNrTrianglesIn;
- else if(verts==4) iNrTrianglesIn += 2;
+ else if (verts==4) iNrTrianglesIn += 2;
}
if (iNrTrianglesIn<=0) return TFALSE;
@@ -470,11 +470,11 @@ static void GenerateSharedVerticesIndexList(int piTriList_in_and_out[], const SM
const SVec3 vP = GetPosition(pContext, index);
if (vMin.x > vP.x) vMin.x = vP.x;
- else if(vMax.x < vP.x) vMax.x = vP.x;
+ else if (vMax.x < vP.x) vMax.x = vP.x;
if (vMin.y > vP.y) vMin.y = vP.y;
- else if(vMax.y < vP.y) vMax.y = vP.y;
+ else if (vMax.y < vP.y) vMax.y = vP.y;
if (vMin.z > vP.z) vMin.z = vP.z;
- else if(vMax.z < vP.z) vMax.z = vP.z;
+ else if (vMax.z < vP.z) vMax.z = vP.z;
}
vDim = vsub(vMax,vMin);
@@ -485,7 +485,7 @@ static void GenerateSharedVerticesIndexList(int piTriList_in_and_out[], const SM
iChannel=1;
fMin = vMin.y, fMax=vMax.y;
}
- else if(vDim.z>vDim.x)
+ else if (vDim.z>vDim.x)
{
iChannel=2;
fMin = vMin.z, fMax=vMax.z;
@@ -590,7 +590,7 @@ static void MergeVertsFast(int piTriList_in_and_out[], STmpVert pTmpVert[], cons
for (l=(iL_in+1); l<=iR_in; l++)
for (c=0; c<3; c++)
if (fvMin[c]>pTmpVert[l].vert[c]) fvMin[c]=pTmpVert[l].vert[c];
- else if(fvMax[c]<pTmpVert[l].vert[c]) fvMax[c]=pTmpVert[l].vert[c];
+ else if (fvMax[c]<pTmpVert[l].vert[c]) fvMax[c]=pTmpVert[l].vert[c];
dx = fvMax[0]-fvMin[0];
dy = fvMax[1]-fvMin[1];
@@ -598,7 +598,7 @@ static void MergeVertsFast(int piTriList_in_and_out[], STmpVert pTmpVert[], cons
channel = 0;
if (dy>dx && dy>dz) channel=1;
- else if(dz>dx) channel=2;
+ else if (dz>dx) channel=2;
fSep = 0.5f*(fvMax[channel]+fvMin[channel]);
@@ -626,7 +626,7 @@ static void MergeVertsFast(int piTriList_in_and_out[], STmpVert pTmpVert[], cons
const SVec3 vT2 = GetTexCoord(pContext, index2);
i2rec=i2;
- //if(vP==vP2 && vN==vN2 && vT==vT2)
+ //if (vP==vP2 && vN==vN2 && vT==vT2)
if (vP.x==vP2.x && vP.y==vP2.y && vP.z==vP2.z &&
vN.x==vN2.x && vN.y==vN2.y && vN.z==vN2.z &&
vT.x==vT2.x && vT.y==vT2.y && vT.z==vT2.z)
@@ -812,7 +812,7 @@ static int GenerateInitialVerticesIndexList(STriInfo pTriInfos[], int piTriList_
tbool bQuadDiagIs_02;
if (distSQ_02<distSQ_13)
bQuadDiagIs_02 = TTRUE;
- else if(distSQ_13<distSQ_02)
+ else if (distSQ_13<distSQ_02)
bQuadDiagIs_02 = TFALSE;
else
{
@@ -1027,7 +1027,7 @@ static void InitTriInfo(STriInfo pTriInfos[], const int piTriListIn[], const SMi
//printf("found quad with bad mapping\n");
tbool bChooseOrientFirstTri = TFALSE;
if ((pTriInfos[t+1].iFlag&GROUP_WITH_ANY)!=0) bChooseOrientFirstTri = TTRUE;
- else if( CalcTexArea(pContext, &piTriListIn[t*3+0]) >= CalcTexArea(pContext, &piTriListIn[(t+1)*3+0]) )
+ else if ( CalcTexArea(pContext, &piTriListIn[t*3+0]) >= CalcTexArea(pContext, &piTriListIn[(t+1)*3+0]) )
bChooseOrientFirstTri = TTRUE;
// force match
@@ -1142,13 +1142,13 @@ static tbool AssignRecur(const int piTriListIn[], STriInfo psTriInfos[],
const int * pVerts = &piTriListIn[3*iMyTriIndex+0];
int i=-1;
if (pVerts[0]==iVertRep) i=0;
- else if(pVerts[1]==iVertRep) i=1;
- else if(pVerts[2]==iVertRep) i=2;
+ else if (pVerts[1]==iVertRep) i=1;
+ else if (pVerts[2]==iVertRep) i=2;
assert(i>=0 && i<3);
// early out
if (pMyTriInfo->AssignedGroup[i] == pGroup) return TTRUE;
- else if(pMyTriInfo->AssignedGroup[i]!=NULL) return TFALSE;
+ else if (pMyTriInfo->AssignedGroup[i]!=NULL) return TFALSE;
if ((pMyTriInfo->iFlag&GROUP_WITH_ANY)!=0)
{
// first to group with a group-with-anything triangle
@@ -1232,8 +1232,8 @@ static tbool GenerateTSpaces(STSpace psTspace[], const STriInfo pTriInfos[], con
tbool bFound;
SVec3 n, vOs, vOt;
if (pTriInfos[f].AssignedGroup[0]==pGroup) index=0;
- else if(pTriInfos[f].AssignedGroup[1]==pGroup) index=1;
- else if(pTriInfos[f].AssignedGroup[2]==pGroup) index=2;
+ else if (pTriInfos[f].AssignedGroup[1]==pGroup) index=1;
+ else if (pTriInfos[f].AssignedGroup[2]==pGroup) index=2;
assert(index>=0 && index<3);
iVertIndex = piTriListIn[f*3+index];
@@ -1381,8 +1381,8 @@ static STSpace EvalTspace(int face_indices[], const int iFaces, const int piTriL
float fCos, fAngle, fMagS, fMagT;
int i=-1, index=-1, i0=-1, i1=-1, i2=-1;
if (piTriListIn[3*f+0]==iVertexRepresentitive) i=0;
- else if(piTriListIn[3*f+1]==iVertexRepresentitive) i=1;
- else if(piTriListIn[3*f+2]==iVertexRepresentitive) i=2;
+ else if (piTriListIn[3*f+1]==iVertexRepresentitive) i=1;
+ else if (piTriListIn[3*f+2]==iVertexRepresentitive) i=2;
assert(i>=0 && i<3);
// project
@@ -1404,8 +1404,8 @@ static STSpace EvalTspace(int face_indices[], const int iFaces, const int piTriL
v2 = vsub(p2,p1);
// project
- v1 = vsub(v1, vscale(vdot(n,v1),n)); if( VNotZero(v1) ) v1 = Normalize(v1);
- v2 = vsub(v2, vscale(vdot(n,v2),n)); if( VNotZero(v2) ) v2 = Normalize(v2);
+ v1 = vsub(v1, vscale(vdot(n,v1),n)); if ( VNotZero(v1) ) v1 = Normalize(v1);
+ v2 = vsub(v2, vscale(vdot(n,v2),n)); if ( VNotZero(v2) ) v2 = Normalize(v2);
// weight contribution by the angle
// between the two edge vectors
@@ -1647,7 +1647,7 @@ static void QuickSortEdges(SEdge * pSortBuffer, int iLeft, int iRight, const int
SEdge sTmp;
const int iElems = iRight-iLeft+1;
if (iElems<2) return;
- else if(iElems==2)
+ else if (iElems==2)
{
if (pSortBuffer[iLeft].array[channel] > pSortBuffer[iRight].array[channel])
{
@@ -1868,8 +1868,8 @@ static void DegenEpilogue(STSpace psTspace[], STriInfo pTriInfos[], int piTriLis
int iFlag = (1<<pV[0]) | (1<<pV[1]) | (1<<pV[2]);
int iMissingIndex = 0;
if ((iFlag&2)==0) iMissingIndex=1;
- else if((iFlag&4)==0) iMissingIndex=2;
- else if((iFlag&8)==0) iMissingIndex=3;
+ else if ((iFlag&4)==0) iMissingIndex=2;
+ else if ((iFlag&8)==0) iMissingIndex=3;
iOrgF = pTriInfos[t].iOrgFaceNumber;
vDstP = GetPosition(pContext, MakeIndex(iOrgF, iMissingIndex));
diff --git a/intern/raskter/raskter.c b/intern/raskter/raskter.c
index 63d37d166a0..26fec52dc80 100644
--- a/intern/raskter/raskter.c
+++ b/intern/raskter/raskter.c
@@ -306,7 +306,7 @@ int rast_scan_fill(struct r_fill_context *ctx, struct poly_vert *verts, int num_
if ((y_curr >= 0) && (y_curr < ctx->rb.sizey)) {
/* draw the pixels. */
- for (; cpxl <= mpxl; *cpxl++ = 1.0f);
+ for (; cpxl <= mpxl; *cpxl++ = 1.0f);
}
}
diff --git a/intern/utfconv/utfconv.c b/intern/utfconv/utfconv.c
index 189141e487d..a9b2920111d 100644
--- a/intern/utfconv/utfconv.c
+++ b/intern/utfconv/utfconv.c
@@ -34,7 +34,7 @@ size_t count_utf_8_from_16(const wchar_t *string16)
return 0;
}
- for (i = 0; (u = string16[i]); i++) {
+ for (i = 0; (u = string16[i]); i++) {
if (u < 0x0080) {
count += 1;
}
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index cdedd818b43..f19dfe74a36 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -2674,7 +2674,7 @@ static void basic_force_cb(void *efdata_v, ParticleKey *state, float *force, flo
force[2] += (BLI_frand()-0.5f) * part->brownfac;
}
- if(part->flag & PART_ROT_DYN && epoint.ave)
+ if (part->flag & PART_ROT_DYN && epoint.ave)
copy_v3_v3(pa->state.ave, epoint.ave);
}
/* gathers all forces that effect particles and calculates a new state for the particle */
diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
index 91e93bbd05d..40471514b48 100644
--- a/source/blender/blenkernel/intern/writeffmpeg.c
+++ b/source/blender/blenkernel/intern/writeffmpeg.c
@@ -1003,9 +1003,11 @@ void BKE_ffmpeg_end(void)
fprintf(stderr, "Closing ffmpeg...\n");
-/* if (audio_stream) { SEE UPPER
- write_audio_frames();
- }*/
+#if 0
+ if (audio_stream) { /* SEE UPPER */
+ write_audio_frames();
+ }
+#endif
#ifdef WITH_AUDASPACE
if (audio_mixdown_device) {
diff --git a/source/blender/blenlib/intern/math_color.c b/source/blender/blenlib/intern/math_color.c
index 9433cfd31df..5b034bd2872 100644
--- a/source/blender/blenlib/intern/math_color.c
+++ b/source/blender/blenlib/intern/math_color.c
@@ -285,8 +285,8 @@ void rgb_to_hsl(float r, float g, float b, float *lh, float *ls, float *ll)
else {
h = (r - g) / d + 4.0f;
}
- }
- h /= 6.0f;
+ }
+ h /= 6.0f;
*lh = h;
*ls = s;
@@ -634,23 +634,23 @@ void BLI_init_srgb_conversion(void)
}
static float inverse_srgb_companding(float v)
{
- if (v > 0.04045f) {
- return powf((v + 0.055f) / 1.055f, 2.4);
- }
- else {
- return v / 12.92f;
- }
+ if (v > 0.04045f) {
+ return powf((v + 0.055f) / 1.055f, 2.4);
+ }
+ else {
+ return v / 12.92f;
+ }
}
void rgb_to_xyz(float r, float g, float b, float *x, float *y, float *z)
{
- r = inverse_srgb_companding(r) * 100.0f;
- g = inverse_srgb_companding(g) * 100.0f;
- b = inverse_srgb_companding(b) * 100.0f;
+ r = inverse_srgb_companding(r) * 100.0f;
+ g = inverse_srgb_companding(g) * 100.0f;
+ b = inverse_srgb_companding(b) * 100.0f;
- *x = r * 0.4124 + g * 0.3576 + b * 0.1805;
- *y = r * 0.2126 + g * 0.7152 + b * 0.0722;
- *z = r * 0.0193 + g * 0.1192 + b * 0.9505;
+ *x = r * 0.4124 + g * 0.3576 + b * 0.1805;
+ *y = r * 0.2126 + g * 0.7152 + b * 0.0722;
+ *z = r * 0.0193 + g * 0.1192 + b * 0.9505;
}
static float xyz_to_lab_component(float v)
diff --git a/source/blender/blenlib/intern/string_utf8.c b/source/blender/blenlib/intern/string_utf8.c
index e9bccd4244b..9795d4dea2d 100644
--- a/source/blender/blenlib/intern/string_utf8.c
+++ b/source/blender/blenlib/intern/string_utf8.c
@@ -335,9 +335,9 @@ size_t BLI_strncpy_wchar_from_utf8(wchar_t *dst_w, const char *src_c, const size
int BLI_str_utf8_size(const char *p)
{
int mask = 0, len;
- unsigned char c = (unsigned char) *p;
+ unsigned char c = (unsigned char) *p;
- UTF8_COMPUTE (c, mask, len);
+ UTF8_COMPUTE (c, mask, len);
(void)mask; /* quiet warning */
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index a4d8457bd2d..71e9bfa33e4 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -6227,7 +6227,7 @@ static void lib_link_mask(FileData *fd, Main *main)
mask = main->mask.first;
while (mask) {
- if(mask->id.flag & LIB_NEEDLINK) {
+ if (mask->id.flag & LIB_NEEDLINK) {
MaskLayer *masklay;
if (mask->adt)
diff --git a/source/blender/collada/AnimationImporter.cpp b/source/blender/collada/AnimationImporter.cpp
index 195057817dd..45d7d4a7684 100644
--- a/source/blender/collada/AnimationImporter.cpp
+++ b/source/blender/collada/AnimationImporter.cpp
@@ -804,7 +804,7 @@ void AnimationImporter::translate_Animations ( COLLADAFW::Node * node,
bool is_joint = node->getType() == COLLADAFW::Node::JOINT;
COLLADAFW::Node *root = root_map.find(node->getUniqueId()) == root_map.end() ? node : root_map[node->getUniqueId()];
- Object *ob = is_joint ? armature_importer->get_armature_for_joint(root) : object_map.find(node->getUniqueId())->second;
+ Object *ob = is_joint ? armature_importer->get_armature_for_joint(root) : object_map.find(node->getUniqueId())->second;
if (!ob) {
fprintf(stderr, "cannot find Object for Node with id=\"%s\"\n", node->getOriginalId().c_str());
return;
diff --git a/source/blender/compositor/operations/COM_ImageOperation.cpp b/source/blender/compositor/operations/COM_ImageOperation.cpp
index 020dfdbdc14..04cd91d3c3a 100644
--- a/source/blender/compositor/operations/COM_ImageOperation.cpp
+++ b/source/blender/compositor/operations/COM_ImageOperation.cpp
@@ -99,8 +99,8 @@ void BaseImageOperation::determineResolution(unsigned int resolution[], unsigned
{
ImBuf *stackbuf = getImBuf();
- resolution[0] = 0;
- resolution[1] = 0;
+ resolution[0] = 0;
+ resolution[1] = 0;
if (stackbuf) {
resolution[0] = stackbuf->x;
diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c
index 21f87029cb0..fc6f406ab59 100644
--- a/source/blender/editors/interface/interface_panel.c
+++ b/source/blender/editors/interface/interface_panel.c
@@ -166,13 +166,14 @@ static int panels_re_align(ScrArea *sa, ARegion *ar, Panel **r_pa)
static void panels_collapse_all(ScrArea *sa, ARegion *ar)
{
- Panel *pa;
- int flag = ((panel_aligned(sa, ar)==BUT_HORIZONTAL)? PNL_CLOSEDX: PNL_CLOSEDY);
+ Panel *pa;
+ int flag = ((panel_aligned(sa, ar)==BUT_HORIZONTAL) ? PNL_CLOSEDX : PNL_CLOSEDY);
- for (pa= ar->panels.first; pa; pa= pa->next) {
- if (pa->type && !(pa->type->flag & PNL_NO_HEADER))
- pa->flag = flag;
- }
+ for (pa= ar->panels.first; pa; pa= pa->next) {
+ if (pa->type && !(pa->type->flag & PNL_NO_HEADER)) {
+ pa->flag = flag;
+ }
+ }
}
diff --git a/source/blender/editors/space_clip/clip_buttons.c b/source/blender/editors/space_clip/clip_buttons.c
index 18f191a46a6..e69e1f15b6e 100644
--- a/source/blender/editors/space_clip/clip_buttons.c
+++ b/source/blender/editors/space_clip/clip_buttons.c
@@ -168,7 +168,7 @@ void uiTemplateTrack(uiLayout *layout, PointerRNA *ptr, const char *propname)
scopes->track_preview_height = (scopes->track_preview_height <= UI_UNIT_Y)?UI_UNIT_Y : scopes->track_preview_height;
uiDefBut(block, TRACKPREVIEW, 0, "", rect.xmin, rect.ymin, rect.xmax - rect.xmin,
- scopes->track_preview_height, scopes, 0, 0, 0, 0, "");
+ scopes->track_preview_height, scopes, 0, 0, 0, 0, "");
}
/********************* Marker Template ************************/
diff --git a/source/blender/editors/space_clip/clip_editor.c b/source/blender/editors/space_clip/clip_editor.c
index 8bee06854e1..13e0a3c8b91 100644
--- a/source/blender/editors/space_clip/clip_editor.c
+++ b/source/blender/editors/space_clip/clip_editor.c
@@ -282,7 +282,7 @@ void ED_space_clip_mask_aspect(SpaceClip *sc, float *aspx, float *aspy)
*aspy *= (float)h;
#endif
- if(*aspx < *aspy) {
+ if (*aspx < *aspy) {
*aspy= *aspy / *aspx;
*aspx= 1.0f;
}
@@ -329,7 +329,7 @@ void ED_space_clip_aspect_dimension_aware(SpaceClip *sc, float *aspx, float *asp
*aspx *= (float)w;
*aspy *= (float)h;
- if(*aspx < *aspy) {
+ if (*aspx < *aspy) {
*aspy= *aspy / *aspx;
*aspx= 1.0f;
}
@@ -691,9 +691,11 @@ void ED_space_clip_set_mask(bContext *C, SpaceClip *sc, Mask *mask)
{
sc->mask = mask;
- if(sc->mask && sc->mask->id.us==0)
+ if (sc->mask && sc->mask->id.us==0) {
sc->clip->id.us = 1;
+ }
- if(C)
+ if (C) {
WM_event_add_notifier(C, NC_MASK|NA_SELECTED, mask);
+ }
}
diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c
index aec71d095f7..d61dd862096 100644
--- a/source/blender/editors/space_clip/space_clip.c
+++ b/source/blender/editors/space_clip/space_clip.c
@@ -367,14 +367,14 @@ static void clip_listener(ScrArea *sa, wmNotifier *wmn)
}
break;
case NC_MASK:
- switch(wmn->data) {
+ switch (wmn->data) {
case ND_SELECT:
case ND_DATA:
case ND_DRAW:
ED_area_tag_redraw(sa);
break;
}
- switch(wmn->action) {
+ switch (wmn->action) {
case NA_SELECTED:
clip_scopes_tag_refresh(sa);
ED_area_tag_redraw(sa);
@@ -1097,7 +1097,7 @@ static void clip_main_area_draw(const bContext *C, ARegion *ar)
/* Grease Pencil */
clip_draw_grease_pencil((bContext *)C, 1);
- if(sc->mode == SC_MODE_MASKEDIT) {
+ if (sc->mode == SC_MODE_MASKEDIT) {
int x, y;
int width, height;
float zoomx, zoomy, aspx, aspy;
@@ -1323,7 +1323,7 @@ static void clip_header_area_listener(ARegion *ar, wmNotifier *wmn)
/* for proportional editmode only */
case ND_TOOLSETTINGS:
/* TODO - should do this when in mask mode only but no datas available */
- // if(sc->mode == SC_MODE_MASKEDIT)
+ // if (sc->mode == SC_MODE_MASKEDIT)
{
ED_region_tag_redraw(ar);
}
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index aa8a68677c0..1e8541214ce 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -1114,7 +1114,7 @@ static void node_draw_reroute(const bContext *C, ARegion *ar, SpaceNode *UNUSED(
glDisable(GL_BLEND);
/* outline active and selected emphasis */
- if( node->flag & (NODE_ACTIVE|SELECT) ) {
+ if (node->flag & (NODE_ACTIVE | SELECT)) {
glEnable(GL_BLEND);
glEnable( GL_LINE_SMOOTH );
/* using different shades of TH_TEXT_HI for the empasis, like triangle */
@@ -1132,7 +1132,7 @@ static void node_draw_reroute(const bContext *C, ARegion *ar, SpaceNode *UNUSED(
/* only draw input socket. as they all are placed on the same position.
* highlight also if node itself is selected, since we don't display the node body separately!
*/
- for(sock= node->inputs.first; sock; sock= sock->next) {
+ for (sock= node->inputs.first; sock; sock= sock->next) {
node_socket_circle_draw(ntree, sock, socket_size, (sock->flag & SELECT) || (node->flag & SELECT));
}
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index 1b229c78e0f..b4e07546fa9 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -2756,11 +2756,11 @@ static int add_reroute_intersect_check(bNodeLink *link, float mcoords[][2], int
float coord_array[LINK_RESOL+1][2];
int i, b;
- if(node_link_bezier_points(NULL, NULL, link, coord_array, LINK_RESOL)) {
+ if (node_link_bezier_points(NULL, NULL, link, coord_array, LINK_RESOL)) {
- for(i=0; i<tot-1; i++)
- for(b=0; b<LINK_RESOL; b++)
- if(isect_line_line_v2(mcoords[i], mcoords[i+1], coord_array[b], coord_array[b+1]) > 0) {
+ for (i=0; i<tot-1; i++)
+ for (b=0; b<LINK_RESOL; b++)
+ if (isect_line_line_v2(mcoords[i], mcoords[i+1], coord_array[b], coord_array[b+1]) > 0) {
result[0] = (mcoords[i][0]+mcoords[i+1][0])/2.0f;
result[1] = (mcoords[i][1]+mcoords[i+1][1])/2.0f;
return 1;
@@ -2783,18 +2783,18 @@ static int add_reroute_exec(bContext *C, wmOperator *op)
UI_view2d_region_to_view(&ar->v2d, (short)loc[0], (short)loc[1],
&mcoords[i][0], &mcoords[i][1]);
i++;
- if(i>= 256) break;
+ if (i>= 256) break;
}
RNA_END;
- if(i>1) {
+ if (i>1) {
bNodeLink *link;
float insertPoint[2];
ED_preview_kill_jobs(C);
- for(link= snode->edittree->links.first; link; link=link->next) {
- if(add_reroute_intersect_check(link, mcoords, i, insertPoint)) {
+ for (link= snode->edittree->links.first; link; link=link->next) {
+ if (add_reroute_intersect_check(link, mcoords, i, insertPoint)) {
bNodeTemplate ntemp;
bNode *rerouteNode;
diff --git a/source/blender/editors/space_node/node_select.c b/source/blender/editors/space_node/node_select.c
index 0a3678ca901..e7be750928d 100644
--- a/source/blender/editors/space_node/node_select.c
+++ b/source/blender/editors/space_node/node_select.c
@@ -76,7 +76,7 @@ static bNode *node_under_mouse_tweak(bNodeTree *ntree, int mx, int my)
{
bNode *node;
- for(node=ntree->nodes.last; node; node=node->prev) {
+ for (node=ntree->nodes.last; node; node=node->prev) {
if (node->typeinfo->tweak_area_func) {
if (node->typeinfo->tweak_area_func(node, mx, my))
return node;
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index 9c6d7e49c08..9b8e5daca07 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -6035,7 +6035,7 @@ void flushTransMasking(TransInfo *t)
invy = 1.0f/aspy;
/* flush to 2d vector from internally used 3d vector */
- for(a=0, td = t->data2d, tdm = t->customData; a<t->total; a++, td++, tdm++) {
+ for (a=0, td = t->data2d, tdm = t->customData; a<t->total; a++, td++, tdm++) {
td->loc2d[0]= td->loc[0]*invx;
td->loc2d[1]= td->loc[1]*invy;
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c
index 31008ff8685..78b5219206d 100644
--- a/source/blender/gpu/intern/gpu_material.c
+++ b/source/blender/gpu/intern/gpu_material.c
@@ -772,7 +772,7 @@ static void shade_one_light(GPUShadeInput *shi, GPUShadeResult *shr, GPULamp *la
GPU_link(mat, "mtex_value_invert", shadfac, &shadfac);
GPU_link(mat, "mix_mult", shadfac, rgb, GPU_uniform(lamp->shadow_color), &rgb);
GPU_link(mat, "mtex_value_invert", shadfac, &shadfac);
- add_to_diffuse(mat, ma, shi, is, rgb, &shr->diff);
+ add_to_diffuse(mat, ma, shi, is, rgb, &shr->diff);
}
}
diff --git a/source/blender/imbuf/intern/dds/ColorBlock.cpp b/source/blender/imbuf/intern/dds/ColorBlock.cpp
index 42bec5874ca..0b9f5c163fb 100644
--- a/source/blender/imbuf/intern/dds/ColorBlock.cpp
+++ b/source/blender/imbuf/intern/dds/ColorBlock.cpp
@@ -176,7 +176,7 @@ bool ColorBlock::isSingleColorNoAlpha() const
int i;
for (i = 0; i < 16; i++)
{
- if (m_color[i].a != 0) c = m_color[i];
+ if (m_color[i].a != 0) c = m_color[i];
}
Color32 mask(0xFF, 0xFF, 0xFF, 0x00);
diff --git a/source/blender/modifiers/intern/MOD_explode.c b/source/blender/modifiers/intern/MOD_explode.c
index b69f167f876..b9593353288 100644
--- a/source/blender/modifiers/intern/MOD_explode.c
+++ b/source/blender/modifiers/intern/MOD_explode.c
@@ -205,12 +205,12 @@ static MFace *get_dface(DerivedMesh *dm, DerivedMesh *split, int cur, int i, MFa
return df;
}
-#define SET_VERTS(a, b, c, d) \
- v[0] = mf->v##a; uv[0] = a - 1; \
- v[1] = mf->v##b; uv[1] = b - 1; \
- v[2] = mf->v##c; uv[2] = c - 1; \
- v[3] = mf->v##d; uv[3] = d - 1; \
- (void)0
+#define SET_VERTS(a, b, c, d) { \
+ v[0] = mf->v##a; uv[0] = a - 1; \
+ v[1] = mf->v##b; uv[1] = b - 1; \
+ v[2] = mf->v##c; uv[2] = c - 1; \
+ v[3] = mf->v##d; uv[3] = d - 1; \
+ } (void)0
#define GET_ES(v1, v2) edgecut_get(eh, v1, v2)
#define INT_UV(uvf, c0, c1) interp_v2_v2v2(uvf, mf->uv[c0], mf->uv[c1], 0.5f)
diff --git a/source/blender/modifiers/intern/MOD_solidify.c b/source/blender/modifiers/intern/MOD_solidify.c
index 745cf1304bd..6f8e65a6e8e 100644
--- a/source/blender/modifiers/intern/MOD_solidify.c
+++ b/source/blender/modifiers/intern/MOD_solidify.c
@@ -435,7 +435,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
if (ofs_orig != 0.0f) {
scalar_short = scalar_short_vgroup = ofs_orig / 32767.0f;
- mv = mvert + (((ofs_new >= ofs_orig) == do_flip) ? 0 : numVerts); /* as above but swapped, intentional use 'ofs_new' */
+ mv = mvert + (((ofs_new >= ofs_orig) == do_flip) ? 0 : numVerts); /* as above but swapped */
dv = dvert;
for (i = 0; i < numVerts; i++, mv++) {
if (dv) {
diff --git a/source/blender/nodes/intern/node_common.c b/source/blender/nodes/intern/node_common.c
index 9f458678ae0..3d1b656fc4e 100644
--- a/source/blender/nodes/intern/node_common.c
+++ b/source/blender/nodes/intern/node_common.c
@@ -857,7 +857,7 @@ ListBase node_reroute_internal_connect(bNodeTree *ntree, bNode *node)
ret.first = ret.last = NULL;
/* Security check! */
- if(!ntree)
+ if (!ntree)
return ret;
link = MEM_callocN(sizeof(bNodeLink), "internal node link");
diff --git a/source/blender/python/intern/bpy_library.c b/source/blender/python/intern/bpy_library.c
index 1d02acbe983..d34bdfe9448 100644
--- a/source/blender/python/intern/bpy_library.c
+++ b/source/blender/python/intern/bpy_library.c
@@ -170,18 +170,18 @@ static PyTypeObject bpy_lib_Type = {
};
PyDoc_STRVAR(bpy_lib_load_doc,
- ".. method:: load(filepath, link=False, relative=False)\n"
- "\n"
- " Returns a context manager which exposes 2 library objects on entering.\n"
- " Each object has attributes matching bpy.data which are lists of strings to be linked.\n"
- "\n"
- " :arg filepath: The path to a blend file.\n"
- " :type filepath: string\n"
- " :arg link: When False reference to the original file is lost.\n"
- " :type link: bool\n"
- " :arg relative: When True the path is stored relative to the open blend file.\n"
- " :type relative: bool\n"
- );
+".. method:: load(filepath, link=False, relative=False)\n"
+"\n"
+" Returns a context manager which exposes 2 library objects on entering.\n"
+" Each object has attributes matching bpy.data which are lists of strings to be linked.\n"
+"\n"
+" :arg filepath: The path to a blend file.\n"
+" :type filepath: string\n"
+" :arg link: When False reference to the original file is lost.\n"
+" :type link: bool\n"
+" :arg relative: When True the path is stored relative to the open blend file.\n"
+" :type relative: bool\n"
+);
static PyObject *bpy_lib_load(PyObject *UNUSED(self), PyObject *args, PyObject *kwds)
{
static const char *kwlist[] = {"filepath", "link", "relative", NULL};
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index d7d55885f37..1cf58b4345b 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -2174,8 +2174,8 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op)
/* Options panel */
selected = RNA_boolean_get(op->ptr, "selected");
apply_modifiers = RNA_boolean_get(op->ptr, "apply_modifiers");
- include_bone_children = RNA_boolean_get(op->ptr, "include_bone_children");
- use_object_instantiation = RNA_boolean_get(op->ptr, "use_object_instantiation");
+ include_bone_children = RNA_boolean_get(op->ptr, "include_bone_children");
+ use_object_instantiation = RNA_boolean_get(op->ptr, "use_object_instantiation");
second_life = RNA_boolean_get(op->ptr, "second_life");
/* get editmode results */
diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp
index 4f0ae4261c9..695ad1f945c 100644
--- a/source/gameengine/Ketsji/KX_Scene.cpp
+++ b/source/gameengine/Ketsji/KX_Scene.cpp
@@ -2267,10 +2267,10 @@ KX_PYMETHODDEF_DOC(KX_Scene, addObject,
!ConvertPythonToGameObject(pyother, &other, false, "scene.addObject(object, other, time): KX_Scene (second argument)") )
return NULL;
- if (!m_inactivelist->SearchValue(ob)) {
- PyErr_Format(PyExc_ValueError, "scene.addObject(object, other, time): KX_Scene (second argument): object does not belong to scene");
- return NULL;
- }
+ if (!m_inactivelist->SearchValue(ob)) {
+ PyErr_Format(PyExc_ValueError, "scene.addObject(object, other, time): KX_Scene (second argument): object does not belong to scene");
+ return NULL;
+ }
SCA_IObject* replica = AddReplicaObject((SCA_IObject*)ob, other, time);
// release here because AddReplicaObject AddRef's