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:
authorCampbell Barton <ideasman42@gmail.com>2008-09-29 21:08:11 +0400
committerCampbell Barton <ideasman42@gmail.com>2008-09-29 21:08:11 +0400
commit2a331067cc52693aa903a0487be29c93298c4b8b (patch)
tree814fba88bc5af1de58ea6ef12958e38daa1b9fb4 /source/blender
parent7ebeceb399002076106333202ec59483fc3ed4ba (diff)
resolve some compiler warnings with intel c/c++ compiler
* subsurf code had a lot of unused variables, removed these where they are obviously not needed. commented if they could be useful later. * some variables declorations hide existing variables (many of these left), but fixed some that could cause confusion. * removed unused vars * obscure python memory leak with colorband. * make_sample_tables had a loop running wasnt used. * if 0'd functions in arithb.c that are not used yet. * made many functions static
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/BKE_writeframeserver.h2
-rw-r--r--source/blender/blenkernel/intern/CCGSubSurf.c92
-rw-r--r--source/blender/blenkernel/intern/CCGSubSurf.h28
-rw-r--r--source/blender/blenkernel/intern/DerivedMesh.c28
-rw-r--r--source/blender/blenkernel/intern/cdderivedmesh.c2
-rw-r--r--source/blender/blenkernel/intern/customdata.c7
-rw-r--r--source/blender/blenkernel/intern/displist.c2
-rw-r--r--source/blender/blenkernel/intern/idprop.c2
-rw-r--r--source/blender/blenkernel/intern/image.c2
-rw-r--r--source/blender/blenkernel/intern/modifier.c3
-rw-r--r--source/blender/blenkernel/intern/particle.c4
-rw-r--r--source/blender/blenkernel/intern/particle_system.c6
-rw-r--r--source/blender/blenkernel/intern/softbody.c44
-rw-r--r--source/blender/blenkernel/intern/subsurf_ccg.c204
-rw-r--r--source/blender/blenkernel/intern/writeframeserver.c2
-rw-r--r--source/blender/blenlib/intern/arithb.c17
-rw-r--r--source/blender/blenlib/intern/bpath.c6
-rw-r--r--source/blender/blenlib/intern/psfont.c12
-rw-r--r--source/blender/blenloader/BLO_soundfile.h2
-rw-r--r--source/blender/blenloader/intern/readfile.c12
-rw-r--r--source/blender/blenloader/intern/writefile.c8
-rw-r--r--source/blender/include/BIF_editmesh.h4
-rw-r--r--source/blender/include/BIF_editparticle.h2
-rw-r--r--source/blender/include/BIF_retopo.h18
-rw-r--r--source/blender/python/BPY_interface.c39
-rw-r--r--source/blender/python/api2_2x/Armature.c6
-rw-r--r--source/blender/python/api2_2x/Draw.c4
-rw-r--r--source/blender/python/api2_2x/Geometry.c4
-rw-r--r--source/blender/python/api2_2x/Group.c8
-rw-r--r--source/blender/python/api2_2x/IDProp.c48
-rw-r--r--source/blender/python/api2_2x/Ipo.c4
-rw-r--r--source/blender/python/api2_2x/Material.c8
-rw-r--r--source/blender/python/api2_2x/Mesh.c10
-rw-r--r--source/blender/python/api2_2x/NMesh.c4
-rw-r--r--source/blender/python/api2_2x/Object.c2
-rw-r--r--source/blender/python/api2_2x/Scene.c8
-rw-r--r--source/blender/python/api2_2x/Sys.c4
-rw-r--r--source/blender/python/api2_2x/Window.c3
-rw-r--r--source/blender/python/api2_2x/bpy_data.c12
-rw-r--r--source/blender/python/api2_2x/constant.c6
-rw-r--r--source/blender/python/api2_2x/matrix.c2
-rw-r--r--source/blender/python/api2_2x/sceneRender.c164
-rw-r--r--source/blender/python/api2_2x/sceneSequence.c8
-rw-r--r--source/blender/radiosity/intern/source/radfactors.c12
-rw-r--r--source/blender/radiosity/intern/source/radnode.c16
-rw-r--r--source/blender/radiosity/intern/source/radpreprocess.c2
-rw-r--r--source/blender/render/intern/source/convertblender.c5
-rw-r--r--source/blender/render/intern/source/initrender.c7
-rw-r--r--source/blender/render/intern/source/occlusion.c4
-rw-r--r--source/blender/render/intern/source/rayshade.c19
-rw-r--r--source/blender/render/intern/source/shadeoutput.c4
-rw-r--r--source/blender/render/intern/source/texture.c10
-rw-r--r--source/blender/src/buttons_editing.c2
-rw-r--r--source/blender/src/buttons_logic.c12
-rw-r--r--source/blender/src/drawimage.c4
-rw-r--r--source/blender/src/drawtext.c14
-rw-r--r--source/blender/src/drawview.c4
-rw-r--r--source/blender/src/edit.c8
-rw-r--r--source/blender/src/editface.c4
-rw-r--r--source/blender/src/editmesh.c2
-rw-r--r--source/blender/src/editmesh_add.c7
-rw-r--r--source/blender/src/editmesh_loop.c1
-rw-r--r--source/blender/src/editmesh_tools.c2
-rw-r--r--source/blender/src/editparticle.c2
-rw-r--r--source/blender/src/editsima.c8
-rw-r--r--source/blender/src/editsound.c11
-rw-r--r--source/blender/src/meshtools.c12
-rw-r--r--source/blender/src/parametrizer.c20
-rw-r--r--source/blender/src/retopo.c26
-rw-r--r--source/blender/src/sculptmode.c26
-rw-r--r--source/blender/src/seqaudio.c4
-rw-r--r--source/blender/src/space.c8
-rw-r--r--source/blender/src/transform_ndofinput.c8
-rw-r--r--source/blender/src/unwrapper.c3
-rw-r--r--source/blender/src/vpaint.c6
75 files changed, 540 insertions, 586 deletions
diff --git a/source/blender/blenkernel/BKE_writeframeserver.h b/source/blender/blenkernel/BKE_writeframeserver.h
index a6ece63bc56..4774906a2fa 100644
--- a/source/blender/blenkernel/BKE_writeframeserver.h
+++ b/source/blender/blenkernel/BKE_writeframeserver.h
@@ -37,7 +37,7 @@ struct RenderData;
extern void start_frameserver(struct RenderData *rd, int rectx, int recty);
extern void end_frameserver(void);
extern void append_frameserver(int frame, int *pixels, int rectx, int recty);
-extern int frameserver_loop();
+extern int frameserver_loop(void);
#ifdef __cplusplus
}
diff --git a/source/blender/blenkernel/intern/CCGSubSurf.c b/source/blender/blenkernel/intern/CCGSubSurf.c
index 1652b24e1e5..ce4458b4307 100644
--- a/source/blender/blenkernel/intern/CCGSubSurf.c
+++ b/source/blender/blenkernel/intern/CCGSubSurf.c
@@ -201,21 +201,21 @@ static CCGAllocatorIFC *_getStandardAllocatorIFC(void) {
static int VertDataEqual(float *a, float *b) {
return a[0]==b[0] && a[1]==b[1] && a[2]==b[2];
}
-#define VertDataZero(av) { float *a = (float*) av; a[0] = a[1] = a[2] = 0.0f; }
-#define VertDataCopy(av, bv) { float *a = (float*) av, *b = (float*) bv; a[0] =b[0]; a[1] =b[1]; a[2] =b[2]; }
-#define VertDataAdd(av, bv) { float *a = (float*) av, *b = (float*) bv; a[0]+=b[0]; a[1]+=b[1]; a[2]+=b[2]; }
-#define VertDataSub(av, bv) { float *a = (float*) av, *b = (float*) bv; a[0]-=b[0]; a[1]-=b[1]; a[2]-=b[2]; }
-#define VertDataMulN(av, n) { float *a = (float*) av; a[0]*=n; a[1]*=n; a[2]*=n; }
+#define VertDataZero(av) { float *_a = (float*) av; _a[0] = _a[1] = _a[2] = 0.0f; }
+#define VertDataCopy(av, bv) { float *_a = (float*) av, *_b = (float*) bv; _a[0] =_b[0]; _a[1] =_b[1]; _a[2] =_b[2]; }
+#define VertDataAdd(av, bv) { float *_a = (float*) av, *_b = (float*) bv; _a[0]+=_b[0]; _a[1]+=_b[1]; _a[2]+=_b[2]; }
+#define VertDataSub(av, bv) { float *_a = (float*) av, *_b = (float*) bv; _a[0]-=_b[0]; _a[1]-=_b[1]; _a[2]-=_b[2]; }
+#define VertDataMulN(av, n) { float *_a = (float*) av; _a[0]*=n; _a[1]*=n; _a[2]*=n; }
#define VertDataAvg4(tv, av, bv, cv, dv) \
{ \
- float *t = (float*) tv, *a = (float*) av, *b = (float*) bv, *c = (float*) cv, *d = (float*) dv; \
- t[0] = (a[0]+b[0]+c[0]+d[0])*.25; \
- t[1] = (a[1]+b[1]+c[1]+d[1])*.25; \
- t[2] = (a[2]+b[2]+c[2]+d[2])*.25; \
+ float *_t = (float*) tv, *_a = (float*) av, *_b = (float*) bv, *_c = (float*) cv, *_d = (float*) dv; \
+ _t[0] = (_a[0]+_b[0]+_c[0]+_d[0])*.25; \
+ _t[1] = (_a[1]+_b[1]+_c[1]+_d[1])*.25; \
+ _t[2] = (_a[2]+_b[2]+_c[2]+_d[2])*.25; \
}
-#define NormZero(av) { float *a = (float*) av; a[0] = a[1] = a[2] = 0.0f; }
-#define NormCopy(av, bv) { float *a = (float*) av, *b = (float*) bv; a[0] =b[0]; a[1] =b[1]; a[2] =b[2]; }
-#define NormAdd(av, bv) { float *a = (float*) av, *b = (float*) bv; a[0]+=b[0]; a[1]+=b[1]; a[2]+=b[2]; }
+#define NormZero(av) { float *_a = (float*) av; _a[0] = _a[1] = _a[2] = 0.0f; }
+#define NormCopy(av, bv) { float *_a = (float*) av, *_b = (float*) bv; _a[0] =_b[0]; _a[1] =_b[1]; _a[2] =_b[2]; }
+#define NormAdd(av, bv) { float *_a = (float*) av, *_b = (float*) bv; _a[0]+=_b[0]; _a[1]+=_b[1]; _a[2]+=_b[2]; }
static int _edge_isBoundary(CCGEdge *e);
@@ -330,7 +330,7 @@ struct _CCGSubSurf {
/***/
-static CCGVert *_vert_new(CCGVertHDL vHDL, int levels, int dataSize, CCGSubSurf *ss) {
+static CCGVert *_vert_new(CCGVertHDL vHDL, CCGSubSurf *ss) {
CCGVert *v = CCGSUBSURF_alloc(ss, sizeof(CCGVert) + ss->meshIFC.vertDataSize * (ss->subdivLevels+1) + ss->meshIFC.vertUserSize);
byte *userData;
@@ -346,7 +346,7 @@ static CCGVert *_vert_new(CCGVertHDL vHDL, int levels, int dataSize, CCGSubSurf
return v;
}
-static void _vert_remEdge(CCGVert *v, CCGEdge *e, CCGSubSurf *ss) {
+static void _vert_remEdge(CCGVert *v, CCGEdge *e) {
int i;
for (i=0; i<v->numEdges; i++) {
if (v->edges[i]==e) {
@@ -355,7 +355,7 @@ static void _vert_remEdge(CCGVert *v, CCGEdge *e, CCGSubSurf *ss) {
}
}
}
-static void _vert_remFace(CCGVert *v, CCGFace *f, CCGSubSurf *ss) {
+static void _vert_remFace(CCGVert *v, CCGFace *f) {
int i;
for (i=0; i<v->numFaces; i++) {
if (v->faces[i]==f) {
@@ -403,13 +403,13 @@ static void _vert_free(CCGVert *v, CCGSubSurf *ss) {
CCGSUBSURF_free(ss, v);
}
-static int VERT_seam(CCGVert *v, CCGSubSurf *ss) {
+static int VERT_seam(CCGVert *v) {
return ((v->flags & Vert_eSeam) != 0);
}
/***/
-static CCGEdge *_edge_new(CCGEdgeHDL eHDL, CCGVert *v0, CCGVert *v1, float crease, int levels, int dataSize, CCGSubSurf *ss) {
+static CCGEdge *_edge_new(CCGEdgeHDL eHDL, CCGVert *v0, CCGVert *v1, float crease, CCGSubSurf *ss) {
CCGEdge *e = CCGSUBSURF_alloc(ss, sizeof(CCGEdge) + ss->meshIFC.vertDataSize *((ss->subdivLevels+1) + (1<<(ss->subdivLevels+1))-1) + ss->meshIFC.edgeUserSize);
byte *userData;
@@ -429,7 +429,7 @@ static CCGEdge *_edge_new(CCGEdgeHDL eHDL, CCGVert *v0, CCGVert *v1, float creas
return e;
}
-static void _edge_remFace(CCGEdge *e, CCGFace *f, CCGSubSurf *ss) {
+static void _edge_remFace(CCGEdge *e, CCGFace *f) {
int i;
for (i=0; i<e->numFaces; i++) {
if (e->faces[i]==f) {
@@ -478,8 +478,8 @@ static void _edge_free(CCGEdge *e, CCGSubSurf *ss) {
CCGSUBSURF_free(ss, e);
}
static void _edge_unlinkMarkAndFree(CCGEdge *e, CCGSubSurf *ss) {
- _vert_remEdge(e->v0, e, ss);
- _vert_remEdge(e->v1, e, ss);
+ _vert_remEdge(e->v0, e);
+ _vert_remEdge(e->v1, e);
e->v0->flags |= Vert_eEffected;
e->v1->flags |= Vert_eEffected;
_edge_free(e, ss);
@@ -496,7 +496,7 @@ static float EDGE_getSharpness(CCGEdge *e, int lvl) {
return e->crease - lvl;
}
-static CCGFace *_face_new(CCGFaceHDL fHDL, CCGVert **verts, CCGEdge **edges, int numVerts, int levels, int dataSize, CCGSubSurf *ss) {
+static CCGFace *_face_new(CCGFaceHDL fHDL, CCGVert **verts, CCGEdge **edges, int numVerts, CCGSubSurf *ss) {
int maxGridSize = 1 + (1<<(ss->subdivLevels-1));
CCGFace *f = CCGSUBSURF_alloc(ss, sizeof(CCGFace) + sizeof(CCGVert*)*numVerts + sizeof(CCGEdge*)*numVerts + ss->meshIFC.vertDataSize *(1 + numVerts*maxGridSize + numVerts*maxGridSize*maxGridSize) + ss->meshIFC.faceUserSize);
byte *userData;
@@ -610,8 +610,8 @@ static void _face_free(CCGFace *f, CCGSubSurf *ss) {
static void _face_unlinkMarkAndFree(CCGFace *f, CCGSubSurf *ss) {
int j;
for (j=0; j<f->numVerts; j++) {
- _vert_remFace(FACE_getVerts(f)[j], f, ss);
- _edge_remFace(FACE_getEdges(f)[j], f, ss);
+ _vert_remFace(FACE_getVerts(f)[j], f);
+ _edge_remFace(FACE_getEdges(f)[j], f);
FACE_getVerts(f)[j]->flags |= Vert_eEffected;
}
_face_free(f, ss);
@@ -884,7 +884,7 @@ CCGError ccgSubSurf_syncVert(CCGSubSurf *ss, CCGVertHDL vHDL, void *vertData, in
if (ss->syncState==eSyncState_Partial) {
v = _ehash_lookupWithPrev(ss->vMap, vHDL, &prevp);
if (!v) {
- v = _vert_new(vHDL, ss->subdivLevels, ss->meshIFC.vertDataSize, ss);
+ v = _vert_new(vHDL, ss);
VertDataCopy(_vert_getCo(v,0,ss->meshIFC.vertDataSize), vertData);
_ehash_insert(ss->vMap, (EHEntry*) v);
v->flags = Vert_eEffected|seamflag;
@@ -913,7 +913,7 @@ CCGError ccgSubSurf_syncVert(CCGSubSurf *ss, CCGVertHDL vHDL, void *vertData, in
v = _ehash_lookupWithPrev(ss->oldVMap, vHDL, &prevp);
if (!v) {
- v = _vert_new(vHDL, ss->subdivLevels, ss->meshIFC.vertDataSize, ss);
+ v = _vert_new(vHDL, ss);
VertDataCopy(_vert_getCo(v,0,ss->meshIFC.vertDataSize), vertData);
_ehash_insert(ss->vMap, (EHEntry*) v);
v->flags = Vert_eEffected|seamflag;
@@ -943,7 +943,7 @@ CCGError ccgSubSurf_syncEdge(CCGSubSurf *ss, CCGEdgeHDL eHDL, CCGVertHDL e_vHDL0
CCGVert *v0 = _ehash_lookup(ss->vMap, e_vHDL0);
CCGVert *v1 = _ehash_lookup(ss->vMap, e_vHDL1);
- eNew = _edge_new(eHDL, v0, v1, crease, ss->subdivLevels, ss->meshIFC.vertDataSize, ss);
+ eNew = _edge_new(eHDL, v0, v1, crease, ss);
if (e) {
*prevp = eNew;
@@ -968,7 +968,7 @@ CCGError ccgSubSurf_syncEdge(CCGSubSurf *ss, CCGEdgeHDL eHDL, CCGVertHDL e_vHDL0
if (!e || e->v0->vHDL!=e_vHDL0 || e->v1->vHDL!=e_vHDL1|| e->crease!=crease) {
CCGVert *v0 = _ehash_lookup(ss->vMap, e_vHDL0);
CCGVert *v1 = _ehash_lookup(ss->vMap, e_vHDL1);
- e = _edge_new(eHDL, v0, v1, crease, ss->subdivLevels, ss->meshIFC.vertDataSize, ss);
+ e = _edge_new(eHDL, v0, v1, crease, ss);
_ehash_insert(ss->eMap, (EHEntry*) e);
e->v0->flags |= Vert_eEffected;
e->v1->flags |= Vert_eEffected;
@@ -1017,7 +1017,7 @@ CCGError ccgSubSurf_syncFace(CCGSubSurf *ss, CCGFaceHDL fHDL, int numVerts, CCGV
}
if (!f || topologyChanged) {
- fNew = _face_new(fHDL, ss->tempVerts, ss->tempEdges, numVerts, ss->subdivLevels, ss->meshIFC.vertDataSize, ss);
+ fNew = _face_new(fHDL, ss->tempVerts, ss->tempEdges, numVerts, ss);
if (f) {
ss->numGrids += numVerts - f->numVerts;
@@ -1054,7 +1054,7 @@ CCGError ccgSubSurf_syncFace(CCGSubSurf *ss, CCGFaceHDL fHDL, int numVerts, CCGV
if (!ss->tempEdges[k]) {
if (ss->allowEdgeCreation) {
- CCGEdge *e = ss->tempEdges[k] = _edge_new((CCGEdgeHDL) -1, ss->tempVerts[k], ss->tempVerts[(k+1)%numVerts], ss->defaultCreaseValue, ss->subdivLevels, ss->meshIFC.vertDataSize, ss);
+ CCGEdge *e = ss->tempEdges[k] = _edge_new((CCGEdgeHDL) -1, ss->tempVerts[k], ss->tempVerts[(k+1)%numVerts], ss->defaultCreaseValue, ss);
_ehash_insert(ss->eMap, (EHEntry*) e);
e->v0->flags |= Vert_eEffected;
e->v1->flags |= Vert_eEffected;
@@ -1075,7 +1075,7 @@ CCGError ccgSubSurf_syncFace(CCGSubSurf *ss, CCGFaceHDL fHDL, int numVerts, CCGV
}
if (!f || topologyChanged) {
- f = _face_new(fHDL, ss->tempVerts, ss->tempEdges, numVerts, ss->subdivLevels, ss->meshIFC.vertDataSize, ss);
+ f = _face_new(fHDL, ss->tempVerts, ss->tempEdges, numVerts, ss);
_ehash_insert(ss->fMap, (EHEntry*) f);
ss->numGrids += numVerts;
@@ -1228,7 +1228,7 @@ static void ccgSubSurf__sync(CCGSubSurf *ss) {
void *nCo = VERT_getCo(v, nextLvl);
int sharpCount = 0, allSharp = 1;
float avgSharpness = 0.0;
- int seam = VERT_seam(v, ss), seamEdges = 0;
+ int seam = VERT_seam(v), seamEdges = 0;
for (i=0; i<v->numEdges; i++) {
CCGEdge *e = v->edges[i];
@@ -1526,7 +1526,7 @@ static void ccgSubSurf__sync(CCGSubSurf *ss) {
void *nCo = VERT_getCo(v, nextLvl);
int sharpCount = 0, allSharp = 1;
float avgSharpness = 0.0;
- int seam = VERT_seam(v, ss), seamEdges = 0;
+ int seam = VERT_seam(v), seamEdges = 0;
for (i=0; i<v->numEdges; i++) {
CCGEdge *e = v->edges[i];
@@ -2071,7 +2071,7 @@ int ccgSubSurf_getGridLevelSize(CCGSubSurf *ss, int level) {
/* Vert accessors */
-CCGVertHDL ccgSubSurf_getVertVertHandle(CCGSubSurf *ss, CCGVert *v) {
+CCGVertHDL ccgSubSurf_getVertVertHandle(CCGVert *v) {
return v->vHDL;
}
int ccgSubSurf_getVertAge(CCGSubSurf *ss, CCGVert *v) {
@@ -2085,20 +2085,20 @@ int ccgSubSurf_getVertAge(CCGSubSurf *ss, CCGVert *v) {
void *ccgSubSurf_getVertUserData(CCGSubSurf *ss, CCGVert *v) {
return VERT_getLevelData(v) + ss->meshIFC.vertDataSize*(ss->subdivLevels+1);
}
-int ccgSubSurf_getVertNumFaces(CCGSubSurf *ss, CCGVert *v) {
+int ccgSubSurf_getVertNumFaces(CCGVert *v) {
return v->numFaces;
}
-CCGFace *ccgSubSurf_getVertFace(CCGSubSurf *ss, CCGVert *v, int index) {
+CCGFace *ccgSubSurf_getVertFace(CCGVert *v, int index) {
if (index<0 || index>=v->numFaces) {
return NULL;
} else {
return v->faces[index];
}
}
-int ccgSubSurf_getVertNumEdges(CCGSubSurf *ss, CCGVert *v) {
+int ccgSubSurf_getVertNumEdges(CCGVert *v) {
return v->numEdges;
}
-CCGEdge *ccgSubSurf_getVertEdge(CCGSubSurf *ss, CCGVert *v, int index) {
+CCGEdge *ccgSubSurf_getVertEdge(CCGVert *v, int index) {
if (index<0 || index>=v->numEdges) {
return NULL;
} else {
@@ -2118,7 +2118,7 @@ void *ccgSubSurf_getVertLevelData(CCGSubSurf *ss, CCGVert *v, int level) {
/* Edge accessors */
-CCGEdgeHDL ccgSubSurf_getEdgeEdgeHandle(CCGSubSurf *ss, CCGEdge *e) {
+CCGEdgeHDL ccgSubSurf_getEdgeEdgeHandle(CCGEdge *e) {
return e->eHDL;
}
int ccgSubSurf_getEdgeAge(CCGSubSurf *ss, CCGEdge *e) {
@@ -2132,20 +2132,20 @@ int ccgSubSurf_getEdgeAge(CCGSubSurf *ss, CCGEdge *e) {
void *ccgSubSurf_getEdgeUserData(CCGSubSurf *ss, CCGEdge *e) {
return EDGE_getLevelData(e) + ss->meshIFC.vertDataSize *((ss->subdivLevels+1) + (1<<(ss->subdivLevels+1))-1);
}
-int ccgSubSurf_getEdgeNumFaces(CCGSubSurf *ss, CCGEdge *e) {
+int ccgSubSurf_getEdgeNumFaces(CCGEdge *e) {
return e->numFaces;
}
-CCGFace *ccgSubSurf_getEdgeFace(CCGSubSurf *ss, CCGEdge *e, int index) {
+CCGFace *ccgSubSurf_getEdgeFace(CCGEdge *e, int index) {
if (index<0 || index>=e->numFaces) {
return NULL;
} else {
return e->faces[index];
}
}
-CCGVert *ccgSubSurf_getEdgeVert0(CCGSubSurf *ss, CCGEdge *e) {
+CCGVert *ccgSubSurf_getEdgeVert0(CCGEdge *e) {
return e->v0;
}
-CCGVert *ccgSubSurf_getEdgeVert1(CCGSubSurf *ss, CCGEdge *e) {
+CCGVert *ccgSubSurf_getEdgeVert1(CCGEdge *e) {
return e->v1;
}
void *ccgSubSurf_getEdgeDataArray(CCGSubSurf *ss, CCGEdge *e) {
@@ -2161,7 +2161,7 @@ void *ccgSubSurf_getEdgeLevelData(CCGSubSurf *ss, CCGEdge *e, int x, int level)
return _edge_getCo(e, level, x, ss->meshIFC.vertDataSize);
}
}
-float ccgSubSurf_getEdgeCrease(CCGSubSurf *ss, CCGEdge *e) {
+float ccgSubSurf_getEdgeCrease(CCGEdge *e) {
return e->crease;
}
@@ -2182,7 +2182,7 @@ void *ccgSubSurf_getFaceUserData(CCGSubSurf *ss, CCGFace *f) {
int maxGridSize = 1 + (1<<(ss->subdivLevels-1));
return FACE_getCenterData(f) + ss->meshIFC.vertDataSize *(1 + f->numVerts*maxGridSize + f->numVerts*maxGridSize*maxGridSize);
}
-int ccgSubSurf_getFaceNumVerts(CCGSubSurf *ss, CCGFace *f) {
+int ccgSubSurf_getFaceNumVerts(CCGFace *f) {
return f->numVerts;
}
CCGVert *ccgSubSurf_getFaceVert(CCGSubSurf *ss, CCGFace *f, int index) {
@@ -2199,7 +2199,7 @@ CCGEdge *ccgSubSurf_getFaceEdge(CCGSubSurf *ss, CCGFace *f, int index) {
return FACE_getEdges(f)[index];
}
}
-int ccgSubSurf_getFaceEdgeIndex(CCGSubSurf *ss, CCGFace *f, CCGEdge *e) {
+int ccgSubSurf_getFaceEdgeIndex(CCGFace *f, CCGEdge *e) {
int i;
for (i=0; i<f->numVerts; i++)
@@ -2208,7 +2208,7 @@ int ccgSubSurf_getFaceEdgeIndex(CCGSubSurf *ss, CCGFace *f, CCGEdge *e) {
return -1;
}
-void *ccgSubSurf_getFaceCenterData(CCGSubSurf *ss, CCGFace *f) {
+void *ccgSubSurf_getFaceCenterData(CCGFace *f) {
return FACE_getCenterData(f);
}
void *ccgSubSurf_getFaceGridEdgeDataArray(CCGSubSurf *ss, CCGFace *f, int gridIndex) {
diff --git a/source/blender/blenkernel/intern/CCGSubSurf.h b/source/blender/blenkernel/intern/CCGSubSurf.h
index 91f3ffab43b..fbd0aecc0a5 100644
--- a/source/blender/blenkernel/intern/CCGSubSurf.h
+++ b/source/blender/blenkernel/intern/CCGSubSurf.h
@@ -82,11 +82,11 @@ int ccgSubSurf_getGridSize (CCGSubSurf *ss);
int ccgSubSurf_getGridLevelSize (CCGSubSurf *ss, int level);
CCGVert* ccgSubSurf_getVert (CCGSubSurf *ss, CCGVertHDL v);
-CCGVertHDL ccgSubSurf_getVertVertHandle (CCGSubSurf *ss, CCGVert *v);
-int ccgSubSurf_getVertNumFaces (CCGSubSurf *ss, CCGVert *v);
-CCGFace* ccgSubSurf_getVertFace (CCGSubSurf *ss, CCGVert *v, int index);
-int ccgSubSurf_getVertNumEdges (CCGSubSurf *ss, CCGVert *v);
-CCGEdge* ccgSubSurf_getVertEdge (CCGSubSurf *ss, CCGVert *v, int index);
+CCGVertHDL ccgSubSurf_getVertVertHandle (CCGVert *v);
+int ccgSubSurf_getVertNumFaces (CCGVert *v);
+CCGFace* ccgSubSurf_getVertFace (CCGVert *v, int index);
+int ccgSubSurf_getVertNumEdges (CCGVert *v);
+CCGEdge* ccgSubSurf_getVertEdge (CCGVert *v, int index);
int ccgSubSurf_getVertAge (CCGSubSurf *ss, CCGVert *v);
void* ccgSubSurf_getVertUserData (CCGSubSurf *ss, CCGVert *v);
@@ -94,12 +94,12 @@ void* ccgSubSurf_getVertData (CCGSubSurf *ss, CCGVert *v);
void* ccgSubSurf_getVertLevelData (CCGSubSurf *ss, CCGVert *v, int level);
CCGEdge* ccgSubSurf_getEdge (CCGSubSurf *ss, CCGEdgeHDL e);
-CCGEdgeHDL ccgSubSurf_getEdgeEdgeHandle (CCGSubSurf *ss, CCGEdge *e);
-int ccgSubSurf_getEdgeNumFaces (CCGSubSurf *ss, CCGEdge *e);
-CCGFace* ccgSubSurf_getEdgeFace (CCGSubSurf *ss, CCGEdge *e, int index);
-CCGVert* ccgSubSurf_getEdgeVert0 (CCGSubSurf *ss, CCGEdge *e);
-CCGVert* ccgSubSurf_getEdgeVert1 (CCGSubSurf *ss, CCGEdge *e);
-float ccgSubSurf_getEdgeCrease (CCGSubSurf *ss, CCGEdge *e);
+CCGEdgeHDL ccgSubSurf_getEdgeEdgeHandle (CCGEdge *e);
+int ccgSubSurf_getEdgeNumFaces (CCGEdge *e);
+CCGFace* ccgSubSurf_getEdgeFace (CCGEdge *e, int index);
+CCGVert* ccgSubSurf_getEdgeVert0 (CCGEdge *e);
+CCGVert* ccgSubSurf_getEdgeVert1 (CCGEdge *e);
+float ccgSubSurf_getEdgeCrease (CCGEdge *e);
int ccgSubSurf_getEdgeAge (CCGSubSurf *ss, CCGEdge *e);
void* ccgSubSurf_getEdgeUserData (CCGSubSurf *ss, CCGEdge *e);
@@ -109,14 +109,14 @@ void* ccgSubSurf_getEdgeLevelData (CCGSubSurf *ss, CCGEdge *e, int x, int lev
CCGFace* ccgSubSurf_getFace (CCGSubSurf *ss, CCGFaceHDL f);
CCGFaceHDL ccgSubSurf_getFaceFaceHandle (CCGSubSurf *ss, CCGFace *f);
-int ccgSubSurf_getFaceNumVerts (CCGSubSurf *ss, CCGFace *f);
+int ccgSubSurf_getFaceNumVerts (CCGFace *f);
CCGVert* ccgSubSurf_getFaceVert (CCGSubSurf *ss, CCGFace *f, int index);
CCGEdge* ccgSubSurf_getFaceEdge (CCGSubSurf *ss, CCGFace *f, int index);
-int ccgSubSurf_getFaceEdgeIndex (CCGSubSurf *ss, CCGFace *f, CCGEdge *e);
+int ccgSubSurf_getFaceEdgeIndex (CCGFace *f, CCGEdge *e);
int ccgSubSurf_getFaceAge (CCGSubSurf *ss, CCGFace *f);
void* ccgSubSurf_getFaceUserData (CCGSubSurf *ss, CCGFace *f);
-void* ccgSubSurf_getFaceCenterData (CCGSubSurf *ss, CCGFace *f);
+void* ccgSubSurf_getFaceCenterData (CCGFace *f);
void* ccgSubSurf_getFaceGridEdgeDataArray (CCGSubSurf *ss, CCGFace *f, int gridIndex);
void* ccgSubSurf_getFaceGridEdgeData (CCGSubSurf *ss, CCGFace *f, int gridIndex, int x);
void* ccgSubSurf_getFaceGridDataArray (CCGSubSurf *ss, CCGFace *f, int gridIndex);
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c
index 569229cb8ab..d4b17f97ad9 100644
--- a/source/blender/blenkernel/intern/DerivedMesh.c
+++ b/source/blender/blenkernel/intern/DerivedMesh.c
@@ -94,7 +94,7 @@
///////////////////////////////////
///////////////////////////////////
-MVert *dm_getVertArray(DerivedMesh *dm)
+static MVert *dm_getVertArray(DerivedMesh *dm)
{
MVert *mvert = CustomData_get_layer(&dm->vertData, CD_MVERT);
@@ -108,7 +108,7 @@ MVert *dm_getVertArray(DerivedMesh *dm)
return mvert;
}
-MEdge *dm_getEdgeArray(DerivedMesh *dm)
+static MEdge *dm_getEdgeArray(DerivedMesh *dm)
{
MEdge *medge = CustomData_get_layer(&dm->edgeData, CD_MEDGE);
@@ -122,7 +122,7 @@ MEdge *dm_getEdgeArray(DerivedMesh *dm)
return medge;
}
-MFace *dm_getFaceArray(DerivedMesh *dm)
+static MFace *dm_getFaceArray(DerivedMesh *dm)
{
MFace *mface = CustomData_get_layer(&dm->faceData, CD_MFACE);
@@ -136,7 +136,7 @@ MFace *dm_getFaceArray(DerivedMesh *dm)
return mface;
}
-MVert *dm_dupVertArray(DerivedMesh *dm)
+static MVert *dm_dupVertArray(DerivedMesh *dm)
{
MVert *tmp = MEM_callocN(sizeof(*tmp) * dm->getNumVerts(dm),
"dm_dupVertArray tmp");
@@ -146,7 +146,7 @@ MVert *dm_dupVertArray(DerivedMesh *dm)
return tmp;
}
-MEdge *dm_dupEdgeArray(DerivedMesh *dm)
+static MEdge *dm_dupEdgeArray(DerivedMesh *dm)
{
MEdge *tmp = MEM_callocN(sizeof(*tmp) * dm->getNumEdges(dm),
"dm_dupEdgeArray tmp");
@@ -156,7 +156,7 @@ MEdge *dm_dupEdgeArray(DerivedMesh *dm)
return tmp;
}
-MFace *dm_dupFaceArray(DerivedMesh *dm)
+static MFace *dm_dupFaceArray(DerivedMesh *dm)
{
MFace *tmp = MEM_callocN(sizeof(*tmp) * dm->getNumFaces(dm),
"dm_dupFaceArray tmp");
@@ -912,8 +912,8 @@ static void emDM_drawMappedFacesGLSL(DerivedMesh *dm,
glVertexAttrib3fvARB(attribs.orco.glIndex, orco); \
} \
for(b = 0; b < attribs.tottface; b++) { \
- MTFace *tf = (MTFace*)((char*)efa->data + attribs.tface[b].emOffset); \
- glVertexAttrib2fvARB(attribs.tface[b].glIndex, tf->uv[vert]); \
+ MTFace *_tf = (MTFace*)((char*)efa->data + attribs.tface[b].emOffset); \
+ glVertexAttrib2fvARB(attribs.tface[b].glIndex, _tf->uv[vert]); \
} \
for(b = 0; b < attribs.totmcol; b++) { \
MCol *cp = (MCol*)((char*)efa->data + attribs.mcol[b].emOffset); \
@@ -1069,7 +1069,7 @@ static int emDM_getNumFaces(DerivedMesh *dm)
return BLI_countlist(&emdm->em->faces);
}
-void emDM_getVert(DerivedMesh *dm, int index, MVert *vert_r)
+static void emDM_getVert(DerivedMesh *dm, int index, MVert *vert_r)
{
EditVert *ev = ((EditMeshDerivedMesh *)dm)->em->verts.first;
int i;
@@ -1087,7 +1087,7 @@ void emDM_getVert(DerivedMesh *dm, int index, MVert *vert_r)
vert_r->bweight = (unsigned char) (ev->bweight*255.0f);
}
-void emDM_getEdge(DerivedMesh *dm, int index, MEdge *edge_r)
+static void emDM_getEdge(DerivedMesh *dm, int index, MEdge *edge_r)
{
EditMesh *em = ((EditMeshDerivedMesh *)dm)->em;
EditEdge *ee = em->edges.first;
@@ -1122,7 +1122,7 @@ void emDM_getEdge(DerivedMesh *dm, int index, MEdge *edge_r)
}
}
-void emDM_getFace(DerivedMesh *dm, int index, MFace *face_r)
+static void emDM_getFace(DerivedMesh *dm, int index, MFace *face_r)
{
EditMesh *em = ((EditMeshDerivedMesh *)dm)->em;
EditFace *ef = em->faces.first;
@@ -1164,7 +1164,7 @@ void emDM_getFace(DerivedMesh *dm, int index, MFace *face_r)
test_index_face(face_r, NULL, 0, ef->v4?4:3);
}
-void emDM_copyVertArray(DerivedMesh *dm, MVert *vert_r)
+static void emDM_copyVertArray(DerivedMesh *dm, MVert *vert_r)
{
EditVert *ev = ((EditMeshDerivedMesh *)dm)->em->verts.first;
@@ -1182,7 +1182,7 @@ void emDM_copyVertArray(DerivedMesh *dm, MVert *vert_r)
}
}
-void emDM_copyEdgeArray(DerivedMesh *dm, MEdge *edge_r)
+static void emDM_copyEdgeArray(DerivedMesh *dm, MEdge *edge_r)
{
EditMesh *em = ((EditMeshDerivedMesh *)dm)->em;
EditEdge *ee = em->edges.first;
@@ -1210,7 +1210,7 @@ void emDM_copyEdgeArray(DerivedMesh *dm, MEdge *edge_r)
}
}
-void emDM_copyFaceArray(DerivedMesh *dm, MFace *face_r)
+static void emDM_copyFaceArray(DerivedMesh *dm, MFace *face_r)
{
EditMesh *em = ((EditMeshDerivedMesh *)dm)->em;
EditFace *ef = em->faces.first;
diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c
index c30d86431b1..2c1b5ced614 100644
--- a/source/blender/blenkernel/intern/cdderivedmesh.c
+++ b/source/blender/blenkernel/intern/cdderivedmesh.c
@@ -121,7 +121,7 @@ static void cdDM_copyEdgeArray(DerivedMesh *dm, MEdge *edge_r)
memcpy(edge_r, cddm->medge, sizeof(*edge_r) * dm->numEdgeData);
}
-void cdDM_copyFaceArray(DerivedMesh *dm, MFace *face_r)
+static void cdDM_copyFaceArray(DerivedMesh *dm, MFace *face_r)
{
CDDerivedMesh *cddm = (CDDerivedMesh *)dm;
memcpy(face_r, cddm->mface, sizeof(*face_r) * dm->numFaceData);
diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c
index 2c1f6bb84c1..e93266c85f3 100644
--- a/source/blender/blenkernel/intern/customdata.c
+++ b/source/blender/blenkernel/intern/customdata.c
@@ -265,9 +265,9 @@ static void layerSwap_tface(void *data, int *corner_indices)
{
MTFace *tf = data;
float uv[4][2];
- const static short pin_flags[4] =
+ static const short pin_flags[4] =
{ TF_PIN1, TF_PIN2, TF_PIN3, TF_PIN4 };
- const static char sel_flags[4] =
+ static const char sel_flags[4] =
{ TF_SEL1, TF_SEL2, TF_SEL3, TF_SEL4 };
short unwrap = tf->unwrap & ~(TF_PIN1 | TF_PIN2 | TF_PIN3 | TF_PIN4);
char flag = tf->flag & ~(TF_SEL1 | TF_SEL2 | TF_SEL3 | TF_SEL4);
@@ -926,12 +926,9 @@ void *CustomData_add_layer_named(CustomData *data, int type, int alloctype,
int CustomData_free_layer(CustomData *data, int type, int totelem, int index)
{
int i;
- CustomDataLayer *layer;
if (index < 0) return 0;
- layer = &data->layers[index];
-
customData_free_layer__internal(&data->layers[index], totelem);
for (i=index+1; i < data->totlayer; ++i)
diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c
index f67fcd7a1b7..be24d1d2474 100644
--- a/source/blender/blenkernel/intern/displist.c
+++ b/source/blender/blenkernel/intern/displist.c
@@ -1234,7 +1234,7 @@ void curve_calc_modifiers_pre(Object *ob, ListBase *nurb, int forRender, float (
*numVerts_r = numVerts;
}
-void curve_calc_modifiers_post(Object *ob, ListBase *nurb, ListBase *dispbase, int forRender, float (*originalVerts)[3], float (*deformedVerts)[3])
+static void curve_calc_modifiers_post(Object *ob, ListBase *nurb, ListBase *dispbase, int forRender, float (*originalVerts)[3], float (*deformedVerts)[3])
{
int editmode = (!forRender && ob==G.obedit);
ModifierData *md = modifiers_getVirtualModifierList(ob);
diff --git a/source/blender/blenkernel/intern/idprop.c b/source/blender/blenkernel/intern/idprop.c
index b16f52571f6..0a140ebaba1 100644
--- a/source/blender/blenkernel/intern/idprop.c
+++ b/source/blender/blenkernel/intern/idprop.c
@@ -317,7 +317,7 @@ void IDP_FreeIterBeforeEnd(void *vself)
This is because all ID Property freeing functions free only direct data (not the ID Property
struct itself), but for Groups the child properties *are* considered
direct data.*/
-void IDP_FreeGroup(IDProperty *prop)
+static void IDP_FreeGroup(IDProperty *prop)
{
IDProperty *loop, *next;
for (loop=prop->data.group.first; loop; loop=next)
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index 27fa00ac239..18570515057 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -585,7 +585,7 @@ void tag_image_time(Image *ima)
ima->lastused = (int)PIL_check_seconds_timer();
}
-void tag_all_images_time()
+static void tag_all_images_time()
{
Image *ima;
int ctime = (int)PIL_check_seconds_timer();
diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c
index 5ef7f985435..0822042f855 100644
--- a/source/blender/blenkernel/intern/modifier.c
+++ b/source/blender/blenkernel/intern/modifier.c
@@ -7063,7 +7063,6 @@ static DerivedMesh * explodeModifier_explodeMesh(ExplodeModifierData *emd,
{
DerivedMesh *explode, *dm=to_explode;
MFace *mf=0;
- MVert *dupvert=0;
ParticleSettings *part=psmd->psys->part;
ParticleData *pa=NULL, *pars=psmd->psys->particles;
ParticleKey state;
@@ -7118,7 +7117,7 @@ static DerivedMesh * explodeModifier_explodeMesh(ExplodeModifierData *emd,
/* the final duplicated vertices */
explode= CDDM_from_template(dm, totdup, 0,totface);
- dupvert= CDDM_get_verts(explode);
+ /*dupvert= CDDM_get_verts(explode);*/
/* getting back to object space */
Mat4Invert(imat,ob->obmat);
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index f6bfaf14b7e..02c06b94b6c 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -1368,7 +1368,7 @@ ParticleSystemModifierData *psys_get_modifier(Object *ob, ParticleSystem *psys)
/* Particles on a shape */
/************************************************/
/* ready for future use */
-void psys_particle_on_shape(int distr, int index, float *fuv, float *vec, float *nor, float *utan, float *vtan, float *orco, float *ornor)
+static void psys_particle_on_shape(int distr, int index, float *fuv, float *vec, float *nor, float *utan, float *vtan, float *orco, float *ornor)
{
/* TODO */
float zerovec[3]={0.0f,0.0f,0.0f};
@@ -2268,7 +2268,7 @@ void psys_thread_create_path(ParticleThread *thread, struct ChildParticle *cpa,
}
}
-void *exec_child_path_cache(void *data)
+static void *exec_child_path_cache(void *data)
{
ParticleThread *thread= (ParticleThread*)data;
ParticleThreadContext *ctx= thread->ctx;
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index ef675c1c791..3aac1b5f4a5 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -864,7 +864,7 @@ void psys_thread_distribute_particle(ParticleThread *thread, ParticleData *pa, C
}
}
-void *exec_distribution(void *data)
+static void *exec_distribution(void *data)
{
ParticleThread *thread= (ParticleThread*)data;
ParticleSystem *psys= thread->ctx->psys;
@@ -3877,7 +3877,7 @@ static void boid_body(BoidVecFunc *bvf, ParticleData *pa, ParticleSystem *psys,
/************************************************/
/* Hair */
/************************************************/
-void save_hair(Object *ob, ParticleSystem *psys, ParticleSystemModifierData *psmd, float cfra){
+static void save_hair(Object *ob, ParticleSystem *psys, ParticleSystemModifierData *psmd, float cfra){
ParticleData *pa;
HairKey *key;
int totpart;
@@ -4643,7 +4643,7 @@ static void system_step(Object *ob, ParticleSystem *psys, ParticleSystemModifier
}
}
-void psys_to_softbody(Object *ob, ParticleSystem *psys)
+static void psys_to_softbody(Object *ob, ParticleSystem *psys)
{
SoftBody *sb;
short softflag;
diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c
index 508b2233536..5d93f10526a 100644
--- a/source/blender/blenkernel/intern/softbody.c
+++ b/source/blender/blenkernel/intern/softbody.c
@@ -236,7 +236,7 @@ typedef struct ccd_Mesh {
-ccd_Mesh *ccd_mesh_make(Object *ob, DerivedMesh *dm)
+static ccd_Mesh *ccd_mesh_make(Object *ob, DerivedMesh *dm)
{
ccd_Mesh *pccd_M = NULL;
ccdf_minmax *mima =NULL;
@@ -333,7 +333,7 @@ ccd_Mesh *ccd_mesh_make(Object *ob, DerivedMesh *dm)
}
return pccd_M;
}
-void ccd_mesh_update(Object *ob,ccd_Mesh *pccd_M, DerivedMesh *dm)
+static void ccd_mesh_update(Object *ob,ccd_Mesh *pccd_M, DerivedMesh *dm)
{
ccdf_minmax *mima =NULL;
MFace *mface=NULL;
@@ -472,7 +472,7 @@ void ccd_mesh_update(Object *ob,ccd_Mesh *pccd_M, DerivedMesh *dm)
return ;
}
-void ccd_mesh_free(ccd_Mesh *ccdm)
+static void ccd_mesh_free(ccd_Mesh *ccdm)
{
if(ccdm && (ccdm->savety == CCD_SAVETY )){ /*make sure we're not nuking objects we don't know*/
MEM_freeN(ccdm->mface);
@@ -484,7 +484,7 @@ void ccd_mesh_free(ccd_Mesh *ccdm)
}
}
-void ccd_build_deflector_hache(Object *vertexowner,GHash *hash)
+static void ccd_build_deflector_hache(Object *vertexowner,GHash *hash)
{
Base *base;
Object *ob;
@@ -536,7 +536,7 @@ void ccd_build_deflector_hache(Object *vertexowner,GHash *hash)
} /* while (base) */
}
-void ccd_update_deflector_hache(Object *vertexowner,GHash *hash)
+static void ccd_update_deflector_hache(Object *vertexowner,GHash *hash)
{
Base *base;
Object *ob;
@@ -991,7 +991,7 @@ static int query_external_colliders(Object *me)
/* +++ the aabb "force" section*/
-int sb_detect_aabb_collisionCached( float force[3], unsigned int par_layer,struct Object *vertexowner,float time)
+static int sb_detect_aabb_collisionCached( float force[3], unsigned int par_layer,struct Object *vertexowner,float time)
{
Object *ob;
SoftBody *sb=vertexowner->soft;
@@ -1055,7 +1055,7 @@ int sb_detect_aabb_collisionCached( float force[3], unsigned int par_layer,struc
/* +++ the face external section*/
-int sb_detect_face_pointCached(float face_v1[3],float face_v2[3],float face_v3[3],float *damp,
+static int sb_detect_face_pointCached(float face_v1[3],float face_v2[3],float face_v3[3],float *damp,
float force[3], unsigned int par_layer,struct Object *vertexowner,float time)
{
Object *ob;
@@ -1153,7 +1153,7 @@ int sb_detect_face_pointCached(float face_v1[3],float face_v2[3],float face_v3[3
}
-int sb_detect_face_collisionCached(float face_v1[3],float face_v2[3],float face_v3[3],float *damp,
+static int sb_detect_face_collisionCached(float face_v1[3],float face_v2[3],float face_v3[3],float *damp,
float force[3], unsigned int par_layer,struct Object *vertexowner,float time)
{
Object *ob;
@@ -1291,7 +1291,7 @@ int sb_detect_face_collisionCached(float face_v1[3],float face_v2[3],float face_
-void scan_for_ext_face_forces(Object *ob,float timenow)
+static void scan_for_ext_face_forces(Object *ob,float timenow)
{
SoftBody *sb = ob->soft;
BodyFace *bf;
@@ -1379,7 +1379,7 @@ void scan_for_ext_face_forces(Object *ob,float timenow)
/* +++ the spring external section*/
-int sb_detect_edge_collisionCached(float edge_v1[3],float edge_v2[3],float *damp,
+static int sb_detect_edge_collisionCached(float edge_v1[3],float edge_v2[3],float *damp,
float force[3], unsigned int par_layer,struct Object *vertexowner,float time)
{
Object *ob;
@@ -1530,7 +1530,7 @@ int sb_detect_edge_collisionCached(float edge_v1[3],float edge_v2[3],float *damp
-void _scan_for_ext_spring_forces(Object *ob,float timenow,int ifirst,int ilast, struct ListBase *do_effector)
+static void _scan_for_ext_spring_forces(Object *ob,float timenow,int ifirst,int ilast, struct ListBase *do_effector)
{
SoftBody *sb = ob->soft;
int a;
@@ -1601,7 +1601,7 @@ void _scan_for_ext_spring_forces(Object *ob,float timenow,int ifirst,int ilast,
}
-void scan_for_ext_spring_forces(Object *ob,float timenow)
+static void scan_for_ext_spring_forces(Object *ob,float timenow)
{
SoftBody *sb = ob->soft;
ListBase *do_effector= NULL;
@@ -1613,14 +1613,14 @@ void scan_for_ext_spring_forces(Object *ob,float timenow)
pdEndEffectors(do_effector);
}
-void *exec_scan_for_ext_spring_forces(void *data)
+static void *exec_scan_for_ext_spring_forces(void *data)
{
SB_thread_context *pctx = (SB_thread_context*)data;
_scan_for_ext_spring_forces(pctx->ob,pctx->timenow,pctx->ifirst,pctx->ilast,pctx->do_effector);
return 0;
}
-void sb_sfesf_threads_run(struct Object *ob, float timenow,int totsprings,int *ptr_to_break_func())
+static void sb_sfesf_threads_run(struct Object *ob, float timenow,int totsprings,int *ptr_to_break_func())
{
ListBase *do_effector = NULL;
ListBase threads;
@@ -1682,7 +1682,7 @@ void sb_sfesf_threads_run(struct Object *ob, float timenow,int totsprings,int *p
/* --- the spring external section*/
-int choose_winner(float*w, float* pos,float*a,float*b,float*c,float*ca,float*cb,float*cc)
+static int choose_winner(float*w, float* pos,float*a,float*b,float*c,float*ca,float*cb,float*cc)
{
float mindist,cp;
int winner =1;
@@ -1709,7 +1709,7 @@ int choose_winner(float*w, float* pos,float*a,float*b,float*c,float*ca,float*cb,
-int sb_detect_vertex_collisionCached(float opco[3], float facenormal[3], float *damp,
+static int sb_detect_vertex_collisionCached(float opco[3], float facenormal[3], float *damp,
float force[3], unsigned int par_layer,struct Object *vertexowner,
float time,float vel[3], float *intrusion)
{
@@ -2119,7 +2119,7 @@ static void sb_spring_force(Object *ob,int bpi,BodySpring *bs,float iks,float fo
/* since this is definitely the most CPU consuming task here .. try to spread it */
/* core function _softbody_calc_forces_slice_in_a_thread */
/* result is int to be able to flag user break */
-int _softbody_calc_forces_slice_in_a_thread(Object *ob, float forcetime, float timenow,int ifirst,int ilast,int *ptr_to_break_func(),ListBase *do_effector,int do_deflector,float fieldfactor, float windfactor)
+static int _softbody_calc_forces_slice_in_a_thread(Object *ob, float forcetime, float timenow,int ifirst,int ilast,int *ptr_to_break_func(),ListBase *do_effector,int do_deflector,float fieldfactor, float windfactor)
{
float iks;
int bb,do_selfcollision,do_springcollision,do_aero;
@@ -2319,14 +2319,14 @@ int _softbody_calc_forces_slice_in_a_thread(Object *ob, float forcetime, float t
return 0; /*done fine*/
}
-void *exec_softbody_calc_forces(void *data)
+static void *exec_softbody_calc_forces(void *data)
{
SB_thread_context *pctx = (SB_thread_context*)data;
_softbody_calc_forces_slice_in_a_thread(pctx->ob,pctx->forcetime,pctx->timenow,pctx->ifirst,pctx->ilast,NULL,pctx->do_effector,pctx->do_deflector,pctx->fieldfactor,pctx->windfactor);
return 0;
}
-void sb_cf_threads_run(struct Object *ob, float forcetime, float timenow,int totpoint,int *ptr_to_break_func(),struct ListBase *do_effector,int do_deflector,float fieldfactor, float windfactor)
+static void sb_cf_threads_run(struct Object *ob, float forcetime, float timenow,int totpoint,int *ptr_to_break_func(),struct ListBase *do_effector,int do_deflector,float fieldfactor, float windfactor)
{
ListBase threads;
SB_thread_context *sb_threads;
@@ -3067,7 +3067,7 @@ static void softbody_apply_goalsnap(Object *ob)
}
-void apply_spring_memory(Object *ob)
+static void apply_spring_memory(Object *ob)
{
SoftBody *sb = ob->soft;
BodySpring *bs;
@@ -3293,7 +3293,7 @@ static void mesh_faces_to_scratch(Object *ob)
helper function to get proper spring length
when object is rescaled
*/
-float globallen(float *v1,float *v2,Object *ob)
+static float globallen(float *v1,float *v2,Object *ob)
{
float p1[3],p2[3];
VECCOPY(p1,v1);
@@ -3711,7 +3711,7 @@ static int softbody_read_cache(Object *ob, float framenr)
}
/* +++ ************ maintaining scratch *************** */
-void sb_new_scratch(SoftBody *sb)
+static void sb_new_scratch(SoftBody *sb)
{
if (!sb) return;
sb->scratch = MEM_callocN(sizeof(SBScratch), "SBScratch");
diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c
index e6797186b53..f79009e673d 100644
--- a/source/blender/blenkernel/intern/subsurf_ccg.c
+++ b/source/blender/blenkernel/intern/subsurf_ccg.c
@@ -86,9 +86,9 @@ struct CCGDerivedMesh {
typedef struct CCGDerivedMesh CCGDerivedMesh;
-static int ccgDM_getVertMapIndex(CCGDerivedMesh *ccgdm, CCGSubSurf *ss, CCGVert *v);
-static int ccgDM_getEdgeMapIndex(CCGDerivedMesh *ccgdm, CCGSubSurf *ss, CCGEdge *e);
-static int ccgDM_getFaceMapIndex(CCGDerivedMesh *ccgdm, CCGSubSurf *ss, CCGFace *f);
+static int ccgDM_getVertMapIndex(CCGSubSurf *ss, CCGVert *v);
+static int ccgDM_getEdgeMapIndex(CCGSubSurf *ss, CCGEdge *e);
+static int ccgDM_getFaceMapIndex(CCGSubSurf *ss, CCGFace *f);
///
@@ -161,8 +161,8 @@ static CCGSubSurf *_getSubSurf(CCGSubSurf *prevSS, int subdivLevels, int useAgin
}
static int getEdgeIndex(CCGSubSurf *ss, CCGEdge *e, int x, int edgeSize) {
- CCGVert *v0 = ccgSubSurf_getEdgeVert0(ss, e);
- CCGVert *v1 = ccgSubSurf_getEdgeVert1(ss, e);
+ CCGVert *v0 = ccgSubSurf_getEdgeVert0(e);
+ CCGVert *v1 = ccgSubSurf_getEdgeVert1(e);
int v0idx = *((int*) ccgSubSurf_getVertUserData(ss, v0));
int v1idx = *((int*) ccgSubSurf_getVertUserData(ss, v1));
int edgeBase = *((int*) ccgSubSurf_getEdgeUserData(ss, e));
@@ -177,7 +177,7 @@ static int getEdgeIndex(CCGSubSurf *ss, CCGEdge *e, int x, int edgeSize) {
}
static int getFaceIndex(CCGSubSurf *ss, CCGFace *f, int S, int x, int y, int edgeSize, int gridSize) {
int faceBase = *((int*) ccgSubSurf_getFaceUserData(ss, f));
- int numVerts = ccgSubSurf_getFaceNumVerts(ss, f);
+ int numVerts = ccgSubSurf_getFaceNumVerts(f);
if (x==gridSize-1 && y==gridSize-1) {
CCGVert *v = ccgSubSurf_getFaceVert(ss, f, S);
@@ -186,7 +186,7 @@ static int getFaceIndex(CCGSubSurf *ss, CCGFace *f, int S, int x, int y, int edg
CCGVert *v = ccgSubSurf_getFaceVert(ss, f, S);
CCGEdge *e = ccgSubSurf_getFaceEdge(ss, f, S);
int edgeBase = *((int*) ccgSubSurf_getEdgeUserData(ss, e));
- if (v==ccgSubSurf_getEdgeVert0(ss, e)) {
+ if (v==ccgSubSurf_getEdgeVert0(e)) {
return edgeBase + (gridSize-1-y)-1;
} else {
return edgeBase + (edgeSize-2-1)-((gridSize-1-y)-1);
@@ -195,7 +195,7 @@ static int getFaceIndex(CCGSubSurf *ss, CCGFace *f, int S, int x, int y, int edg
CCGVert *v = ccgSubSurf_getFaceVert(ss, f, S);
CCGEdge *e = ccgSubSurf_getFaceEdge(ss, f, (S+numVerts-1)%numVerts);
int edgeBase = *((int*) ccgSubSurf_getEdgeUserData(ss, e));
- if (v==ccgSubSurf_getEdgeVert0(ss, e)) {
+ if (v==ccgSubSurf_getEdgeVert0(e)) {
return edgeBase + (gridSize-1-x)-1;
} else {
return edgeBase + (edgeSize-2-1)-((gridSize-1-x)-1);
@@ -300,7 +300,7 @@ static int ss_sync_from_uv(CCGSubSurf *ss, CCGSubSurf *origss, DerivedMesh *dm,
if ((mv0->flag&mv1->flag) & ME_VERT_MERGED)
crease = creaseFactor;
else
- crease = ccgSubSurf_getEdgeCrease(origss, orige);
+ crease = ccgSubSurf_getEdgeCrease(orige);
ccgSubSurf_syncEdge(ss, ehdl, fverts[j], fverts[(j+1)%nverts], crease, &e);
BLI_edgehash_insert(ehash, v0, v1, NULL);
@@ -368,7 +368,7 @@ static void set_subsurf_uv(CCGSubSurf *ss, DerivedMesh *dm, DerivedMesh *result,
for(index = 0; index < totface; index++) {
CCGFace *f = faceMap[index];
- int numVerts = ccgSubSurf_getFaceNumVerts(uvss, f);
+ int numVerts = ccgSubSurf_getFaceNumVerts(f);
for (S=0; S<numVerts; S++) {
VertData *faceGridData= ccgSubSurf_getFaceGridDataArray(uvss, f, S);
@@ -399,12 +399,12 @@ static void set_subsurf_uv(CCGSubSurf *ss, DerivedMesh *dm, DerivedMesh *result,
static unsigned int ss_getEdgeFlags(CCGSubSurf *ss, CCGEdge *e, int ssFromEditmesh, DispListMesh *dlm, MEdge *medge, MTFace *tface)
{
unsigned int flags = 0;
- int N = ccgSubSurf_getEdgeNumFaces(ss, e);
+ int N = ccgSubSurf_getEdgeNumFaces(e);
if (!N) flags |= ME_LOOSEEDGE;
if (ssFromEditmesh) {
- EditEdge *eed = ccgSubSurf_getEdgeEdgeHandle(ss, e);
+ EditEdge *eed = ccgSubSurf_getEdgeEdgeHandle(e);
flags |= ME_EDGEDRAW|ME_EDGERENDER;
if (eed->seam) {
@@ -470,7 +470,7 @@ static void calc_ss_weights(int gridFaces,
}
}
-DerivedMesh *ss_to_cdderivedmesh(CCGSubSurf *ss, int ssFromEditmesh,
+static DerivedMesh *ss_to_cdderivedmesh(CCGSubSurf *ss, int ssFromEditmesh,
int drawInteriorEdges, int useSubsurfUv,
DerivedMesh *dm)
{
@@ -480,7 +480,6 @@ DerivedMesh *ss_to_cdderivedmesh(CCGSubSurf *ss, int ssFromEditmesh,
int gridFaces = gridSize - 1;
int edgeBase, faceBase;
int i, j, k, S, x, y, index;
- int vertBase = 0;
CCGVertIterator *vi;
CCGEdgeIterator *ei;
CCGFaceIterator *fi;
@@ -503,7 +502,7 @@ DerivedMesh *ss_to_cdderivedmesh(CCGSubSurf *ss, int ssFromEditmesh,
for(; !ccgVertIterator_isStopped(vi); ccgVertIterator_next(vi)) {
CCGVert *v = ccgVertIterator_getCurrent(vi);
- vertMap2[GET_INT_FROM_POINTER(ccgSubSurf_getVertVertHandle(ss, v))] = v;
+ vertMap2[GET_INT_FROM_POINTER(ccgSubSurf_getVertVertHandle(v))] = v;
}
ccgVertIterator_free(vi);
@@ -513,7 +512,7 @@ DerivedMesh *ss_to_cdderivedmesh(CCGSubSurf *ss, int ssFromEditmesh,
for(; !ccgEdgeIterator_isStopped(ei); ccgEdgeIterator_next(ei)) {
CCGEdge *e = ccgEdgeIterator_getCurrent(ei);
- edgeMap2[GET_INT_FROM_POINTER(ccgSubSurf_getEdgeEdgeHandle(ss, e))] = e;
+ edgeMap2[GET_INT_FROM_POINTER(ccgSubSurf_getEdgeEdgeHandle(e))] = e;
}
totface = ccgSubSurf_getNumFaces(ss);
@@ -543,18 +542,18 @@ DerivedMesh *ss_to_cdderivedmesh(CCGSubSurf *ss, int ssFromEditmesh,
for(index = 0; index < totface; index++) {
CCGFace *f = faceMap2[index];
- int x, y, S, numVerts = ccgSubSurf_getFaceNumVerts(ss, f);
+ int x, y, S, numVerts = ccgSubSurf_getFaceNumVerts(f);
FaceVertWeight *weight = (numVerts == 4) ? qweight : tweight;
int vertIdx[4];
for(S = 0; S < numVerts; S++) {
CCGVert *v = ccgSubSurf_getFaceVert(ss, f, S);
- vertIdx[S] = GET_INT_FROM_POINTER(ccgSubSurf_getVertVertHandle(ss, v));
+ vertIdx[S] = GET_INT_FROM_POINTER(ccgSubSurf_getVertVertHandle(v));
}
DM_interp_vert_data(dm, result, vertIdx, weight[0][0], numVerts, i);
- VecCopyf(mvert->co, ccgSubSurf_getFaceCenterData(ss, f));
+ VecCopyf(mvert->co, ccgSubSurf_getFaceCenterData(f));
*origIndex = ORIGINDEX_NONE;
++mvert;
++origIndex;
@@ -613,10 +612,10 @@ DerivedMesh *ss_to_cdderivedmesh(CCGSubSurf *ss, int ssFromEditmesh,
int vertIdx[2];
CCGVert *v;
- v = ccgSubSurf_getEdgeVert0(ss, e);
- vertIdx[0] = GET_INT_FROM_POINTER(ccgSubSurf_getVertVertHandle(ss, v));
- v = ccgSubSurf_getEdgeVert1(ss, e);
- vertIdx[1] = GET_INT_FROM_POINTER(ccgSubSurf_getVertVertHandle(ss, v));
+ v = ccgSubSurf_getEdgeVert0(e);
+ vertIdx[0] = GET_INT_FROM_POINTER(ccgSubSurf_getVertVertHandle(v));
+ v = ccgSubSurf_getEdgeVert1(e);
+ vertIdx[1] = GET_INT_FROM_POINTER(ccgSubSurf_getVertVertHandle(v));
for(x = 1; x < edgeSize - 1; x++) {
float w[2];
@@ -634,18 +633,17 @@ DerivedMesh *ss_to_cdderivedmesh(CCGSubSurf *ss, int ssFromEditmesh,
edgeBase += edgeSize-2;
}
- vertBase = i;
for(index = 0; index < totvert; index++) {
CCGVert *v = vertMap2[index];
int vertIdx;
- vertIdx = GET_INT_FROM_POINTER(ccgSubSurf_getVertVertHandle(ss, v));
+ vertIdx = GET_INT_FROM_POINTER(ccgSubSurf_getVertVertHandle(v));
DM_copy_vert_data(dm, result, vertIdx, i, 1);
VecCopyf(mvert->co, ccgSubSurf_getVertData(ss, v));
*((int*)ccgSubSurf_getVertUserData(ss, v)) = i;
- *origIndex = ccgDM_getVertMapIndex(NULL, ss, v);
+ *origIndex = ccgDM_getVertMapIndex(ss, v);
++mvert;
++origIndex;
i++;
@@ -658,7 +656,7 @@ DerivedMesh *ss_to_cdderivedmesh(CCGSubSurf *ss, int ssFromEditmesh,
for(index = 0; index < totface; index++) {
CCGFace *f = faceMap2[index];
- int numVerts = ccgSubSurf_getFaceNumVerts(ss, f);
+ int numVerts = ccgSubSurf_getFaceNumVerts(f);
for(k = 0; k < numVerts; k++) {
for(x = 0; x < gridFaces; x++) {
@@ -701,9 +699,9 @@ DerivedMesh *ss_to_cdderivedmesh(CCGSubSurf *ss, int ssFromEditmesh,
CCGEdge *e = edgeMap2[index];
unsigned int flags = 0;
char bweight = 0;
- int edgeIdx = GET_INT_FROM_POINTER(ccgSubSurf_getEdgeEdgeHandle(ss, e));
+ int edgeIdx = GET_INT_FROM_POINTER(ccgSubSurf_getEdgeEdgeHandle(e));
- if(!ccgSubSurf_getEdgeNumFaces(ss, e)) flags |= ME_LOOSEEDGE;
+ if(!ccgSubSurf_getEdgeNumFaces(e)) flags |= ME_LOOSEEDGE;
if(edgeIdx != -1 && dm) {
@@ -719,7 +717,7 @@ DerivedMesh *ss_to_cdderivedmesh(CCGSubSurf *ss, int ssFromEditmesh,
med->v2 = getEdgeIndex(ss, e, x + 1, edgeSize);
med->flag = flags;
med->bweight = bweight;
- *origIndex = ccgDM_getEdgeMapIndex(NULL, ss, e);
+ *origIndex = ccgDM_getEdgeMapIndex(ss, e);
++med;
++origIndex;
i++;
@@ -733,10 +731,10 @@ DerivedMesh *ss_to_cdderivedmesh(CCGSubSurf *ss, int ssFromEditmesh,
for(index = 0; index < totface; index++) {
CCGFace *f = faceMap2[index];
- int numVerts = ccgSubSurf_getFaceNumVerts(ss, f);
+ int numVerts = ccgSubSurf_getFaceNumVerts(f);
int mat_nr;
int flag;
- int mapIndex = ccgDM_getFaceMapIndex(NULL, ss, f);
+ int mapIndex = ccgDM_getFaceMapIndex(ss, f);
int faceIdx = GET_INT_FROM_POINTER(ccgSubSurf_getFaceFaceHandle(ss, f));
if(!ssFromEditmesh) {
@@ -900,15 +898,15 @@ static void ss_sync_from_derivedmesh(CCGSubSurf *ss, DerivedMesh *dm,
/***/
-static int ccgDM_getVertMapIndex(CCGDerivedMesh *ccgdm, CCGSubSurf *ss, CCGVert *v) {
+static int ccgDM_getVertMapIndex(CCGSubSurf *ss, CCGVert *v) {
return ((int*) ccgSubSurf_getVertUserData(ss, v))[1];
}
-static int ccgDM_getEdgeMapIndex(CCGDerivedMesh *ccgdm, CCGSubSurf *ss, CCGEdge *e) {
+static int ccgDM_getEdgeMapIndex(CCGSubSurf *ss, CCGEdge *e) {
return ((int*) ccgSubSurf_getEdgeUserData(ss, e))[1];
}
-static int ccgDM_getFaceMapIndex(CCGDerivedMesh *ccgdm, CCGSubSurf *ss, CCGFace *f) {
+static int ccgDM_getFaceMapIndex(CCGSubSurf *ss, CCGFace *f) {
return ((int*) ccgSubSurf_getFaceUserData(ss, f))[1];
}
@@ -941,7 +939,7 @@ static void ccgDM_getMinMax(DerivedMesh *dm, float min_r[3], float max_r[3]) {
for (; !ccgFaceIterator_isStopped(fi); ccgFaceIterator_next(fi)) {
CCGFace *f = ccgFaceIterator_getCurrent(fi);
- int S, x, y, numVerts = ccgSubSurf_getFaceNumVerts(ss, f);
+ int S, x, y, numVerts = ccgSubSurf_getFaceNumVerts(f);
for (S=0; S<numVerts; S++) {
VertData *faceGridData = ccgSubSurf_getFaceGridDataArray(ss, f, S);
@@ -997,7 +995,7 @@ static void ccgDM_getFinalVert(DerivedMesh *dm, int vertNum, MVert *mv)
++i;
f = ccgdm->faceMap[i].face;
- numVerts = ccgSubSurf_getFaceNumVerts(ss, f);
+ numVerts = ccgSubSurf_getFaceNumVerts(f);
gridSideVerts = gridSize - 2;
gridInternalVerts = gridSideVerts * gridSideVerts;
@@ -1007,7 +1005,7 @@ static void ccgDM_getFinalVert(DerivedMesh *dm, int vertNum, MVert *mv)
offset = vertNum - ccgdm->faceMap[i].startVert;
if(offset < 1) {
- VecCopyf(mv->co, ccgSubSurf_getFaceCenterData(ss, f));
+ VecCopyf(mv->co, ccgSubSurf_getFaceCenterData(f));
} else if(offset < gridSideEnd) {
offset -= 1;
grid = offset / gridSideVerts;
@@ -1069,7 +1067,7 @@ static void ccgDM_getFinalEdge(DerivedMesh *dm, int edgeNum, MEdge *med)
++i;
f = ccgdm->faceMap[i].face;
- numVerts = ccgSubSurf_getFaceNumVerts(ss, f);
+ numVerts = ccgSubSurf_getFaceNumVerts(f);
gridSideEdges = gridSize - 1;
gridInternalEdges = (gridSideEdges - 1) * gridSideEdges * 2;
@@ -1105,7 +1103,7 @@ static void ccgDM_getFinalEdge(DerivedMesh *dm, int edgeNum, MEdge *med)
e = ccgdm->edgeMap[i].edge;
- if(!ccgSubSurf_getEdgeNumFaces(ss, e)) flags |= ME_LOOSEEDGE;
+ if(!ccgSubSurf_getEdgeNumFaces(e)) flags |= ME_LOOSEEDGE;
x = edgeNum - ccgdm->edgeMap[i].startEdge;
@@ -1147,7 +1145,7 @@ static void ccgDM_getFinalFace(DerivedMesh *dm, int faceNum, MFace *mf)
++i;
f = ccgdm->faceMap[i].face;
- numVerts = ccgSubSurf_getFaceNumVerts(ss, f);
+ numVerts = ccgSubSurf_getFaceNumVerts(f);
offset = faceNum - ccgdm->faceMap[i].startFace;
grid = offset / gridFaces;
@@ -1177,9 +1175,9 @@ static void ccgDM_copyFinalVertArray(DerivedMesh *dm, MVert *mvert)
totface = ccgSubSurf_getNumFaces(ss);
for(index = 0; index < totface; index++) {
CCGFace *f = ccgdm->faceMap[index].face;
- int x, y, S, numVerts = ccgSubSurf_getFaceNumVerts(ss, f);
+ int x, y, S, numVerts = ccgSubSurf_getFaceNumVerts(f);
- VecCopyf(mvert[i++].co, ccgSubSurf_getFaceCenterData(ss, f));
+ VecCopyf(mvert[i++].co, ccgSubSurf_getFaceCenterData(f));
for(S = 0; S < numVerts; S++) {
for(x = 1; x < gridSize - 1; x++) {
@@ -1232,7 +1230,7 @@ static void ccgDM_copyFinalEdgeArray(DerivedMesh *dm, MEdge *medge)
totface = ccgSubSurf_getNumFaces(ss);
for(index = 0; index < totface; index++) {
CCGFace *f = ccgdm->faceMap[index].face;
- int x, y, S, numVerts = ccgSubSurf_getFaceNumVerts(ss, f);
+ int x, y, S, numVerts = ccgSubSurf_getFaceNumVerts(f);
for(S = 0; S < numVerts; S++) {
for(x = 0; x < gridSize - 1; x++) {
@@ -1276,9 +1274,9 @@ static void ccgDM_copyFinalEdgeArray(DerivedMesh *dm, MEdge *medge)
CCGEdge *e = ccgdm->edgeMap[index].edge;
unsigned int flags = 0;
int x;
- int edgeIdx = GET_INT_FROM_POINTER(ccgSubSurf_getEdgeEdgeHandle(ss, e));
+ int edgeIdx = GET_INT_FROM_POINTER(ccgSubSurf_getEdgeEdgeHandle(e));
- if(!ccgSubSurf_getEdgeNumFaces(ss, e)) flags |= ME_LOOSEEDGE;
+ if(!ccgSubSurf_getEdgeNumFaces(e)) flags |= ME_LOOSEEDGE;
if(edgeFlags) {
if(edgeIdx != -1) {
@@ -1313,7 +1311,7 @@ static void ccgDM_copyFinalFaceArray(DerivedMesh *dm, MFace *mface)
totface = ccgSubSurf_getNumFaces(ss);
for(index = 0; index < totface; index++) {
CCGFace *f = ccgdm->faceMap[index].face;
- int x, y, S, numVerts = ccgSubSurf_getFaceNumVerts(ss, f);
+ int x, y, S, numVerts = ccgSubSurf_getFaceNumVerts(f);
int mat_nr = 0;
int flag = ME_SMOOTH; /* assume face is smooth by default */
@@ -1360,7 +1358,7 @@ static void ccgdm_getVertCos(DerivedMesh *dm, float (*cos)[3]) {
for (; !ccgVertIterator_isStopped(vi); ccgVertIterator_next(vi)) {
CCGVert *v = ccgVertIterator_getCurrent(vi);
- vertMap2[GET_INT_FROM_POINTER(ccgSubSurf_getVertVertHandle(ss, v))] = v;
+ vertMap2[GET_INT_FROM_POINTER(ccgSubSurf_getVertVertHandle(v))] = v;
}
ccgVertIterator_free(vi);
@@ -1370,7 +1368,7 @@ static void ccgdm_getVertCos(DerivedMesh *dm, float (*cos)[3]) {
for (i=0; !ccgEdgeIterator_isStopped(ei); i++,ccgEdgeIterator_next(ei)) {
CCGEdge *e = ccgEdgeIterator_getCurrent(ei);
- edgeMap2[GET_INT_FROM_POINTER(ccgSubSurf_getEdgeEdgeHandle(ss, e))] = e;
+ edgeMap2[GET_INT_FROM_POINTER(ccgSubSurf_getEdgeEdgeHandle(e))] = e;
}
totface = ccgSubSurf_getNumFaces(ss);
@@ -1386,9 +1384,9 @@ static void ccgdm_getVertCos(DerivedMesh *dm, float (*cos)[3]) {
i = 0;
for (index=0; index<totface; index++) {
CCGFace *f = faceMap2[index];
- int x, y, S, numVerts = ccgSubSurf_getFaceNumVerts(ss, f);
+ int x, y, S, numVerts = ccgSubSurf_getFaceNumVerts(f);
- VecCopyf(cos[i++], ccgSubSurf_getFaceCenterData(ss, f));
+ VecCopyf(cos[i++], ccgSubSurf_getFaceCenterData(f));
for (S=0; S<numVerts; S++) {
for (x=1; x<gridSize-1; x++) {
@@ -1430,7 +1428,7 @@ static void ccgDM_foreachMappedVert(DerivedMesh *dm, void (*func)(void *userData
for (; !ccgVertIterator_isStopped(vi); ccgVertIterator_next(vi)) {
CCGVert *v = ccgVertIterator_getCurrent(vi);
VertData *vd = ccgSubSurf_getVertData(ccgdm->ss, v);
- int index = ccgDM_getVertMapIndex(ccgdm, ccgdm->ss, v);
+ int index = ccgDM_getVertMapIndex(ccgdm->ss, v);
if (index!=-1)
func(userData, index, vd->co, vd->no, NULL);
@@ -1447,7 +1445,7 @@ static void ccgDM_foreachMappedEdge(DerivedMesh *dm, void (*func)(void *userData
for (; !ccgEdgeIterator_isStopped(ei); ccgEdgeIterator_next(ei)) {
CCGEdge *e = ccgEdgeIterator_getCurrent(ei);
VertData *edgeData = ccgSubSurf_getEdgeDataArray(ss, e);
- int index = ccgDM_getEdgeMapIndex(ccgdm, ss, e);
+ int index = ccgDM_getEdgeMapIndex(ss, e);
if (index!=-1) {
for (i=0; i<edgeSize-1; i++)
@@ -1488,9 +1486,9 @@ static void ccgDM_drawVerts(DerivedMesh *dm) {
fi = ccgSubSurf_getFaceIterator(ss);
for (; !ccgFaceIterator_isStopped(fi); ccgFaceIterator_next(fi)) {
CCGFace *f = ccgFaceIterator_getCurrent(fi);
- int x, y, S, numVerts = ccgSubSurf_getFaceNumVerts(ss, f);
+ int x, y, S, numVerts = ccgSubSurf_getFaceNumVerts(f);
- glVertex3fv(ccgSubSurf_getFaceCenterData(ss, f));
+ glVertex3fv(ccgSubSurf_getFaceCenterData(f));
for (S=0; S<numVerts; S++)
for (x=1; x<gridSize-1; x++)
glVertex3fv(ccgSubSurf_getFaceGridEdgeData(ss, f, S, x));
@@ -1517,7 +1515,7 @@ static void ccgDM_drawEdges(DerivedMesh *dm, int drawLooseEdges) {
CCGEdge *e = ccgEdgeIterator_getCurrent(ei);
VertData *edgeData = ccgSubSurf_getEdgeDataArray(ss, e);
- if (!drawLooseEdges && !ccgSubSurf_getEdgeNumFaces(ss, e))
+ if (!drawLooseEdges && !ccgSubSurf_getEdgeNumFaces(e))
continue;
if (useAging && !(G.f&G_BACKBUFSEL)) {
@@ -1540,7 +1538,7 @@ static void ccgDM_drawEdges(DerivedMesh *dm, int drawLooseEdges) {
if (ccgdm->drawInteriorEdges) {
for (; !ccgFaceIterator_isStopped(fi); ccgFaceIterator_next(fi)) {
CCGFace *f = ccgFaceIterator_getCurrent(fi);
- int S, x, y, numVerts = ccgSubSurf_getFaceNumVerts(ss, f);
+ int S, x, y, numVerts = ccgSubSurf_getFaceNumVerts(f);
for (S=0; S<numVerts; S++) {
VertData *faceGridData = ccgSubSurf_getFaceGridDataArray(ss, f, S);
@@ -1578,7 +1576,7 @@ static void ccgDM_drawLooseEdges(DerivedMesh *dm) {
CCGEdge *e = ccgEdgeIterator_getCurrent(ei);
VertData *edgeData = ccgSubSurf_getEdgeDataArray(ss, e);
- if (!ccgSubSurf_getEdgeNumFaces(ss, e)) {
+ if (!ccgSubSurf_getEdgeNumFaces(e)) {
glBegin(GL_LINE_STRIP);
for (i=0; i<edgeSize-1; i++) {
glVertex3fv(edgeData[i].co);
@@ -1615,7 +1613,7 @@ static void ccgDM_drawFacesSolid(DerivedMesh *dm, int (*setMaterial)(int, void *
for (; !ccgFaceIterator_isStopped(fi); ccgFaceIterator_next(fi)) {
CCGFace *f = ccgFaceIterator_getCurrent(fi);
- int S, x, y, numVerts = ccgSubSurf_getFaceNumVerts(ss, f);
+ int S, x, y, numVerts = ccgSubSurf_getFaceNumVerts(f);
int index = GET_INT_FROM_POINTER(ccgSubSurf_getFaceFaceHandle(ss, f));
int drawSmooth, mat_nr;
@@ -1723,9 +1721,9 @@ static void ccgDM_drawMappedFacesGLSL(DerivedMesh *dm, int (*setMaterial)(int, v
CCGFace *f = ccgdm->faceMap[i].face;
int S, x, y, drawSmooth;
int index = GET_INT_FROM_POINTER(ccgSubSurf_getFaceFaceHandle(ss, f));
- int origIndex = ccgDM_getFaceMapIndex(ccgdm, ss, f);
+ int origIndex = ccgDM_getFaceMapIndex(ss, f);
- numVerts = ccgSubSurf_getFaceNumVerts(ss, f);
+ numVerts = ccgSubSurf_getFaceNumVerts(f);
if(faceFlags) {
drawSmooth = (faceFlags[index*4] & ME_SMOOTH);
@@ -1858,7 +1856,7 @@ static void ccgDM_drawFacesColored(DerivedMesh *dm, int useTwoSided, unsigned ch
glBegin(GL_QUADS);
for (; !ccgFaceIterator_isStopped(fi); ccgFaceIterator_next(fi)) {
CCGFace *f = ccgFaceIterator_getCurrent(fi);
- int S, x, y, numVerts = ccgSubSurf_getFaceNumVerts(ss, f);
+ int S, x, y, numVerts = ccgSubSurf_getFaceNumVerts(f);
for (S=0; S<numVerts; S++) {
VertData *faceGridData = ccgSubSurf_getFaceGridDataArray(ss, f, S);
@@ -1916,8 +1914,8 @@ static void ccgDM_drawFacesTex_common(DerivedMesh *dm,
totface = ccgSubSurf_getNumFaces(ss);
for(i = 0; i < totface; i++) {
CCGFace *f = ccgdm->faceMap[i].face;
- int S, x, y, numVerts = ccgSubSurf_getFaceNumVerts(ss, f);
- int drawSmooth, index = ccgDM_getFaceMapIndex(ccgdm, ss, f);
+ int S, x, y, numVerts = ccgSubSurf_getFaceNumVerts(f);
+ int drawSmooth, index = ccgDM_getFaceMapIndex(ss, f);
int origIndex = GET_INT_FROM_POINTER(ccgSubSurf_getFaceFaceHandle(ss, f));
unsigned char *cp= NULL;
int mat_nr;
@@ -1999,28 +1997,28 @@ static void ccgDM_drawFacesTex_common(DerivedMesh *dm,
glBegin(GL_QUADS);
for (y=0; y<gridFaces; y++) {
for (x=0; x<gridFaces; x++) {
- float *a = faceGridData[(y+0)*gridSize + x].co;
- float *b = faceGridData[(y+0)*gridSize + x + 1].co;
- float *c = faceGridData[(y+1)*gridSize + x + 1].co;
- float *d = faceGridData[(y+1)*gridSize + x].co;
+ float *a_co = faceGridData[(y+0)*gridSize + x].co;
+ float *b_co = faceGridData[(y+0)*gridSize + x + 1].co;
+ float *c_co = faceGridData[(y+1)*gridSize + x + 1].co;
+ float *d_co = faceGridData[(y+1)*gridSize + x].co;
- ccgDM_glNormalFast(a, b, c, d);
+ ccgDM_glNormalFast(a_co, b_co, c_co, d_co);
if(tf) glTexCoord2fv(tf->uv[1]);
if(cp) glColor3ub(cp[7], cp[6], cp[5]);
- glVertex3fv(d);
+ glVertex3fv(d_co);
if(tf) glTexCoord2fv(tf->uv[2]);
if(cp) glColor3ub(cp[11], cp[10], cp[9]);
- glVertex3fv(c);
+ glVertex3fv(c_co);
if(tf) glTexCoord2fv(tf->uv[3]);
if(cp) glColor3ub(cp[15], cp[14], cp[13]);
- glVertex3fv(b);
+ glVertex3fv(b_co);
if(tf) glTexCoord2fv(tf->uv[0]);
if(cp) glColor3ub(cp[3], cp[2], cp[1]);
- glVertex3fv(a);
+ glVertex3fv(a_co);
if(tf) tf++;
if(cp) cp += 16;
@@ -2084,8 +2082,8 @@ static void ccgDM_drawMappedFaces(DerivedMesh *dm, int (*setDrawOptions)(void *u
for (i=0; !ccgFaceIterator_isStopped(fi); i++,ccgFaceIterator_next(fi)) {
CCGFace *f = ccgFaceIterator_getCurrent(fi);
- int S, x, y, numVerts = ccgSubSurf_getFaceNumVerts(ss, f);
- int drawSmooth, index = ccgDM_getFaceMapIndex(ccgdm, ss, f);
+ int S, x, y, numVerts = ccgSubSurf_getFaceNumVerts(f);
+ int drawSmooth, index = ccgDM_getFaceMapIndex(ss, f);
int origIndex;
origIndex = GET_INT_FROM_POINTER(ccgSubSurf_getFaceFaceHandle(ss, f));
@@ -2166,7 +2164,7 @@ static void ccgDM_drawMappedEdges(DerivedMesh *dm, int (*setDrawOptions)(void *u
for (; !ccgEdgeIterator_isStopped(ei); ccgEdgeIterator_next(ei)) {
CCGEdge *e = ccgEdgeIterator_getCurrent(ei);
VertData *edgeData = ccgSubSurf_getEdgeDataArray(ss, e);
- int index = ccgDM_getEdgeMapIndex(ccgdm, ss, e);
+ int index = ccgDM_getEdgeMapIndex(ss, e);
glBegin(GL_LINE_STRIP);
if (index!=-1 && (!setDrawOptions || setDrawOptions(userData, index))) {
@@ -2196,7 +2194,7 @@ static void ccgDM_drawMappedEdgesInterp(DerivedMesh *dm, int (*setDrawOptions)(v
for (; !ccgEdgeIterator_isStopped(ei); ccgEdgeIterator_next(ei)) {
CCGEdge *e = ccgEdgeIterator_getCurrent(ei);
VertData *edgeData = ccgSubSurf_getEdgeDataArray(ss, e);
- int index = ccgDM_getEdgeMapIndex(ccgdm, ss, e);
+ int index = ccgDM_getEdgeMapIndex(ss, e);
glBegin(GL_LINE_STRIP);
if (index!=-1 && (!setDrawOptions || setDrawOptions(userData, index))) {
@@ -2223,7 +2221,7 @@ static void ccgDM_foreachMappedFaceCenter(DerivedMesh *dm, void (*func)(void *us
for (; !ccgFaceIterator_isStopped(fi); ccgFaceIterator_next(fi)) {
CCGFace *f = ccgFaceIterator_getCurrent(fi);
- int index = ccgDM_getFaceMapIndex(ccgdm, ss, f);
+ int index = ccgDM_getFaceMapIndex(ss, f);
if (index!=-1) {
/* Face center data normal isn't updated atm. */
@@ -2259,17 +2257,17 @@ static CCGDerivedMesh *getCCGDerivedMesh(CCGSubSurf *ss,
int index, totvert, totedge, totface;
int i;
int vertNum, edgeNum, faceNum;
- int *vertOrigIndex, *edgeOrigIndex, *faceOrigIndex;
+ int *vertOrigIndex, *faceOrigIndex; /* *edgeOrigIndex - as yet, unused */
int *edgeFlags;
char *faceFlags;
int edgeSize;
int gridSize;
int gridFaces;
int gridSideVerts;
- int gridInternalVerts;
+ /*int gridInternalVerts; - as yet unused */
int gridSideEdges;
int gridInternalEdges;
- MVert *mvert = NULL;
+ /* MVert *mvert = NULL; - as yet unused */
MEdge *medge = NULL;
MFace *mface = NULL;
FaceVertWeight *qweight, *tweight;
@@ -2333,7 +2331,7 @@ static CCGDerivedMesh *getCCGDerivedMesh(CCGSubSurf *ss,
for(; !ccgVertIterator_isStopped(vi); ccgVertIterator_next(vi)) {
CCGVert *v = ccgVertIterator_getCurrent(vi);
- ccgdm->vertMap[GET_INT_FROM_POINTER(ccgSubSurf_getVertVertHandle(ss, v))].vert = v;
+ ccgdm->vertMap[GET_INT_FROM_POINTER(ccgSubSurf_getVertVertHandle(v))].vert = v;
}
ccgVertIterator_free(vi);
@@ -2343,7 +2341,7 @@ static CCGDerivedMesh *getCCGDerivedMesh(CCGSubSurf *ss,
for(; !ccgEdgeIterator_isStopped(ei); ccgEdgeIterator_next(ei)) {
CCGEdge *e = ccgEdgeIterator_getCurrent(ei);
- ccgdm->edgeMap[GET_INT_FROM_POINTER(ccgSubSurf_getEdgeEdgeHandle(ss, e))].edge = e;
+ ccgdm->edgeMap[GET_INT_FROM_POINTER(ccgSubSurf_getEdgeEdgeHandle(e))].edge = e;
}
totface = ccgSubSurf_getNumFaces(ss);
@@ -2360,7 +2358,7 @@ static CCGDerivedMesh *getCCGDerivedMesh(CCGSubSurf *ss,
gridSize = ccgSubSurf_getGridSize(ss);
gridFaces = gridSize - 1;
gridSideVerts = gridSize - 2;
- gridInternalVerts = gridSideVerts * gridSideVerts;
+ /*gridInternalVerts = gridSideVerts * gridSideVerts; - as yet, unused */
gridSideEdges = gridSize - 1;
gridInternalEdges = (gridSideEdges - 1) * gridSideEdges * 2;
@@ -2370,21 +2368,21 @@ static CCGDerivedMesh *getCCGDerivedMesh(CCGSubSurf *ss,
edgeNum = 0;
faceNum = 0;
- mvert = dm->getVertArray(dm);
+ /* mvert = dm->getVertArray(dm); - as yet unused */
medge = dm->getEdgeArray(dm);
mface = dm->getFaceArray(dm);
vertOrigIndex = DM_get_vert_data_layer(&ccgdm->dm, CD_ORIGINDEX);
- edgeOrigIndex = DM_get_edge_data_layer(&ccgdm->dm, CD_ORIGINDEX);
+ /*edgeOrigIndex = DM_get_edge_data_layer(&ccgdm->dm, CD_ORIGINDEX);*/
faceOrigIndex = DM_get_face_data_layer(&ccgdm->dm, CD_ORIGINDEX);
faceFlags = DM_get_face_data_layer(&ccgdm->dm, CD_FLAGS);
for(index = 0; index < totface; ++index) {
CCGFace *f = ccgdm->faceMap[index].face;
- int numVerts = ccgSubSurf_getFaceNumVerts(ss, f);
+ int numVerts = ccgSubSurf_getFaceNumVerts(f);
int numFinalEdges = numVerts * (gridSideEdges + gridInternalEdges);
- int mapIndex = ccgDM_getFaceMapIndex(ccgdm, ss, f);
+ int mapIndex = ccgDM_getFaceMapIndex(ss, f);
int origIndex = GET_INT_FROM_POINTER(ccgSubSurf_getFaceFaceHandle(ss, f));
FaceVertWeight *weight = (numVerts == 4) ? qweight : tweight;
int S, x, y;
@@ -2400,7 +2398,7 @@ static CCGDerivedMesh *getCCGDerivedMesh(CCGSubSurf *ss,
for(S = 0; S < numVerts; S++) {
CCGVert *v = ccgSubSurf_getFaceVert(ss, f, S);
- vertIdx[S] = GET_INT_FROM_POINTER(ccgSubSurf_getVertVertHandle(ss, v));
+ vertIdx[S] = GET_INT_FROM_POINTER(ccgSubSurf_getVertVertHandle(v));
}
DM_interp_vert_data(dm, &ccgdm->dm, vertIdx, weight[0][0],
@@ -2503,16 +2501,16 @@ static CCGDerivedMesh *getCCGDerivedMesh(CCGSubSurf *ss,
for(index = 0; index < totedge; ++index) {
CCGEdge *e = ccgdm->edgeMap[index].edge;
int numFinalEdges = edgeSize - 1;
- int mapIndex = ccgDM_getEdgeMapIndex(ccgdm, ss, e);
+ int mapIndex = ccgDM_getEdgeMapIndex(ss, e);
int x;
int vertIdx[2];
- int edgeIdx = GET_INT_FROM_POINTER(ccgSubSurf_getEdgeEdgeHandle(ss, e));
+ int edgeIdx = GET_INT_FROM_POINTER(ccgSubSurf_getEdgeEdgeHandle(e));
CCGVert *v;
- v = ccgSubSurf_getEdgeVert0(ss, e);
- vertIdx[0] = GET_INT_FROM_POINTER(ccgSubSurf_getVertVertHandle(ss, v));
- v = ccgSubSurf_getEdgeVert1(ss, e);
- vertIdx[1] = GET_INT_FROM_POINTER(ccgSubSurf_getVertVertHandle(ss, v));
+ v = ccgSubSurf_getEdgeVert0(e);
+ vertIdx[0] = GET_INT_FROM_POINTER(ccgSubSurf_getVertVertHandle(v));
+ v = ccgSubSurf_getEdgeVert1(e);
+ vertIdx[1] = GET_INT_FROM_POINTER(ccgSubSurf_getVertVertHandle(v));
ccgdm->edgeMap[index].startVert = vertNum;
ccgdm->edgeMap[index].startEdge = edgeNum;
@@ -2543,10 +2541,10 @@ static CCGDerivedMesh *getCCGDerivedMesh(CCGSubSurf *ss,
for(index = 0; index < totvert; ++index) {
CCGVert *v = ccgdm->vertMap[index].vert;
- int mapIndex = ccgDM_getVertMapIndex(ccgdm, ccgdm->ss, v);
+ int mapIndex = ccgDM_getVertMapIndex(ccgdm->ss, v);
int vertIdx;
- vertIdx = GET_INT_FROM_POINTER(ccgSubSurf_getVertVertHandle(ss, v));
+ vertIdx = GET_INT_FROM_POINTER(ccgSubSurf_getVertVertHandle(v));
ccgdm->vertMap[index].startVert = vertNum;
@@ -2679,9 +2677,9 @@ void subsurf_calculate_limit_positions(Mesh *me, float (*positions_r)[3])
vi = ccgSubSurf_getVertIterator(ss);
for (; !ccgVertIterator_isStopped(vi); ccgVertIterator_next(vi)) {
CCGVert *v = ccgVertIterator_getCurrent(vi);
- int idx = GET_INT_FROM_POINTER(ccgSubSurf_getVertVertHandle(ss, v));
- int N = ccgSubSurf_getVertNumEdges(ss, v);
- int numFaces = ccgSubSurf_getVertNumFaces(ss, v);
+ int idx = GET_INT_FROM_POINTER(ccgSubSurf_getVertVertHandle(v));
+ int N = ccgSubSurf_getVertNumEdges(v);
+ int numFaces = ccgSubSurf_getVertNumFaces(v);
float *co;
int i;
@@ -2689,12 +2687,12 @@ void subsurf_calculate_limit_positions(Mesh *me, float (*positions_r)[3])
face_sum[0]= face_sum[1]= face_sum[2]= 0.0;
for (i=0; i<N; i++) {
- CCGEdge *e = ccgSubSurf_getVertEdge(ss, v, i);
+ CCGEdge *e = ccgSubSurf_getVertEdge(v, i);
VecAddf(edge_sum, edge_sum, ccgSubSurf_getEdgeData(ss, e, 1));
}
for (i=0; i<numFaces; i++) {
- CCGFace *f = ccgSubSurf_getVertFace(ss, v, i);
- VecAddf(face_sum, face_sum, ccgSubSurf_getFaceCenterData(ss, f));
+ CCGFace *f = ccgSubSurf_getVertFace(v, i);
+ VecAddf(face_sum, face_sum, ccgSubSurf_getFaceCenterData(f));
}
/* ad-hoc correction for boundary vertices, to at least avoid them
diff --git a/source/blender/blenkernel/intern/writeframeserver.c b/source/blender/blenkernel/intern/writeframeserver.c
index 6b38d7deadb..40e1dc1bb03 100644
--- a/source/blender/blenkernel/intern/writeframeserver.c
+++ b/source/blender/blenkernel/intern/writeframeserver.c
@@ -251,7 +251,7 @@ static int handle_request(char * req)
return -1;
}
-int frameserver_loop()
+int frameserver_loop(void)
{
fd_set readfds;
struct timeval tv;
diff --git a/source/blender/blenlib/intern/arithb.c b/source/blender/blenlib/intern/arithb.c
index 0dda84b09fd..79517c4fde4 100644
--- a/source/blender/blenlib/intern/arithb.c
+++ b/source/blender/blenlib/intern/arithb.c
@@ -2503,7 +2503,7 @@ short IsectLL2Df(float *v1, float *v2, float *v3, float *v4)
1: intersection
*/
-short IsectLLPt2Df(float x0,float y0,float x1,float y1,
+static short IsectLLPt2Df(float x0,float y0,float x1,float y1,
float x2,float y2,float x3,float y3, float *xi,float *yi)
{
@@ -3526,7 +3526,7 @@ int constrain_rgb(float *r, float *g, float *b)
Parameter Values for the HDTV Standard for the Studio and
for International Programme Exchange'', formerly CCIR Rec.
709.*/
-void gamma_correct(float *c)
+static void gamma_correct(float *c)
{
/* Rec. 709 gamma correction. */
float cc = 0.018;
@@ -3632,6 +3632,8 @@ void spheremap(float x, float y, float z, float *u, float *v)
/* ------------------------------------------------------------------------- */
+/* proposed api by ton and zr, not used yet */
+#if 0
/* ***************** m1 = m2 ***************** */
void cpy_m3_m3(float m1[][3], float m2[][3])
{
@@ -3655,7 +3657,6 @@ void ident_m4(float m[][4])
m[3][0]= m[3][1]= m[3][2]= 0.0;
}
-
/* ***************** m1 = m2 (pre) * m3 (post) ***************** */
void mul_m3_m3m3(float m1[][3], float m2[][3], float m3[][3])
{
@@ -3793,6 +3794,8 @@ void mul_v3_v3m4(float *v1, float *v2, float mat[][4])
}
+#endif
+
/* moved from effect.c
test if the line starting at p1 ending at p2 intersects the triangle v0..v2
return non zero if it does
@@ -4240,7 +4243,7 @@ float lambda_cp_line_ex(float p[3], float l1[3], float l2[3], float cp[3])
}
/* little sister we only need to know lambda */
-float lambda_cp_line(float p[3], float l1[3], float l2[3])
+static float lambda_cp_line(float p[3], float l1[3], float l2[3])
{
float h[3],u[3];
VecSubf(u, l2, l1);
@@ -4399,7 +4402,7 @@ void VecfCubicInterpol(float *x1, float *v1, float *x2, float *v2, float t, floa
v[2]= 3*a[2]*t2 + 2*b[2]*t + v1[2];
}
-int point_in_slice(float p[3], float v1[3], float l1[3], float l2[3])
+static int point_in_slice(float p[3], float v1[3], float l1[3], float l2[3])
{
/*
what is a slice ?
@@ -4426,7 +4429,7 @@ but see a 'spat' which is a deformed cube with paired parallel planes needs only
/*adult sister defining the slice planes by the origin and the normal
NOTE |normal| may not be 1 but defining the thickness of the slice*/
-int point_in_slice_as(float p[3],float origin[3],float normal[3])
+static int point_in_slice_as(float p[3],float origin[3],float normal[3])
{
float h,rp[3];
VecSubf(rp,p,origin);
@@ -4436,7 +4439,7 @@ int point_in_slice_as(float p[3],float origin[3],float normal[3])
}
/*mama (knowing the squared lenght of the normal)*/
-int point_in_slice_m(float p[3],float origin[3],float normal[3],float lns)
+static int point_in_slice_m(float p[3],float origin[3],float normal[3],float lns)
{
float h,rp[3];
VecSubf(rp,p,origin);
diff --git a/source/blender/blenlib/intern/bpath.c b/source/blender/blenlib/intern/bpath.c
index 898ad6ddd67..e23c2658399 100644
--- a/source/blender/blenlib/intern/bpath.c
+++ b/source/blender/blenlib/intern/bpath.c
@@ -254,7 +254,7 @@ static struct Sequence *seq_stepdata__internal(struct BPathIterator *bpi, int st
return NULL;
}
-void seq_getpath(struct BPathIterator *bpi, char *path) {
+static void seq_getpath(struct BPathIterator *bpi, char *path) {
Sequence *seq = (Sequence *)bpi->data;
@@ -275,7 +275,7 @@ void seq_getpath(struct BPathIterator *bpi, char *path) {
}
}
-void seq_setpath(struct BPathIterator *bpi, char *path) {
+static void seq_setpath(struct BPathIterator *bpi, char *path) {
Sequence *seq = (Sequence *)bpi->data;
if (seq==NULL) return;
@@ -456,7 +456,6 @@ void checkMissingFiles( char *txtname ) {
/* be sure there is low chance of the path being too short */
char filepath_expanded[FILE_MAXDIR*2];
- int files_missing = 0;
BLI_bpathIterator_init(&bpi);
while (!BLI_bpathIterator_isDone(&bpi)) {
@@ -470,7 +469,6 @@ void checkMissingFiles( char *txtname ) {
}
}
bpathToText(btxt, &bpi);
- files_missing = 1;
}
BLI_bpathIterator_step(&bpi);
}
diff --git a/source/blender/blenlib/intern/psfont.c b/source/blender/blenlib/intern/psfont.c
index 216246dcdd7..54d7f8ec1af 100644
--- a/source/blender/blenlib/intern/psfont.c
+++ b/source/blender/blenlib/intern/psfont.c
@@ -977,7 +977,7 @@ static void applymat(float mat[][2], float *x, float *y)
static void setcharlist(void)
{
- char *name, found;
+ char *name; /*found;*/
int i, j;
for(i=0; i<NASCII; i++) ISOcharlist[i].prog = -1;
@@ -985,11 +985,11 @@ static void setcharlist(void)
for(j=0; j<my_nchars; j++) {
name = my_charname[j];
if(name) {
- found = 0;
+ /*found = 0;*/
for(i=0; i<NASCII; i++) {
if(ISOcharlist[i].name && (strcmp(name,ISOcharlist[i].name) == 0)){
ISOcharlist[i].prog = j;
- found = 1;
+ /*found = 1;*/
}
}
/*if (found == 0) printf("no match found for: %s\n", name);*/
@@ -1258,10 +1258,10 @@ static void subr0(void)
int x1, y1;
int x2, y2;
int x3, y3;
- int xpos, ypos, noise;
+ int noise;
- ypos = pop();
- xpos = pop();
+ pop(); /* xpos, unused */
+ pop(); /* ypos, unused */
noise = pop();
if(coordpos!=7) {
fprintf(stderr,"subr0: bad poop\n");
diff --git a/source/blender/blenloader/BLO_soundfile.h b/source/blender/blenloader/BLO_soundfile.h
index 3d133b2d3bd..a239c7d8965 100644
--- a/source/blender/blenloader/BLO_soundfile.h
+++ b/source/blender/blenloader/BLO_soundfile.h
@@ -35,7 +35,5 @@
struct bSound;
struct PackedFile;
-//void sound_read_wav_data(bSound * sound, PackedFile * pf);
-
#endif
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 4ec773409da..5b4fd470e6e 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -1347,7 +1347,7 @@ static void test_pointer_array(FileData *fd, void **mat)
void IDP_DirectLinkProperty(IDProperty *prop, int switch_endian, void *fd);
void IDP_LibLinkProperty(IDProperty *prop, int switch_endian, void *fd);
-void IDP_DirectLinkArray(IDProperty *prop, int switch_endian, void *fd)
+static void IDP_DirectLinkArray(IDProperty *prop, int switch_endian, void *fd)
{
int i;
@@ -1368,14 +1368,14 @@ void IDP_DirectLinkArray(IDProperty *prop, int switch_endian, void *fd)
}
}
-void IDP_DirectLinkString(IDProperty *prop, int switch_endian, void *fd)
+static void IDP_DirectLinkString(IDProperty *prop, int switch_endian, void *fd)
{
/*since we didn't save the extra string buffer, set totallen to len.*/
prop->totallen = prop->len;
prop->data.pointer = newdataadr(fd, prop->data.pointer);
}
-void IDP_DirectLinkGroup(IDProperty *prop, int switch_endian, void *fd)
+static void IDP_DirectLinkGroup(IDProperty *prop, int switch_endian, void *fd)
{
ListBase *lb = &prop->data.group;
IDProperty *loop;
@@ -4874,7 +4874,7 @@ static void ntree_version_245(FileData *fd, Library *lib, bNodeTree *ntree)
}
}
-void idproperties_fix_groups_lengths_recurse(IDProperty *prop)
+static void idproperties_fix_groups_lengths_recurse(IDProperty *prop)
{
IDProperty *loop;
int i;
@@ -4889,7 +4889,7 @@ void idproperties_fix_groups_lengths_recurse(IDProperty *prop)
}
}
-void idproperties_fix_group_lengths(ListBase idlist)
+static void idproperties_fix_group_lengths(ListBase idlist)
{
ID *id;
@@ -4900,7 +4900,7 @@ void idproperties_fix_group_lengths(ListBase idlist)
}
}
-void alphasort_version_246(FileData *fd, Library *lib, Mesh *me)
+static void alphasort_version_246(FileData *fd, Library *lib, Mesh *me)
{
Material *ma;
MFace *mf;
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 9ca9a3d9287..3c2ca92f3fc 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -399,7 +399,7 @@ static void writedata(WriteData *wd, int filecode, int len, void *adr) /* do not
void IDP_WriteProperty_OnlyData(IDProperty *prop, void *wd);
void IDP_WriteProperty(IDProperty *prop, void *wd);
-void IDP_WriteArray(IDProperty *prop, void *wd)
+static void IDP_WriteArray(IDProperty *prop, void *wd)
{
/*REMEMBER to set totalen to len in the linking code!!*/
if (prop->data.pointer) {
@@ -407,13 +407,13 @@ void IDP_WriteArray(IDProperty *prop, void *wd)
}
}
-void IDP_WriteString(IDProperty *prop, void *wd)
+static void IDP_WriteString(IDProperty *prop, void *wd)
{
/*REMEMBER to set totalen to len in the linking code!!*/
writedata(wd, DATA, prop->len+1, prop->data.pointer);
}
-void IDP_WriteGroup(IDProperty *prop, void *wd)
+static void IDP_WriteGroup(IDProperty *prop, void *wd)
{
IDProperty *loop;
@@ -1066,7 +1066,7 @@ static void write_mballs(WriteData *wd, ListBase *idbase)
}
}
-int amount_of_chars(char *str)
+static int amount_of_chars(char *str)
{
// Since the data is saved as UTF-8 to the cu->str
// The cu->len is not same as the strlen(cu->str)
diff --git a/source/blender/include/BIF_editmesh.h b/source/blender/include/BIF_editmesh.h
index 9354a577ac1..30e9e16355e 100644
--- a/source/blender/include/BIF_editmesh.h
+++ b/source/blender/include/BIF_editmesh.h
@@ -73,7 +73,7 @@ extern void add_primitiveMesh(int type);
extern void adduplicate_mesh(void);
extern void add_click_mesh(void);
extern void addedgeface_mesh(void);
-void addfaces_from_edgenet();
+void addfaces_from_edgenet(void);
/* ******************* editmesh_lib.c */
@@ -221,7 +221,7 @@ extern void beauty_fill(void);
extern void join_triangles(void);
extern void edge_flip(void);
extern void fill_mesh(void);
-extern void bevel_menu();
+extern void bevel_menu(void);
void mesh_set_face_flags(short mode);
extern void mesh_set_smooth_faces(short event);
extern void mesh_rotate_uvs(void);
diff --git a/source/blender/include/BIF_editparticle.h b/source/blender/include/BIF_editparticle.h
index 41d86565b13..aecaee31d53 100644
--- a/source/blender/include/BIF_editparticle.h
+++ b/source/blender/include/BIF_editparticle.h
@@ -54,7 +54,7 @@ short PE_get_current_num(struct Object *ob);
int PE_minmax(float *min, float *max);
void PE_get_colors(char sel[4], char nosel[4]);
struct ParticleEditSettings *PE_settings(void);
-struct RadialControl **PE_radialcontrol();
+struct RadialControl **PE_radialcontrol(void);
/* update calls */
void PE_hide_keys_time(struct ParticleSystem *psys, float cfra);
diff --git a/source/blender/include/BIF_retopo.h b/source/blender/include/BIF_retopo.h
index 5d39923a398..cc2fda56b07 100644
--- a/source/blender/include/BIF_retopo.h
+++ b/source/blender/include/BIF_retopo.h
@@ -79,27 +79,27 @@ typedef struct RetopoPaintData {
struct View3D *paint_v3d;
} RetopoPaintData;
-RetopoPaintData *get_retopo_paint_data();
+RetopoPaintData *get_retopo_paint_data(void);
-char retopo_mesh_check();
-char retopo_curve_check();
+char retopo_mesh_check(void);
+char retopo_curve_check(void);
-void retopo_end_okee();
+void retopo_end_okee(void);
void retopo_free_paint_data(RetopoPaintData *rpd);
-void retopo_free_paint();
+void retopo_free_paint(void);
-char retopo_mesh_paint_check();
+char retopo_mesh_paint_check(void);
void retopo_paint_view_update(struct View3D *v3d);
-void retopo_force_update();
+void retopo_force_update(void);
void retopo_paint_toggle(void*,void*);
char retopo_paint(const unsigned short event);
-void retopo_draw_paint_lines();
+void retopo_draw_paint_lines(void);
RetopoPaintData *retopo_paint_data_copy(RetopoPaintData *rpd);
void retopo_toggle(void*,void*);
void retopo_do_vert(struct View3D *v3d, float *v);
-void retopo_do_all();
+void retopo_do_all(void);
void retopo_do_all_cb(void *, void *);
void retopo_queue_updates(struct View3D *v3d);
diff --git a/source/blender/python/BPY_interface.c b/source/blender/python/BPY_interface.c
index 31609970f6f..59b72702c50 100644
--- a/source/blender/python/BPY_interface.c
+++ b/source/blender/python/BPY_interface.c
@@ -100,7 +100,7 @@ PyObject *bpy_orig_syspath_List = NULL;
* creates list in __main__ module dict
*/
-int setup_armature_weakrefs()
+static int setup_armature_weakrefs()
{
PyObject *maindict;
PyObject *main_module;
@@ -159,19 +159,18 @@ ScriptError g_script_error;
/***************************************************************************
* Function prototypes
***************************************************************************/
-PyObject *RunPython( Text * text, PyObject * globaldict );
-PyObject *CreateGlobalDictionary( void );
-void ReleaseGlobalDictionary( PyObject * dict );
-void DoAllScriptsFromList( ListBase * list, short event );
+static PyObject *RunPython( Text * text, PyObject * globaldict );
+static PyObject *CreateGlobalDictionary( void );
+static void ReleaseGlobalDictionary( PyObject * dict );
+static void DoAllScriptsFromList( ListBase * list, short event );
static PyObject *importText( char *name );
-void init_ourImport( void );
-void init_ourReload( void );
-PyObject *blender_import( PyObject * self, PyObject * args );
-PyObject *RunPython2( Text * text, PyObject * globaldict, PyObject *localdict );
+static void init_ourImport( void );
+static void init_ourReload( void );
+static PyObject *blender_import( PyObject * self, PyObject * args );
-void BPY_Err_Handle( char *script_name );
-PyObject *traceback_getFilename( PyObject * tb );
+static void BPY_Err_Handle( char *script_name );
+static PyObject *traceback_getFilename( PyObject * tb );
/****************************************************************************
* Description: This function will start the interpreter and load all modules
@@ -507,7 +506,7 @@ const char *BPY_Err_getFilename( void )
/*****************************************************************************/
/* Description: Return PyString filename from a traceback object */
/*****************************************************************************/
-PyObject *traceback_getFilename( PyObject * tb )
+static PyObject *traceback_getFilename( PyObject * tb )
{
PyObject *v = NULL;
@@ -531,7 +530,7 @@ PyObject *traceback_getFilename( PyObject * tb )
* Description: Blender Python error handler. This catches the error and
* stores filename and line number in a global
*****************************************************************************/
-void BPY_Err_Handle( char *script_name )
+static void BPY_Err_Handle( char *script_name )
{
PyObject *exception, *err, *tb, *v;
@@ -2713,7 +2712,7 @@ int BPY_call_importloader( char *name )
* The Python dictionary containing global variables needs to
* be passed in globaldict.
*****************************************************************************/
-PyObject *RunPython( Text * text, PyObject * globaldict )
+static PyObject *RunPython( Text * text, PyObject * globaldict )
{
char *buf = NULL;
@@ -2741,7 +2740,7 @@ PyObject *RunPython( Text * text, PyObject * globaldict )
/*****************************************************************************
* Description: This function creates a new Python dictionary object.
*****************************************************************************/
-PyObject *CreateGlobalDictionary( void )
+static PyObject *CreateGlobalDictionary( void )
{
PyObject *dict = PyDict_New( );
@@ -2755,7 +2754,7 @@ PyObject *CreateGlobalDictionary( void )
/*****************************************************************************
* Description: This function deletes a given Python dictionary object.
*****************************************************************************/
-void ReleaseGlobalDictionary( PyObject * dict )
+static void ReleaseGlobalDictionary( PyObject * dict )
{
PyDict_Clear( dict );
Py_DECREF( dict ); /* Release dictionary. */
@@ -2768,7 +2767,7 @@ void ReleaseGlobalDictionary( PyObject * dict )
* list argument. The event by which the function has been
* called, is passed in the event argument.
*****************************************************************************/
-void DoAllScriptsFromList( ListBase * list, short event )
+static void DoAllScriptsFromList( ListBase * list, short event )
{
ID *id;
@@ -2821,7 +2820,7 @@ static PyMethodDef bimport[] = {
{"blimport", blender_import, METH_VARARGS, "our own import"}
};
-PyObject *blender_import( PyObject * self, PyObject * args )
+static PyObject *blender_import( PyObject * self, PyObject * args )
{
PyObject *exception, *err, *tb;
char *name;
@@ -2852,7 +2851,7 @@ PyObject *blender_import( PyObject * self, PyObject * args )
return m;
}
-void init_ourImport( void )
+static void init_ourImport( void )
{
PyObject *m, *d;
PyObject *import = PyCFunction_New( bimport, NULL );
@@ -2953,7 +2952,7 @@ static PyMethodDef breload[] = {
{"blreload", blender_reload, METH_VARARGS, "our own reload"}
};
-void init_ourReload( void )
+static void init_ourReload( void )
{
PyObject *m, *d;
PyObject *reload = PyCFunction_New( breload, NULL );
diff --git a/source/blender/python/api2_2x/Armature.c b/source/blender/python/api2_2x/Armature.c
index 0db87c00dd2..acf18ac6058 100644
--- a/source/blender/python/api2_2x/Armature.c
+++ b/source/blender/python/api2_2x/Armature.c
@@ -57,9 +57,9 @@ static const char sArmatureBadArgs[] = "ArmatureType - Bad Arguments: ";
static const char sModuleError[] = "Blender.Armature - Error: ";
static const char sModuleBadArgs[] = "Blender.Armature - Bad Arguments: ";
-PyObject * arm_weakref_callback_weakref_dealloc(PyObject *self, PyObject *weakref);
+static PyObject * arm_weakref_callback_weakref_dealloc(PyObject *self, PyObject *weakref);
/* python callable */
-PyObject * arm_weakref_callback_weakref_dealloc__pyfunc;
+static PyObject * arm_weakref_callback_weakref_dealloc__pyfunc;
//################## BonesDict_Type (internal) ########################
/*This is an internal psuedo-dictionary type that allows for manipulation
@@ -1323,7 +1323,7 @@ PyObject *Armature_RebuildBones(PyObject *pyarmature)
}
/* internal func to remove weakref from weakref list */
-PyObject * arm_weakref_callback_weakref_dealloc(PyObject *self, PyObject *weakref)
+static PyObject * arm_weakref_callback_weakref_dealloc(PyObject *self, PyObject *weakref)
{
char *list_name = ARM_WEAKREF_LIST_NAME;
PyObject *maindict = NULL, *armlist = NULL;
diff --git a/source/blender/python/api2_2x/Draw.c b/source/blender/python/api2_2x/Draw.c
index b04366d5579..c942657fbd0 100644
--- a/source/blender/python/api2_2x/Draw.c
+++ b/source/blender/python/api2_2x/Draw.c
@@ -1156,10 +1156,12 @@ static PyObject *Method_UIBlock( PyObject * self, PyObject * args )
Py_RETURN_NONE;
}
-void Set_uiBlock(uiBlock *block)
+#if 0 /* not used yet */
+static void Set_uiBlock(uiBlock *block)
{
uiblock = block;
}
+#endif
static uiBlock *Get_uiBlock( void )
{
diff --git a/source/blender/python/api2_2x/Geometry.c b/source/blender/python/api2_2x/Geometry.c
index ac3527fcbc2..6b7ec911c81 100644
--- a/source/blender/python/api2_2x/Geometry.c
+++ b/source/blender/python/api2_2x/Geometry.c
@@ -349,7 +349,7 @@ static PyObject *M_Geometry_PointInQuad2D( PyObject * self, PyObject * args )
return PyInt_FromLong(IsectPQ2Df(pt_vec->vec, quad_p1->vec, quad_p2->vec, quad_p3->vec, quad_p4->vec));
}
-int boxPack_FromPyObject(PyObject * value, boxPack **boxarray )
+static int boxPack_FromPyObject(PyObject * value, boxPack **boxarray )
{
int len, i;
PyObject *list_item, *item_1, *item_2;
@@ -393,7 +393,7 @@ int boxPack_FromPyObject(PyObject * value, boxPack **boxarray )
return 0;
}
-void boxPack_ToPyObject(PyObject * value, boxPack **boxarray)
+static void boxPack_ToPyObject(PyObject * value, boxPack **boxarray)
{
int len, i;
PyObject *list_item;
diff --git a/source/blender/python/api2_2x/Group.c b/source/blender/python/api2_2x/Group.c
index 3152d3a973f..0998053e7e1 100644
--- a/source/blender/python/api2_2x/Group.c
+++ b/source/blender/python/api2_2x/Group.c
@@ -56,8 +56,8 @@
/* Python API function prototypes for the Blender module. */
/*****************************************************************************/
static PyObject *M_Group_New( PyObject * self, PyObject * args );
-PyObject *M_Group_Get( PyObject * self, PyObject * args );
-PyObject *M_Group_Unlink( PyObject * self, BPy_Group * pygrp );
+static PyObject *M_Group_Get( PyObject * self, PyObject * args );
+static PyObject *M_Group_Unlink( PyObject * self, BPy_Group * pygrp );
/* internal */
static PyObject *GroupObSeq_CreatePyObject( BPy_Group *self, GroupObject *iter );
@@ -405,7 +405,7 @@ PyObject *M_Group_New( PyObject * self, PyObject * args )
/* Function: M_Group_Get */
/* Python equivalent: Blender.Group.Get */
/*****************************************************************************/
-PyObject *M_Group_Get( PyObject * self, PyObject * args )
+static PyObject *M_Group_Get( PyObject * self, PyObject * args )
{
char *name = NULL;
Group *group_iter;
@@ -475,7 +475,7 @@ PyObject *M_Group_Get( PyObject * self, PyObject * args )
/* Function: M_Group_Unlink */
/* Python equivalent: Blender.Group.Unlink */
/*****************************************************************************/
-PyObject *M_Group_Unlink( PyObject * self, BPy_Group * pygrp )
+static PyObject *M_Group_Unlink( PyObject * self, BPy_Group * pygrp )
{
Group *group;
if( !BPy_Group_Check(pygrp) )
diff --git a/source/blender/python/api2_2x/IDProp.c b/source/blender/python/api2_2x/IDProp.c
index 4a51619aec4..07269e54c7c 100644
--- a/source/blender/python/api2_2x/IDProp.c
+++ b/source/blender/python/api2_2x/IDProp.c
@@ -154,7 +154,7 @@ PyObject *BPy_IDGroup_GetName(BPy_IDProperty *self, void *bleh)
return PyString_FromString(self->prop->name);
}
-int BPy_IDGroup_SetName(BPy_IDProperty *self, PyObject *value, void *bleh)
+static int BPy_IDGroup_SetName(BPy_IDProperty *self, PyObject *value, void *bleh)
{
char *st;
if (!PyString_Check(value))
@@ -168,7 +168,7 @@ int BPy_IDGroup_SetName(BPy_IDProperty *self, PyObject *value, void *bleh)
return 0;
}
-PyObject *BPy_IDGroup_GetType(BPy_IDProperty *self)
+static PyObject *BPy_IDGroup_GetType(BPy_IDProperty *self)
{
return PyInt_FromLong((long)self->prop->type);
}
@@ -181,7 +181,7 @@ static PyGetSetDef BPy_IDGroup_getseters[] = {
{NULL, NULL, NULL, NULL, NULL}
};
-int BPy_IDGroup_Map_Len(BPy_IDProperty *self)
+static int BPy_IDGroup_Map_Len(BPy_IDProperty *self)
{
if (self->prop->type != IDP_GROUP)
return EXPP_ReturnIntError( PyExc_TypeError,
@@ -190,7 +190,7 @@ int BPy_IDGroup_Map_Len(BPy_IDProperty *self)
return self->prop->len;
}
-PyObject *BPy_IDGroup_Map_GetItem(BPy_IDProperty *self, PyObject *item)
+static PyObject *BPy_IDGroup_Map_GetItem(BPy_IDProperty *self, PyObject *item)
{
IDProperty *loop;
char *st;
@@ -212,7 +212,7 @@ PyObject *BPy_IDGroup_Map_GetItem(BPy_IDProperty *self, PyObject *item)
}
/*returns NULL on success, error string on failure*/
-char *BPy_IDProperty_Map_ValidateAndCreate(char *name, IDProperty *group, PyObject *ob)
+static char *BPy_IDProperty_Map_ValidateAndCreate(char *name, IDProperty *group, PyObject *ob)
{
IDProperty *prop = NULL;
IDPropertyTemplate val = {0};
@@ -297,7 +297,7 @@ char *BPy_IDProperty_Map_ValidateAndCreate(char *name, IDProperty *group, PyObje
return NULL;
}
-int BPy_IDGroup_Map_SetItem(BPy_IDProperty *self, PyObject *key, PyObject *val)
+static int BPy_IDGroup_Map_SetItem(BPy_IDProperty *self, PyObject *key, PyObject *val)
{
char *err;
@@ -325,7 +325,7 @@ int BPy_IDGroup_Map_SetItem(BPy_IDProperty *self, PyObject *key, PyObject *val)
return 0;
}
-PyObject *BPy_IDGroup_SpawnIterator(BPy_IDProperty *self)
+static PyObject *BPy_IDGroup_SpawnIterator(BPy_IDProperty *self)
{
BPy_IDGroup_Iter *iter = PyObject_New(BPy_IDGroup_Iter, &IDGroup_Iter_Type);
@@ -339,7 +339,7 @@ PyObject *BPy_IDGroup_SpawnIterator(BPy_IDProperty *self)
return (PyObject*) iter;
}
-PyObject *BPy_IDGroup_MapDataToPy(IDProperty *prop)
+static PyObject *BPy_IDGroup_MapDataToPy(IDProperty *prop)
{
switch (prop->type) {
case IDP_STRING:
@@ -401,7 +401,7 @@ PyObject *BPy_IDGroup_MapDataToPy(IDProperty *prop)
"eek!! a property exists with a bad type code!!!" );
}
-PyObject *BPy_IDGroup_Pop(BPy_IDProperty *self, PyObject *value)
+static PyObject *BPy_IDGroup_Pop(BPy_IDProperty *self, PyObject *value)
{
IDProperty *loop;
PyObject *pyform;
@@ -431,7 +431,7 @@ PyObject *BPy_IDGroup_Pop(BPy_IDProperty *self, PyObject *value)
"item not in group" );
}
-PyObject *BPy_IDGroup_IterItems(BPy_IDProperty *self)
+static PyObject *BPy_IDGroup_IterItems(BPy_IDProperty *self)
{
BPy_IDGroup_Iter *iter = PyObject_New(BPy_IDGroup_Iter, &IDGroup_Iter_Type);
@@ -446,7 +446,7 @@ PyObject *BPy_IDGroup_IterItems(BPy_IDProperty *self)
return (PyObject*) iter;
}
-PyObject *BPy_IDGroup_GetKeys(BPy_IDProperty *self)
+static PyObject *BPy_IDGroup_GetKeys(BPy_IDProperty *self)
{
PyObject *seq = PyList_New(self->prop->len);
IDProperty *loop;
@@ -481,7 +481,7 @@ PyObject *BPy_IDGroup_GetKeys(BPy_IDProperty *self)
return seq;
}
-PyObject *BPy_IDGroup_GetValues(BPy_IDProperty *self)
+static PyObject *BPy_IDGroup_GetValues(BPy_IDProperty *self)
{
PyObject *seq = PyList_New(self->prop->len);
IDProperty *loop;
@@ -517,7 +517,7 @@ PyObject *BPy_IDGroup_GetValues(BPy_IDProperty *self)
return seq;
}
-PyObject *BPy_IDGroup_HasKey(BPy_IDProperty *self, PyObject *value)
+static PyObject *BPy_IDGroup_HasKey(BPy_IDProperty *self, PyObject *value)
{
IDProperty *loop;
char *name = PyString_AsString(value);
@@ -533,7 +533,7 @@ PyObject *BPy_IDGroup_HasKey(BPy_IDProperty *self, PyObject *value)
Py_RETURN_FALSE;
}
-PyObject *BPy_IDGroup_Update(BPy_IDProperty *self, PyObject *vars)
+static PyObject *BPy_IDGroup_Update(BPy_IDProperty *self, PyObject *vars)
{
PyObject *pyob, *pkey, *pval;
Py_ssize_t i=0;
@@ -555,7 +555,7 @@ PyObject *BPy_IDGroup_Update(BPy_IDProperty *self, PyObject *vars)
Py_RETURN_NONE;
}
-PyObject *BPy_IDGroup_ConvertToPy(BPy_IDProperty *self)
+static PyObject *BPy_IDGroup_ConvertToPy(BPy_IDProperty *self)
{
return BPy_IDGroup_MapDataToPy(self->prop);
}
@@ -665,18 +665,18 @@ PyObject *BPy_Wrap_IDProperty(ID *id, IDProperty *prop, IDProperty *parent)
/********Array Wrapper********/
-PyObject *IDArray_repr(BPy_IDArray *self)
+static PyObject *IDArray_repr(BPy_IDArray *self)
{
return PyString_FromString("(ID Array)");
}
-PyObject *BPy_IDArray_GetType(BPy_IDArray *self)
+static PyObject *BPy_IDArray_GetType(BPy_IDArray *self)
{
return PyInt_FromLong( (long)self->prop->subtype );
}
-PyObject *BPy_IDArray_GetLen(BPy_IDArray *self)
+static PyObject *BPy_IDArray_GetLen(BPy_IDArray *self)
{
return PyInt_FromLong( (long)self->prop->len );
}
@@ -693,12 +693,12 @@ static PyGetSetDef BPy_IDArray_getseters[] = {
{NULL, NULL, NULL, NULL, NULL},
};
-int BPy_IDArray_Len(BPy_IDArray *self)
+static int BPy_IDArray_Len(BPy_IDArray *self)
{
return self->prop->len;
}
-PyObject *BPy_IDArray_GetItem(BPy_IDArray *self, int index)
+static PyObject *BPy_IDArray_GetItem(BPy_IDArray *self, int index)
{
if (index < 0 || index >= self->prop->len)
return EXPP_ReturnPyObjError( PyExc_IndexError,
@@ -719,7 +719,7 @@ PyObject *BPy_IDArray_GetItem(BPy_IDArray *self, int index)
"invalid/corrupt array type!");
}
-int BPy_IDArray_SetItem(BPy_IDArray *self, int index, PyObject *val)
+static int BPy_IDArray_SetItem(BPy_IDArray *self, int index, PyObject *val)
{
int i;
float f;
@@ -865,18 +865,18 @@ PyTypeObject IDArray_Type = {
/*********** ID Property Group iterator ********/
-PyObject *IDGroup_Iter_iterself(PyObject *self)
+static PyObject *IDGroup_Iter_iterself(PyObject *self)
{
Py_XINCREF(self);
return self;
}
-PyObject *IDGroup_Iter_repr(BPy_IDGroup_Iter *self)
+static PyObject *IDGroup_Iter_repr(BPy_IDGroup_Iter *self)
{
return PyString_FromString("(ID Property Group)");
}
-PyObject *BPy_Group_Iter_Next(BPy_IDGroup_Iter *self)
+static PyObject *BPy_Group_Iter_Next(BPy_IDGroup_Iter *self)
{
IDProperty *cur=NULL;
PyObject *tmpval;
diff --git a/source/blender/python/api2_2x/Ipo.c b/source/blender/python/api2_2x/Ipo.c
index 7c2e18bcdf6..e6c67534a36 100644
--- a/source/blender/python/api2_2x/Ipo.c
+++ b/source/blender/python/api2_2x/Ipo.c
@@ -1027,7 +1027,6 @@ static PyObject *Ipo_getCurveNames( BPy_Ipo * self )
{
namefunc lookup_name;
int size;
- PyObject *dict;
int *vals = NULL;
char name[32];
PyObject *attr = Py_None;
@@ -1131,7 +1130,6 @@ static PyObject *Ipo_getCurveNames( BPy_Ipo * self )
* with string as key and adrcode as value
*/
- dict = PyModule_GetDict( submodule );
attr = PyConstant_New();
while( size-- ) {
@@ -1148,7 +1146,7 @@ static PyObject *Ipo_getCurveNames( BPy_Ipo * self )
return attr;
}
-void generate_curveconsts( PyObject* module )
+static void generate_curveconsts( PyObject* module )
{
namefunc lookup_name = NULL;
int size = 0;
diff --git a/source/blender/python/api2_2x/Material.c b/source/blender/python/api2_2x/Material.c
index d3bb6c8d158..ef19fab462a 100644
--- a/source/blender/python/api2_2x/Material.c
+++ b/source/blender/python/api2_2x/Material.c
@@ -699,7 +699,7 @@ static PyObject *Material_clearScriptLinks(BPy_Material *self, PyObject *args);
static PyObject *Material_insertIpoKey( BPy_Material * self, PyObject * args );
static PyObject *Material_getColorband( BPy_Material * self, void * type);
-int Material_setColorband( BPy_Material * self, PyObject * value, void * type);
+static int Material_setColorband( BPy_Material * self, PyObject * value, void * type);
static PyObject *Material_copy( BPy_Material * self );
static PyObject *Material_freeNodes( BPy_Material * self );
@@ -2782,10 +2782,10 @@ int EXPP_Colorband_fromPyList( ColorBand **coba, PyObject * value )
for (i=0; i<5; i++) {
pyflt = PySequence_GetItem( colseq, i );
if (!PyNumber_Check(pyflt)) {
- return ( EXPP_ReturnIntError( PyExc_ValueError,
- "Colorband colors must be sequences of 5 floats" ) );
Py_DECREF ( pyflt );
Py_DECREF ( colseq );
+ return ( EXPP_ReturnIntError( PyExc_ValueError,
+ "Colorband colors must be sequences of 5 floats" ) );
}
Py_DECREF ( pyflt );
}
@@ -3038,7 +3038,7 @@ static PyObject *Material_getColorband( BPy_Material * self, void * type)
Py_RETURN_NONE;
}
-int Material_setColorband( BPy_Material * self, PyObject * value, void * type)
+static int Material_setColorband( BPy_Material * self, PyObject * value, void * type)
{
switch( (long)type ) {
case 0: /* these are backwards, but that how it works */
diff --git a/source/blender/python/api2_2x/Mesh.c b/source/blender/python/api2_2x/Mesh.c
index 6471fb16e92..d513a8be4db 100644
--- a/source/blender/python/api2_2x/Mesh.c
+++ b/source/blender/python/api2_2x/Mesh.c
@@ -160,7 +160,7 @@ typedef struct FaceEdges {
* compare edges by vertex indices
*/
-int medge_comp( const void *va, const void *vb )
+static int medge_comp( const void *va, const void *vb )
{
const unsigned int *a = ((SrchEdges *)va)->v;
const unsigned int *b = ((SrchEdges *)vb)->v;
@@ -180,7 +180,7 @@ int medge_comp( const void *va, const void *vb )
* compare edges by insert list indices
*/
-int medge_index_comp( const void *va, const void *vb )
+static int medge_index_comp( const void *va, const void *vb )
{
const SrchEdges *a = (SrchEdges *)va;
const SrchEdges *b = (SrchEdges *)vb;
@@ -196,7 +196,7 @@ int medge_index_comp( const void *va, const void *vb )
* compare faces by vertex indices
*/
-int mface_comp( const void *va, const void *vb )
+static int mface_comp( const void *va, const void *vb )
{
const SrchFaces *a = va;
const SrchFaces *b = vb;
@@ -231,7 +231,7 @@ int mface_comp( const void *va, const void *vb )
* compare faces by insert list indices
*/
-int mface_index_comp( const void *va, const void *vb )
+static int mface_index_comp( const void *va, const void *vb )
{
const SrchFaces *a = va;
const SrchFaces *b = vb;
@@ -248,7 +248,7 @@ int mface_index_comp( const void *va, const void *vb )
* compare edges by vertex indices
*/
-int faceedge_comp( const void *va, const void *vb )
+static int faceedge_comp( const void *va, const void *vb )
{
const unsigned int *a = ((FaceEdges *)va)->v;
const unsigned int *b = ((FaceEdges *)vb)->v;
diff --git a/source/blender/python/api2_2x/NMesh.c b/source/blender/python/api2_2x/NMesh.c
index e7ed89573fb..28407f174da 100644
--- a/source/blender/python/api2_2x/NMesh.c
+++ b/source/blender/python/api2_2x/NMesh.c
@@ -88,9 +88,6 @@ extern void countall(void);
#define NMESH_SUBDIV_MIN 0
#define NMESH_SUBDIV_MAX 6
-/* Globals */
-static PyObject *g_nmeshmodule = NULL;
-
static int unlink_existingMeshData( Mesh * mesh );
static int convert_NMeshToMesh( Mesh *mesh, BPy_NMesh *nmesh );
static void check_dverts(Mesh *me, int old_totverts);
@@ -3321,7 +3318,6 @@ PyObject *NMesh_Init( void )
if( EdgeFlags )
PyModule_AddObject( submodule, "EdgeFlags", EdgeFlags );
- g_nmeshmodule = submodule;
return submodule;
}
diff --git a/source/blender/python/api2_2x/Object.c b/source/blender/python/api2_2x/Object.c
index da80e0a25cb..4495dc6c655 100644
--- a/source/blender/python/api2_2x/Object.c
+++ b/source/blender/python/api2_2x/Object.c
@@ -1698,11 +1698,9 @@ static PyObject *Object_getBoundBox( BPy_Object * self, PyObject *args )
"This object isn't linked to any object data (mesh, curve, etc) yet" );
if( !self->object->bb ) { /* if no ob bbox, we look in obdata */
- Mesh *me;
Curve *curve;
switch ( self->object->type ) {
case OB_MESH:
- me = self->object->data;
vec = (float*) mesh_get_bb(self->object)->vec;
break;
case OB_CURVE:
diff --git a/source/blender/python/api2_2x/Scene.c b/source/blender/python/api2_2x/Scene.c
index 662656663c1..8a2be2391a4 100644
--- a/source/blender/python/api2_2x/Scene.c
+++ b/source/blender/python/api2_2x/Scene.c
@@ -591,7 +591,7 @@ PyObject *Scene_CreatePyObject( Scene * scene )
}
/*-----------------------FromPyObject-----------------------------------*/
-Scene *Scene_FromPyObject( PyObject * pyobj )
+static Scene *Scene_FromPyObject( PyObject * pyobj )
{
return ( ( BPy_Scene * ) pyobj )->scene;
}
@@ -1221,7 +1221,7 @@ static PyObject *SceneObSeq_getObjects( BPy_SceneObSeq *self, void *mode)
return SceneObSeq_CreatePyObject(self->bpyscene, NULL, (int)((long)mode));
}
-int SceneObSeq_setObjects( BPy_SceneObSeq *self, PyObject *value, void *_mode_)
+static int SceneObSeq_setObjects( BPy_SceneObSeq *self, PyObject *value, void *_mode_)
{
/*
ONLY SUPPORTS scn.objects.selected and scn.objects.context
@@ -1642,7 +1642,7 @@ static PyObject *SceneObSeq_unlink( BPy_SceneObSeq * self, PyObject *args )
Py_RETURN_FALSE;
}
-PyObject *SceneObSeq_getActive(BPy_SceneObSeq *self)
+static PyObject *SceneObSeq_getActive(BPy_SceneObSeq *self)
{
Base *base;
SCENE_DEL_CHECK_PY(self->bpyscene);
@@ -1687,7 +1687,7 @@ static int SceneObSeq_setActive(BPy_SceneObSeq *self, PyObject *value)
return 0;
}
-PyObject *SceneObSeq_getCamera(BPy_SceneObSeq *self)
+static PyObject *SceneObSeq_getCamera(BPy_SceneObSeq *self)
{
SCENE_DEL_CHECK_PY(self->bpyscene);
diff --git a/source/blender/python/api2_2x/Sys.c b/source/blender/python/api2_2x/Sys.c
index baae2220143..16d879c3032 100644
--- a/source/blender/python/api2_2x/Sys.c
+++ b/source/blender/python/api2_2x/Sys.c
@@ -149,16 +149,12 @@ struct PyMethodDef M_sys_methods[] = {
/* Module Functions */
-static PyObject *g_sysmodule = NULL; /* pointer to Blender.sys module */
-
PyObject *sys_Init( void )
{
PyObject *submodule, *dict;
submodule = Py_InitModule3( "Blender.sys", M_sys_methods, M_sys_doc );
- g_sysmodule = submodule;
-
dict = PyModule_GetDict( submodule );
EXPP_dict_set_item_str( dict, "dirsep", PyString_FromString(DIRSEP_STR) );
diff --git a/source/blender/python/api2_2x/Window.c b/source/blender/python/api2_2x/Window.c
index 41a4e4e215f..a4c7802ff34 100644
--- a/source/blender/python/api2_2x/Window.c
+++ b/source/blender/python/api2_2x/Window.c
@@ -1209,7 +1209,7 @@ static PyObject *M_Window_QHandle( PyObject * self, PyObject * args )
if( sa ) {
BWinEvent evt;
- short do_redraw = 0, do_change = 0;
+ short do_redraw = 0;
if( sa != curarea || sa->win != mywinget( ) ) {
oldsa = curarea;
@@ -1221,7 +1221,6 @@ static PyObject *M_Window_QHandle( PyObject * self, PyObject * args )
do_redraw = 1;
} else if( evt.event == CHANGED ) {
sa->win_swap = 0;
- do_change = 1;
do_redraw = 1;
} else {
scrarea_do_winhandle( sa, &evt );
diff --git a/source/blender/python/api2_2x/bpy_data.c b/source/blender/python/api2_2x/bpy_data.c
index 47232c6707a..d3499a79874 100644
--- a/source/blender/python/api2_2x/bpy_data.c
+++ b/source/blender/python/api2_2x/bpy_data.c
@@ -243,7 +243,7 @@ static PyObject *LibBlockSeq_nextIter( BPy_LibBlockSeq * self )
return object;
}
-PyObject *LibBlockSeq_getActive(BPy_LibBlockSeq *self)
+static PyObject *LibBlockSeq_getActive(BPy_LibBlockSeq *self)
{
switch (self->type) {
case ID_SCE:
@@ -382,7 +382,7 @@ static int LibBlockSeq_setTag(BPy_LibBlockSeq *self, PyObject *value)
/* New Data, internal functions */
-Mesh *add_mesh__internal(char *name)
+static Mesh *add_mesh__internal(char *name)
{
Mesh *mesh = add_mesh(name); /* doesn't return NULL now, but might someday */
@@ -453,8 +453,7 @@ PyObject *LibBlockSeq_new(BPy_LibBlockSeq *self, PyObject * args, PyObject *kwd)
return EXPP_ReturnPyObjError( PyExc_IOError,
"couldn't create pyobject on load, unknown error" );
if (name) {
- ID *id = ((BPy_GenericLib *)ret)->id;
- rename_id( id, name );
+ rename_id( ((BPy_GenericLib *)ret)->id, name );
}
return ret;
}
@@ -599,7 +598,7 @@ PyObject *LibBlockSeq_new(BPy_LibBlockSeq *self, PyObject * args, PyObject *kwd)
}
-PyObject *LibBlockSeq_unlink(BPy_LibBlockSeq *self, PyObject * value)
+static PyObject *LibBlockSeq_unlink(BPy_LibBlockSeq *self, PyObject * value)
{
switch (self->type) {
case ID_SCE:
@@ -790,15 +789,12 @@ PyTypeObject LibBlockSeq_Type = {
PyObject * Data_Init( void )
{
PyObject *module;
- PyObject *dict;
-
PyType_Ready( &LibBlockSeq_Type );
PyType_Ready( &Config_Type );
/*submodule = Py_InitModule3( "Blender.Main", NULL, M_Main_doc );*/
module = Py_InitModule3( "bpy.data", NULL, "The bpy.data submodule" );
- dict = PyModule_GetDict( module );
/* Python Data Types */
PyModule_AddObject( module, "scenes", LibBlockSeq_CreatePyObject(NULL, ID_SCE) );
diff --git a/source/blender/python/api2_2x/constant.c b/source/blender/python/api2_2x/constant.c
index 7cf6a83e602..2bf1d189961 100644
--- a/source/blender/python/api2_2x/constant.c
+++ b/source/blender/python/api2_2x/constant.c
@@ -37,19 +37,19 @@ PyTypeObject constant_Type;
//------------------METHOD IMPLEMENTATIONS-----------------------------
//------------------------constant.items()
//Returns a list of key:value pairs like dict.items()
-PyObject* constant_items(BPy_constant *self)
+static PyObject* constant_items(BPy_constant *self)
{
return PyDict_Items(self->dict);
}
//------------------------constant.keys()
//Returns a list of keys like dict.keys()
-PyObject* constant_keys(BPy_constant *self)
+static PyObject* constant_keys(BPy_constant *self)
{
return PyDict_Keys(self->dict);
}
//------------------------constant.values()
//Returns a list of values like dict.values()
-PyObject* constant_values(BPy_constant *self)
+static PyObject* constant_values(BPy_constant *self)
{
return PyDict_Values(self->dict);
}
diff --git a/source/blender/python/api2_2x/matrix.c b/source/blender/python/api2_2x/matrix.c
index 9f5e49e8d88..79ca5e09b25 100644
--- a/source/blender/python/api2_2x/matrix.c
+++ b/source/blender/python/api2_2x/matrix.c
@@ -774,7 +774,7 @@ static PyObject *Matrix_mul(PyObject * m1, PyObject * m2)
return EXPP_ReturnPyObjError(PyExc_TypeError,
"Matrix multiplication: arguments not acceptable for this operation\n");
}
-PyObject* Matrix_inv(MatrixObject *self)
+static PyObject* Matrix_inv(MatrixObject *self)
{
return Matrix_Invert(self);
}
diff --git a/source/blender/python/api2_2x/sceneRender.c b/source/blender/python/api2_2x/sceneRender.c
index 7f88acd3a87..8e815b95ddf 100644
--- a/source/blender/python/api2_2x/sceneRender.c
+++ b/source/blender/python/api2_2x/sceneRender.c
@@ -397,13 +397,13 @@ static PyObject *M_Render_getInt( BPy_RenderData *self, int var )
/* Render Module Function Definitions */
/***************************************************************************/
-PyObject *M_Render_CloseRenderWindow( PyObject * self )
+static PyObject *M_Render_CloseRenderWindow( PyObject * self )
{
BIF_close_render_display( );
Py_RETURN_NONE;
}
-PyObject *M_Render_SetRenderWinPos( PyObject * self, PyObject * args )
+static PyObject *M_Render_SetRenderWinPos( PyObject * self, PyObject * args )
{
PyObject *list = NULL;
char *loc = NULL;
@@ -446,7 +446,7 @@ PyObject *M_Render_SetRenderWinPos( PyObject * self, PyObject * args )
Py_RETURN_NONE;
}
-PyObject *M_Render_EnableDispView( PyObject * self )
+static PyObject *M_Render_EnableDispView( PyObject * self )
{
G.displaymode = R_DISPLAYIMAGE;
EXPP_allqueue( REDRAWBUTSSCENE, 0 );
@@ -454,7 +454,7 @@ PyObject *M_Render_EnableDispView( PyObject * self )
Py_RETURN_NONE;
}
-PyObject *M_Render_EnableDispWin( PyObject * self )
+static PyObject *M_Render_EnableDispWin( PyObject * self )
{
G.displaymode = R_DISPLAYWIN;
EXPP_allqueue( REDRAWBUTSSCENE, 0 );
@@ -467,7 +467,7 @@ PyObject *M_Render_EnableDispWin( PyObject * self )
/* BPy_RenderData Function Definitions */
/***************************************************************************/
-PyObject *RenderData_Render( BPy_RenderData * self )
+static PyObject *RenderData_Render( BPy_RenderData * self )
{
Scene *oldsce;
/* unlock to prevent a deadlock when there are pynodes: */
@@ -511,7 +511,7 @@ PyObject *RenderData_Render( BPy_RenderData * self )
/* BPy_Bake Function Definitions */
/***************************************************************************/
-PyObject *RenderData_Bake( BPy_RenderData * self )
+static PyObject *RenderData_Bake( BPy_RenderData * self )
{
char *error_msg = NULL;
Scene *oldsce;
@@ -532,7 +532,7 @@ PyObject *RenderData_Bake( BPy_RenderData * self )
/*
* This will save the rendered image to an output file path already defined.
*/
-PyObject *RenderData_SaveRenderedImage ( BPy_RenderData * self, PyObject *args )
+static PyObject *RenderData_SaveRenderedImage ( BPy_RenderData * self, PyObject *args )
{
char dir[FILE_MAXDIR * 2], str[FILE_MAXFILE * 2];
char *name_str, filepath[FILE_MAXDIR+FILE_MAXFILE];
@@ -571,7 +571,7 @@ PyObject *RenderData_SaveRenderedImage ( BPy_RenderData * self, PyObject *args )
Py_RETURN_NONE;
}
-PyObject *RenderData_RenderAnim( BPy_RenderData * self )
+static PyObject *RenderData_RenderAnim( BPy_RenderData * self )
{
Scene *oldsce;
/* unlock to prevent a deadlock when there are pynodes: */
@@ -609,7 +609,7 @@ PyObject *RenderData_RenderAnim( BPy_RenderData * self )
Py_RETURN_NONE;
}
-PyObject *RenderData_Play( BPy_RenderData * self )
+static PyObject *RenderData_Play( BPy_RenderData * self )
{
char file[FILE_MAXDIR + FILE_MAXFILE];
extern char bprogname[];
@@ -668,46 +668,46 @@ PyObject *RenderData_Play( BPy_RenderData * self )
Py_RETURN_NONE;
}
-PyObject *RenderData_EnableBackbuf( BPy_RenderData * self, PyObject * args )
+static PyObject *RenderData_EnableBackbuf( BPy_RenderData * self, PyObject * args )
{
return M_Render_BitToggleShort( args, 1,
&self->renderContext->bufflag );
}
-PyObject *RenderData_EnableExtensions( BPy_RenderData * self, PyObject * args )
+static PyObject *RenderData_EnableExtensions( BPy_RenderData * self, PyObject * args )
{
return M_Render_BitToggleInt( args, R_EXTENSION,
&self->renderContext->scemode );
}
-PyObject *RenderData_EnableSequencer( BPy_RenderData * self, PyObject * args )
+static PyObject *RenderData_EnableSequencer( BPy_RenderData * self, PyObject * args )
{
return M_Render_BitToggleInt( args, R_DOSEQ,
&self->renderContext->scemode );
}
-PyObject *RenderData_EnableRenderDaemon( BPy_RenderData * self,
+static PyObject *RenderData_EnableRenderDaemon( BPy_RenderData * self,
PyObject * args )
{
return M_Render_BitToggleInt( args, R_BG_RENDER,
&self->renderContext->scemode );
}
-PyObject *RenderData_EnableToonShading( BPy_RenderData * self,
+static PyObject *RenderData_EnableToonShading( BPy_RenderData * self,
PyObject * args )
{
return M_Render_BitToggleInt( args, R_EDGE,
&self->renderContext->mode );
}
-PyObject *RenderData_EdgeIntensity( BPy_RenderData * self, PyObject * args )
+static PyObject *RenderData_EdgeIntensity( BPy_RenderData * self, PyObject * args )
{
return M_Render_GetSetAttributeShort( args,
&self->renderContext->edgeint, 0,
255 );
}
-PyObject *RenderData_SetEdgeColor( BPy_RenderData * self, PyObject * args )
+static PyObject *RenderData_SetEdgeColor( BPy_RenderData * self, PyObject * args )
{
float red, green, blue;
@@ -732,7 +732,7 @@ PyObject *RenderData_SetEdgeColor( BPy_RenderData * self, PyObject * args )
Py_RETURN_NONE;
}
-PyObject *RenderData_GetEdgeColor( BPy_RenderData * self )
+static PyObject *RenderData_GetEdgeColor( BPy_RenderData * self )
{
char rgb[24];
@@ -741,7 +741,7 @@ PyObject *RenderData_GetEdgeColor( BPy_RenderData * self )
return PyString_FromString( rgb );
}
-PyObject *RenderData_EnableOversampling( BPy_RenderData * self,
+static PyObject *RenderData_EnableOversampling( BPy_RenderData * self,
PyObject * args )
{
return M_Render_BitToggleInt( args, R_OSA,
@@ -768,34 +768,34 @@ static int RenderData_setOSALevel( BPy_RenderData * self,
return 0;
}
-PyObject *RenderData_EnableMotionBlur( BPy_RenderData * self, PyObject * args )
+static PyObject *RenderData_EnableMotionBlur( BPy_RenderData * self, PyObject * args )
{
return M_Render_BitToggleInt( args, R_MBLUR,
&self->renderContext->mode );
}
-PyObject *RenderData_MotionBlurLevel( BPy_RenderData * self, PyObject * args )
+static PyObject *RenderData_MotionBlurLevel( BPy_RenderData * self, PyObject * args )
{
return M_Render_GetSetAttributeFloat( args,
&self->renderContext->blurfac,
0.01f, 5.0f );
}
-PyObject *RenderData_PartsX( BPy_RenderData * self, PyObject * args )
+static PyObject *RenderData_PartsX( BPy_RenderData * self, PyObject * args )
{
return M_Render_GetSetAttributeShort( args,
&self->renderContext->xparts, 1,
512 );
}
-PyObject *RenderData_PartsY( BPy_RenderData * self, PyObject * args )
+static PyObject *RenderData_PartsY( BPy_RenderData * self, PyObject * args )
{
return M_Render_GetSetAttributeShort( args,
&self->renderContext->yparts, 1,
64 );
}
-PyObject *RenderData_EnableSky( BPy_RenderData * self )
+static PyObject *RenderData_EnableSky( BPy_RenderData * self )
{
self->renderContext->alphamode = R_ADDSKY;
EXPP_allqueue( REDRAWBUTSSCENE, 0 );
@@ -803,7 +803,7 @@ PyObject *RenderData_EnableSky( BPy_RenderData * self )
Py_RETURN_NONE;
}
-PyObject *RenderData_EnablePremultiply( BPy_RenderData * self )
+static PyObject *RenderData_EnablePremultiply( BPy_RenderData * self )
{
self->renderContext->alphamode = R_ALPHAPREMUL;
EXPP_allqueue( REDRAWBUTSSCENE, 0 );
@@ -811,7 +811,7 @@ PyObject *RenderData_EnablePremultiply( BPy_RenderData * self )
Py_RETURN_NONE;
}
-PyObject *RenderData_EnableKey( BPy_RenderData * self )
+static PyObject *RenderData_EnableKey( BPy_RenderData * self )
{
self->renderContext->alphamode = R_ALPHAKEY;
EXPP_allqueue( REDRAWBUTSSCENE, 0 );
@@ -819,59 +819,59 @@ PyObject *RenderData_EnableKey( BPy_RenderData * self )
Py_RETURN_NONE;
}
-PyObject *RenderData_EnableShadow( BPy_RenderData * self, PyObject * args )
+static PyObject *RenderData_EnableShadow( BPy_RenderData * self, PyObject * args )
{
return M_Render_BitToggleInt( args, R_SHADOW,
&self->renderContext->mode );
}
-PyObject *RenderData_EnableEnvironmentMap( BPy_RenderData * self,
+static PyObject *RenderData_EnableEnvironmentMap( BPy_RenderData * self,
PyObject * args )
{
return M_Render_BitToggleInt( args, R_ENVMAP,
&self->renderContext->mode );
}
-PyObject *RenderData_EnablePanorama( BPy_RenderData * self, PyObject * args )
+static PyObject *RenderData_EnablePanorama( BPy_RenderData * self, PyObject * args )
{
return M_Render_BitToggleInt( args, R_PANORAMA,
&self->renderContext->mode );
}
-PyObject *RenderData_EnableRayTracing( BPy_RenderData * self, PyObject * args )
+static PyObject *RenderData_EnableRayTracing( BPy_RenderData * self, PyObject * args )
{
return M_Render_BitToggleInt( args, R_RAYTRACE,
&self->renderContext->mode );
}
-PyObject *RenderData_EnableRadiosityRender( BPy_RenderData * self,
+static PyObject *RenderData_EnableRadiosityRender( BPy_RenderData * self,
PyObject * args )
{
return M_Render_BitToggleInt( args, R_RADIO,
&self->renderContext->mode );
}
-PyObject *RenderData_EnableFieldRendering( BPy_RenderData * self,
+static PyObject *RenderData_EnableFieldRendering( BPy_RenderData * self,
PyObject * args )
{
return M_Render_BitToggleInt( args, R_FIELDS,
&self->renderContext->mode );
}
-PyObject *RenderData_EnableOddFieldFirst( BPy_RenderData * self,
+static PyObject *RenderData_EnableOddFieldFirst( BPy_RenderData * self,
PyObject * args )
{
return M_Render_BitToggleInt( args, R_ODDFIELD,
&self->renderContext->mode );
}
-PyObject *RenderData_EnableFieldTimeDisable( BPy_RenderData * self,
+static PyObject *RenderData_EnableFieldTimeDisable( BPy_RenderData * self,
PyObject * args )
{
return M_Render_BitToggleInt( args, R_FIELDSTILL,
&self->renderContext->mode );
}
-PyObject *RenderData_EnableGaussFilter( BPy_RenderData * self,
+static PyObject *RenderData_EnableGaussFilter( BPy_RenderData * self,
PyObject * args )
{
return M_Render_BitToggleInt( args, R_GAUSS,
@@ -882,7 +882,7 @@ PyObject *RenderData_EnableGaussFilter( BPy_RenderData * self,
/* choices are listed in DNA_scene_types.h (search filtertype) */
}
-PyObject *RenderData_EnableBorderRender( BPy_RenderData * self,
+static PyObject *RenderData_EnableBorderRender( BPy_RenderData * self,
PyObject * args )
{
return M_Render_BitToggleInt( args, R_BORDER,
@@ -924,57 +924,57 @@ static PyObject *RenderData_getBorder( BPy_RenderData * self )
self->renderContext->border.ymax );
}
-PyObject *RenderData_EnableGammaCorrection( BPy_RenderData * self,
+static PyObject *RenderData_EnableGammaCorrection( BPy_RenderData * self,
PyObject * args )
{
return M_Render_BitToggleInt( args, R_GAMMA,
&self->renderContext->mode );
}
-PyObject *RenderData_GaussFilterSize( BPy_RenderData * self, PyObject * args )
+static PyObject *RenderData_GaussFilterSize( BPy_RenderData * self, PyObject * args )
{
return M_Render_GetSetAttributeFloat( args,
&self->renderContext->gauss,
0.5f, 1.5f );
}
-PyObject *RenderData_AspectRatioX( BPy_RenderData * self, PyObject * args )
+static PyObject *RenderData_AspectRatioX( BPy_RenderData * self, PyObject * args )
{
return M_Render_GetSetAttributeFloat( args, &self->renderContext->xasp,
1.0f, 200.0f );
}
-PyObject *RenderData_AspectRatioY( BPy_RenderData * self, PyObject * args )
+static PyObject *RenderData_AspectRatioY( BPy_RenderData * self, PyObject * args )
{
return M_Render_GetSetAttributeFloat( args, &self->renderContext->yasp,
1.0f, 200.0f );
}
-PyObject *RenderData_StartFrame( BPy_RenderData * self, PyObject * args )
+static PyObject *RenderData_StartFrame( BPy_RenderData * self, PyObject * args )
{
return M_Render_GetSetAttributeInt( args, &self->renderContext->sfra,
1, MAXFRAME );
}
-PyObject *RenderData_CurrentFrame( BPy_RenderData * self, PyObject * args )
+static PyObject *RenderData_CurrentFrame( BPy_RenderData * self, PyObject * args )
{
return M_Render_GetSetAttributeInt( args, &self->renderContext->cfra,
1, MAXFRAME );
}
-PyObject *RenderData_EndFrame( BPy_RenderData * self, PyObject * args )
+static PyObject *RenderData_EndFrame( BPy_RenderData * self, PyObject * args )
{
return M_Render_GetSetAttributeInt( args, &self->renderContext->efra,
1, MAXFRAME );
}
-PyObject *RenderData_ImageSizeX( BPy_RenderData * self, PyObject * args )
+static PyObject *RenderData_ImageSizeX( BPy_RenderData * self, PyObject * args )
{
return M_Render_GetSetAttributeShort( args, &self->renderContext->xsch,
4, 10000 );
}
-PyObject *RenderData_ImageSizeY( BPy_RenderData * self, PyObject * args )
+static PyObject *RenderData_ImageSizeY( BPy_RenderData * self, PyObject * args )
{
return M_Render_GetSetAttributeShort( args, &self->renderContext->ysch,
4, 10000 );
@@ -1001,7 +1001,7 @@ static int RenderData_setRenderer( BPy_RenderData * self, PyObject * value )
return 0;
}
-PyObject *RenderData_EnableCropping( void )
+static PyObject *RenderData_EnableCropping( void )
{
/* return M_Render_BitToggleInt( args, R_MOVIECROP,
&self->renderContext->mode );
@@ -1067,21 +1067,21 @@ static int RenderData_setImageType( BPy_RenderData *self, PyObject *value )
return 0;
}
-PyObject *RenderData_Quality( BPy_RenderData * self, PyObject * args )
+static PyObject *RenderData_Quality( BPy_RenderData * self, PyObject * args )
{
return M_Render_GetSetAttributeShort( args,
&self->renderContext->quality,
10, 100 );
}
-PyObject *RenderData_FramesPerSec( BPy_RenderData * self, PyObject * args )
+static PyObject *RenderData_FramesPerSec( BPy_RenderData * self, PyObject * args )
{
return M_Render_GetSetAttributeShort( args,
&self->renderContext->frs_sec, 1,
120 );
}
-PyObject *RenderData_EnableGrayscale( BPy_RenderData * self )
+static PyObject *RenderData_EnableGrayscale( BPy_RenderData * self )
{
self->renderContext->planes = R_PLANESBW;
EXPP_allqueue( REDRAWBUTSSCENE, 0 );
@@ -1089,7 +1089,7 @@ PyObject *RenderData_EnableGrayscale( BPy_RenderData * self )
Py_RETURN_NONE;
}
-PyObject *RenderData_EnableRGBColor( BPy_RenderData * self )
+static PyObject *RenderData_EnableRGBColor( BPy_RenderData * self )
{
self->renderContext->planes = R_PLANES24;
EXPP_allqueue( REDRAWBUTSSCENE, 0 );
@@ -1097,7 +1097,7 @@ PyObject *RenderData_EnableRGBColor( BPy_RenderData * self )
Py_RETURN_NONE;
}
-PyObject *RenderData_EnableRGBAColor( BPy_RenderData * self )
+static PyObject *RenderData_EnableRGBAColor( BPy_RenderData * self )
{
self->renderContext->planes = R_PLANES32;
EXPP_allqueue( REDRAWBUTSSCENE, 0 );
@@ -1105,7 +1105,7 @@ PyObject *RenderData_EnableRGBAColor( BPy_RenderData * self )
Py_RETURN_NONE;
}
-PyObject *RenderData_SizePreset( BPy_RenderData * self, PyObject * args )
+static PyObject *RenderData_SizePreset( BPy_RenderData * self, PyObject * args )
{
int type;
@@ -1489,7 +1489,7 @@ static PyObject *RenderData_getYafrayGITunePhotons( BPy_RenderData * self )
/* (die) end */
-PyObject *RenderData_YafrayGIPower( BPy_RenderData * self, PyObject * args )
+static PyObject *RenderData_YafrayGIPower( BPy_RenderData * self, PyObject * args )
{
if( self->renderContext->GImethod > 0 ) {
return M_Render_GetSetAttributeFloat( args,
@@ -1501,7 +1501,7 @@ PyObject *RenderData_YafrayGIPower( BPy_RenderData * self, PyObject * args )
"YafrayGIMethod must be set to 'SKYDOME' or 'FULL'" ) );
}
-PyObject *RenderData_YafrayGIIndirPower( BPy_RenderData * self, PyObject * args )
+static PyObject *RenderData_YafrayGIIndirPower( BPy_RenderData * self, PyObject * args )
{
return M_Render_GetSetAttributeFloat( args,
&self->renderContext->
@@ -1509,7 +1509,7 @@ PyObject *RenderData_YafrayGIIndirPower( BPy_RenderData * self, PyObject * args
100.00f );
}
-PyObject *RenderData_YafrayGIDepth( BPy_RenderData * self, PyObject * args )
+static PyObject *RenderData_YafrayGIDepth( BPy_RenderData * self, PyObject * args )
{
if( self->renderContext->GImethod == 2 ) {
return M_Render_GetSetAttributeInt( args,
@@ -1520,7 +1520,7 @@ PyObject *RenderData_YafrayGIDepth( BPy_RenderData * self, PyObject * args )
"YafrayGIMethod must be set to 'FULL'" ) );
}
-PyObject *RenderData_YafrayGICDepth( BPy_RenderData * self, PyObject * args )
+static PyObject *RenderData_YafrayGICDepth( BPy_RenderData * self, PyObject * args )
{
if( self->renderContext->GImethod == 2 ) {
return M_Render_GetSetAttributeInt( args,
@@ -1531,7 +1531,7 @@ PyObject *RenderData_YafrayGICDepth( BPy_RenderData * self, PyObject * args )
"YafrayGIMethod must be set to 'FULL'" ) );
}
-PyObject *RenderData_EnableYafrayGICache( BPy_RenderData * self,
+static PyObject *RenderData_EnableYafrayGICache( BPy_RenderData * self,
PyObject * args )
{
if( self->renderContext->GImethod == 2 ) {
@@ -1543,7 +1543,7 @@ PyObject *RenderData_EnableYafrayGICache( BPy_RenderData * self,
"YafrayGIMethod must be set to 'FULL'" ) );
}
-PyObject *RenderData_EnableYafrayGIPhotons( BPy_RenderData * self,
+static PyObject *RenderData_EnableYafrayGIPhotons( BPy_RenderData * self,
PyObject * args )
{
if( self->renderContext->GImethod == 2 ) {
@@ -1555,7 +1555,7 @@ PyObject *RenderData_EnableYafrayGIPhotons( BPy_RenderData * self,
"YafrayGIMethod must be set to 'FULL'" ) );
}
-PyObject *RenderData_YafrayGIPhotonCount( BPy_RenderData * self,
+static PyObject *RenderData_YafrayGIPhotonCount( BPy_RenderData * self,
PyObject * args )
{
if( self->renderContext->GImethod == 2
@@ -1569,7 +1569,7 @@ PyObject *RenderData_YafrayGIPhotonCount( BPy_RenderData * self,
"YafrayGIMethod must be set to 'FULL' and GIPhotons must be enabled" ) );
}
-PyObject *RenderData_YafrayGIPhotonRadius( BPy_RenderData * self,
+static PyObject *RenderData_YafrayGIPhotonRadius( BPy_RenderData * self,
PyObject * args )
{
if( self->renderContext->GImethod == 2
@@ -1583,7 +1583,7 @@ PyObject *RenderData_YafrayGIPhotonRadius( BPy_RenderData * self,
"YafrayGIMethod must be set to 'FULL' and GIPhotons must be enabled" ) );
}
-PyObject *RenderData_YafrayGIPhotonMixCount( BPy_RenderData * self,
+static PyObject *RenderData_YafrayGIPhotonMixCount( BPy_RenderData * self,
PyObject * args )
{
if( self->renderContext->GImethod == 2
@@ -1596,7 +1596,7 @@ PyObject *RenderData_YafrayGIPhotonMixCount( BPy_RenderData * self,
"YafrayGIMethod must be set to 'FULL' and GIPhotons must be enabled" ) );
}
-PyObject *RenderData_EnableYafrayGITunePhotons( BPy_RenderData * self,
+static PyObject *RenderData_EnableYafrayGITunePhotons( BPy_RenderData * self,
PyObject * args )
{
if( self->renderContext->GImethod == 2
@@ -1609,7 +1609,7 @@ PyObject *RenderData_EnableYafrayGITunePhotons( BPy_RenderData * self,
"YafrayGIMethod must be set to 'FULL' and GIPhotons must be enabled" ) );
}
-PyObject *RenderData_YafrayGIShadowQuality( BPy_RenderData * self,
+static PyObject *RenderData_YafrayGIShadowQuality( BPy_RenderData * self,
PyObject * args )
{
if( self->renderContext->GImethod == 2
@@ -1623,7 +1623,7 @@ PyObject *RenderData_YafrayGIShadowQuality( BPy_RenderData * self,
"YafrayGIMethod must be set to 'FULL' and GICache must be enabled" ) );
}
-PyObject *RenderData_YafrayGIPixelsPerSample( BPy_RenderData * self,
+static PyObject *RenderData_YafrayGIPixelsPerSample( BPy_RenderData * self,
PyObject * args )
{
if( self->renderContext->GImethod == 2
@@ -1636,7 +1636,7 @@ PyObject *RenderData_YafrayGIPixelsPerSample( BPy_RenderData * self,
"YafrayGIMethod must be set to 'FULL' and GICache must be enabled" ) );
}
-PyObject *RenderData_YafrayGIRefinement( BPy_RenderData * self,
+static PyObject *RenderData_YafrayGIRefinement( BPy_RenderData * self,
PyObject * args )
{
if( self->renderContext->GImethod == 2
@@ -1650,53 +1650,53 @@ PyObject *RenderData_YafrayGIRefinement( BPy_RenderData * self,
"YafrayGIMethod must be set to 'FULL' and GICache must be enabled" ) );
}
-PyObject *RenderData_YafrayRayBias( BPy_RenderData * self, PyObject * args )
+static PyObject *RenderData_YafrayRayBias( BPy_RenderData * self, PyObject * args )
{
return M_Render_GetSetAttributeFloat( args,
&self->renderContext->YF_raybias,
0.0f, 10.0f );
}
-PyObject *RenderData_YafrayRayDepth( BPy_RenderData * self, PyObject * args )
+static PyObject *RenderData_YafrayRayDepth( BPy_RenderData * self, PyObject * args )
{
return M_Render_GetSetAttributeInt( args,
&self->renderContext->YF_raydepth,
1, 80 );
}
-PyObject *RenderData_YafrayGamma( BPy_RenderData * self, PyObject * args )
+static PyObject *RenderData_YafrayGamma( BPy_RenderData * self, PyObject * args )
{
return M_Render_GetSetAttributeFloat( args,
&self->renderContext->YF_gamma,
0.001f, 5.0f );
}
-PyObject *RenderData_YafrayExposure( BPy_RenderData * self, PyObject * args )
+static PyObject *RenderData_YafrayExposure( BPy_RenderData * self, PyObject * args )
{
return M_Render_GetSetAttributeFloat( args,
&self->renderContext->
YF_exposure, 0.0f, 10.0f );
}
-PyObject *RenderData_EnableGameFrameStretch( BPy_RenderData * self )
+static PyObject *RenderData_EnableGameFrameStretch( BPy_RenderData * self )
{
self->scene->framing.type = SCE_GAMEFRAMING_SCALE;
Py_RETURN_NONE;
}
-PyObject *RenderData_EnableGameFrameExpose( BPy_RenderData * self )
+static PyObject *RenderData_EnableGameFrameExpose( BPy_RenderData * self )
{
self->scene->framing.type = SCE_GAMEFRAMING_EXTEND;
Py_RETURN_NONE;
}
-PyObject *RenderData_EnableGameFrameBars( BPy_RenderData * self )
+static PyObject *RenderData_EnableGameFrameBars( BPy_RenderData * self )
{
self->scene->framing.type = SCE_GAMEFRAMING_BARS;
Py_RETURN_NONE;
}
-PyObject *RenderData_SetGameFrameColor( BPy_RenderData * self,
+static PyObject *RenderData_SetGameFrameColor( BPy_RenderData * self,
PyObject * args )
{
float red = 0.0f;
@@ -1724,7 +1724,7 @@ PyObject *RenderData_SetGameFrameColor( BPy_RenderData * self,
Py_RETURN_NONE;
}
-PyObject *RenderData_GetGameFrameColor( BPy_RenderData * self )
+static PyObject *RenderData_GetGameFrameColor( BPy_RenderData * self )
{
char rgb[24];
@@ -1734,33 +1734,33 @@ PyObject *RenderData_GetGameFrameColor( BPy_RenderData * self )
}
#ifdef __sgi
-PyObject *RenderData_SGIMaxsize( BPy_RenderData * self, PyObject * args )
+static PyObject *RenderData_SGIMaxsize( BPy_RenderData * self, PyObject * args )
{
return M_Render_GetSetAttributeShort( args,
&self->renderContext->maximsize,
0, 500 );
}
-PyObject *RenderData_EnableSGICosmo( BPy_RenderData *self, PyObject *args )
+static PyObject *RenderData_EnableSGICosmo( BPy_RenderData *self, PyObject *args )
{
return M_Render_BitToggleInt( args, R_COSMO,
&self->renderContext->mode );
}
#else
-PyObject *RenderData_SGIMaxsize( void )
+static PyObject *RenderData_SGIMaxsize( void )
{
return EXPP_ReturnPyObjError( PyExc_StandardError,
"SGI is not defined on this machine" );
}
-PyObject *RenderData_EnableSGICosmo( void )
+static PyObject *RenderData_EnableSGICosmo( void )
{
return EXPP_ReturnPyObjError( PyExc_StandardError,
"SGI is not defined on this machine" );
}
#endif
-PyObject *RenderData_OldMapValue( BPy_RenderData * self, PyObject * args )
+static PyObject *RenderData_OldMapValue( BPy_RenderData * self, PyObject * args )
{
PyObject *tmp = M_Render_GetSetAttributeInt(args,
&self->renderContext->framapto, 1, 900);
@@ -1769,7 +1769,7 @@ PyObject *RenderData_OldMapValue( BPy_RenderData * self, PyObject * args )
return tmp;
}
-PyObject *RenderData_NewMapValue( BPy_RenderData * self, PyObject * args )
+static PyObject *RenderData_NewMapValue( BPy_RenderData * self, PyObject * args )
{
PyObject *tmp = M_Render_GetSetAttributeInt(args,
&self->renderContext->images, 1, 900);
@@ -1801,7 +1801,7 @@ static PyObject *RenderData_getTimeCode( BPy_RenderData * self) {
/***************************************************************************/
/* Render layer functions */
/***************************************************************************/
-PyObject *RenderData_getRenderLayers(BPy_RenderData * self)
+static PyObject *RenderData_getRenderLayers(BPy_RenderData * self)
{
PyObject *list, *layer;
SceneRenderLayer *srl;
@@ -1816,7 +1816,7 @@ PyObject *RenderData_getRenderLayers(BPy_RenderData * self)
return list;
}
-PyObject *RenderData_removeRenderLayer(BPy_RenderData * self, BPy_RenderLayer *value)
+static PyObject *RenderData_removeRenderLayer(BPy_RenderData * self, BPy_RenderLayer *value)
{
int index;
if (!BPy_RenderLayer_Check(value))
@@ -1853,7 +1853,7 @@ PyObject *RenderData_removeRenderLayer(BPy_RenderData * self, BPy_RenderLayer *v
Py_RETURN_NONE;
}
-PyObject *RenderData_addRenderLayer(BPy_RenderData * self ) {
+static PyObject *RenderData_addRenderLayer(BPy_RenderData * self ) {
scene_add_render_layer(self->scene);
return RenderLayer_CreatePyObject( self->scene, self->renderContext->layers.last );
diff --git a/source/blender/python/api2_2x/sceneSequence.c b/source/blender/python/api2_2x/sceneSequence.c
index ddc4eb6aea8..c7daea19fe7 100644
--- a/source/blender/python/api2_2x/sceneSequence.c
+++ b/source/blender/python/api2_2x/sceneSequence.c
@@ -305,16 +305,16 @@ static PyObject *NewSeq_internal(ListBase *seqbase, PyObject * args, Scene *sce)
} else if (BPy_Scene_Check(py_data)) {
/* scene */
- Scene *sce = ((BPy_Scene *)py_data)->scene;
+ Scene *sceseq = ((BPy_Scene *)py_data)->scene;
seq->type= SEQ_SCENE;
- seq->scene= sce;
+ seq->scene= sceseq;
/*seq->sfra= sce->r.sfra;*/
- seq->len= sce->r.efra - sce->r.sfra + 1;
+ seq->len= sceseq->r.efra - sceseq->r.sfra + 1;
seq->strip= strip= MEM_callocN(sizeof(Strip), "strip");
- strncpy(seq->name + 2, sce->id.name + 2,
+ strncpy(seq->name + 2, sceseq->id.name + 2,
sizeof(seq->name) - 2);
strip->len= seq->len;
strip->us= 1;
diff --git a/source/blender/radiosity/intern/source/radfactors.c b/source/blender/radiosity/intern/source/radfactors.c
index 8c89e806034..ba4dbf1b793 100644
--- a/source/blender/radiosity/intern/source/radfactors.c
+++ b/source/blender/radiosity/intern/source/radfactors.c
@@ -53,9 +53,9 @@
#include "RE_render_ext.h" /* for `RE_zbufferall_radio and RE_zbufferall_radio */
/* locals */
-void rad_setmatrices(RadView *vw);
-void clearsubflagelem(RNode *rn);
-void setsubflagelem(RNode *rn);
+static void rad_setmatrices(RadView *vw);
+static void clearsubflagelem(RNode *rn);
+static void setsubflagelem(RNode *rn);
RadView hemitop, hemiside;
@@ -254,7 +254,7 @@ void rad_make_hocos(RadView *vw)
/* } */
}
-void rad_setmatrices(RadView *vw) /* for hemi's */
+static void rad_setmatrices(RadView *vw) /* for hemi's */
{
float up1[3], len, twist;
@@ -628,7 +628,7 @@ void minmaxradelemfilt(RNode *rn, float *min, float *max, float *errmin, float *
}
}
-void setsubflagelem(RNode *rn)
+static void setsubflagelem(RNode *rn)
{
if(rn->down1) {
@@ -640,7 +640,7 @@ void setsubflagelem(RNode *rn)
}
}
-void clearsubflagelem(RNode *rn)
+static void clearsubflagelem(RNode *rn)
{
if(rn->down1) {
diff --git a/source/blender/radiosity/intern/source/radnode.c b/source/blender/radiosity/intern/source/radnode.c
index 042fe6840fc..ae246476e6d 100644
--- a/source/blender/radiosity/intern/source/radnode.c
+++ b/source/blender/radiosity/intern/source/radnode.c
@@ -57,10 +57,10 @@
#endif
/* locals */
-void *malloc_fast(int size);
-void *calloc_fast(int size);
-void free_fast(void *poin, int siz);
-void deleteTriNodes(RNode *node);
+static void *malloc_fast(int size);
+static void *calloc_fast(int size);
+static void free_fast(void *poin, int siz);
+static void deleteTriNodes(RNode *node);
/* lower because of local type define */
/* void check_mallocgroup(MallocGroup *mg); */
@@ -122,7 +122,7 @@ void check_mallocgroup(MallocGroup *mg)
printf("fastmalloc: shouldnt be here\n");
}
-void *malloc_fast(int size)
+static void *malloc_fast(int size)
{
MallocGroup *mg;
void *retval;
@@ -156,7 +156,7 @@ void *malloc_fast(int size)
return mg->data;
}
-void *calloc_fast(int size)
+static void *calloc_fast(int size)
{
void *poin;
@@ -166,7 +166,7 @@ void *calloc_fast(int size)
return poin;
}
-void free_fast(void *poin, int size)
+static void free_fast(void *poin, int size)
{
MallocGroup *mg;
intptr_t val;
@@ -958,7 +958,7 @@ int comparelevel(RNode *node, RNode *nb, int level)
return 1;
}
-void deleteTriNodes(RNode *node) /* both children of node */
+static void deleteTriNodes(RNode *node) /* both children of node */
{
RNode *n1, *n2;
diff --git a/source/blender/radiosity/intern/source/radpreprocess.c b/source/blender/radiosity/intern/source/radpreprocess.c
index 07b933b6db9..694cb261b08 100644
--- a/source/blender/radiosity/intern/source/radpreprocess.c
+++ b/source/blender/radiosity/intern/source/radpreprocess.c
@@ -289,7 +289,7 @@ void setedgepointers()
MEM_freeN(esblock);
}
-int materialIndex(Material *ma)
+static int materialIndex(Material *ma)
{
int i = 0;
for(i=0;i< RG.totmat; i++)
diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c
index 4af6bf6f543..96909ec1041 100644
--- a/source/blender/render/intern/source/convertblender.c
+++ b/source/blender/render/intern/source/convertblender.c
@@ -2442,7 +2442,8 @@ static int dl_surf_to_renderdata(ObjectRen *obr, DispList *dl, Material **matar,
VertRen *v1, *v2, *v3, *v4, *ver;
VlakRen *vlr, *vlr1, *vlr2, *vlr3;
Curve *cu= ob->data;
- float *data, n1[3], flen;
+ float *data, n1[3];
+ /*float flen; - as yet unused */
int u, v, orcoret= 0;
int p1, p2, p3, p4, a;
int sizeu, nsizeu, sizev, nsizev;
@@ -2514,7 +2515,7 @@ static int dl_surf_to_renderdata(ObjectRen *obr, DispList *dl, Material **matar,
vlr= RE_findOrAddVlak(obr, obr->totvlak++);
vlr->v1= v1; vlr->v2= v2; vlr->v3= v3; vlr->v4= v4;
- flen= CalcNormFloat4(vlr->v4->co, vlr->v3->co, vlr->v2->co, vlr->v1->co, n1);
+ /* flen= CalcNormFloat4(vlr->v4->co, vlr->v3->co, vlr->v2->co, vlr->v1->co, n1); - as yet unused */
VECCOPY(vlr->n, n1);
vlr->mat= matar[ dl->col];
diff --git a/source/blender/render/intern/source/initrender.c b/source/blender/render/intern/source/initrender.c
index e9035f29b3c..40c0edb6e5f 100644
--- a/source/blender/render/intern/source/initrender.c
+++ b/source/blender/render/intern/source/initrender.c
@@ -257,7 +257,7 @@ void make_sample_tables(Render *re)
{
static int firsttime= 1;
SampleTables *st;
- float flweight[32], fmask[256];
+ float flweight[32];
float weight[32], totw, val, *fpx1, *fpx2, *fpy1, *fpy2, *m3, *m4;
int i, j, a;
@@ -300,11 +300,6 @@ void make_sample_tables(Render *re)
st->centLut[a]= -0.45+((float)a)/16.0;
}
- val= 1.0/((float)re->osa);
- for(a=0; a<256; a++) {
- fmask[a]= ((float)st->cmask[a])*val;
- }
-
/* calculate totw */
totw= 0.0;
for(j= -1; j<2; j++) {
diff --git a/source/blender/render/intern/source/occlusion.c b/source/blender/render/intern/source/occlusion.c
index 15c57eb9362..d2d2cf3fb77 100644
--- a/source/blender/render/intern/source/occlusion.c
+++ b/source/blender/render/intern/source/occlusion.c
@@ -402,7 +402,7 @@ static int occ_find_bbox_axis(OcclusionTree *tree, int begin, int end, float *mi
return axis;
}
-void occ_node_from_face(OccFace *face, OccNode *node)
+static void occ_node_from_face(OccFace *face, OccNode *node)
{
float n[3];
@@ -1143,7 +1143,7 @@ static float occ_quad_form_factor(float *p, float *n, float *q0, float *q1, floa
return result;
}
-float occ_form_factor(OccFace *face, float *p, float *n)
+static float occ_form_factor(OccFace *face, float *p, float *n)
{
ObjectInstanceRen *obi;
VlakRen *vlr;
diff --git a/source/blender/render/intern/source/rayshade.c b/source/blender/render/intern/source/rayshade.c
index 6c4bd5da1a9..48ae84379ba 100644
--- a/source/blender/render/intern/source/rayshade.c
+++ b/source/blender/render/intern/source/rayshade.c
@@ -736,7 +736,7 @@ static void hammersley_create(double *out, int n)
}
}
-struct QMCSampler *QMC_initSampler(int type, int tot)
+static struct QMCSampler *QMC_initSampler(int type, int tot)
{
QMCSampler *qsa = MEM_callocN(sizeof(QMCSampler), "qmc sampler");
qsa->samp2d = MEM_callocN(2*sizeof(double)*tot, "qmc sample table");
@@ -885,7 +885,7 @@ void init_render_qmcsampler(Render *re)
re->qmcsamplers= MEM_callocN(sizeof(ListBase)*BLENDER_MAX_THREADS, "QMCListBase");
}
-QMCSampler *get_thread_qmcsampler(Render *re, int thread, int type, int tot)
+static QMCSampler *get_thread_qmcsampler(Render *re, int thread, int type, int tot)
{
QMCSampler *qsa;
@@ -906,7 +906,7 @@ QMCSampler *get_thread_qmcsampler(Render *re, int thread, int type, int tot)
return qsa;
}
-void release_thread_qmcsampler(Render *re, int thread, QMCSampler *qsa)
+static void release_thread_qmcsampler(Render *re, int thread, QMCSampler *qsa)
{
qsa->used= 0;
}
@@ -1176,7 +1176,6 @@ static void trace_reflect(float *col, ShadeInput *shi, ShadeResult *shr, float f
/* extern call from render loop */
void ray_trace(ShadeInput *shi, ShadeResult *shr)
{
- VlakRen *vlr;
float i, f, f1, fr, fg, fb;
float mircol[4], tracol[4];
float diff[3];
@@ -1184,7 +1183,7 @@ void ray_trace(ShadeInput *shi, ShadeResult *shr)
do_tra= ((shi->mat->mode & (MA_RAYTRANSP)) && shr->alpha!=1.0f);
do_mir= ((shi->mat->mode & MA_RAYMIRROR) && shi->ray_mirror!=0.0f);
- vlr= shi->vlr;
+
/* raytrace mirror amd refract like to separate the spec color */
if(shi->combinedflag & SCE_PASS_SPEC)
@@ -1527,7 +1526,7 @@ static float *sphere_sampler(int type, int resol, int thread, int xs, int ys)
}
}
-void ray_ao_qmc(ShadeInput *shi, float *shadfac)
+static void ray_ao_qmc(ShadeInput *shi, float *shadfac)
{
Isect isec;
QMCSampler *qsa=NULL;
@@ -1538,7 +1537,6 @@ void ray_ao_qmc(ShadeInput *shi, float *shadfac)
float fac=0.0f, prev=0.0f;
float adapt_thresh = G.scene->world->ao_adapt_thresh;
float adapt_speed_fac = G.scene->world->ao_adapt_speed_fac;
- float bias = G.scene->world->aobias;
int samples=0;
int max_samples = R.wrld.aosamp*R.wrld.aosamp;
@@ -1566,13 +1564,10 @@ void ray_ao_qmc(ShadeInput *shi, float *shadfac)
dxyview[2]= 0.0f;
}
- /* bias prevents smoothed faces to appear flat */
if(shi->vlr->flag & R_SMOOTH) {
- bias= G.scene->world->aobias;
VECCOPY(nrm, shi->vn);
}
else {
- bias= 0.0f;
VECCOPY(nrm, shi->facenor);
}
@@ -1667,7 +1662,7 @@ void ray_ao_qmc(ShadeInput *shi, float *shadfac)
}
/* extern call from shade_lamp_loop, ambient occlusion calculus */
-void ray_ao_spheresamp(ShadeInput *shi, float *shadfac)
+static void ray_ao_spheresamp(ShadeInput *shi, float *shadfac)
{
Isect isec;
float *vec, *nrm, div, bias, sh=0.0f;
@@ -2123,7 +2118,7 @@ void ray_shadow(ShadeInput *shi, LampRen *lar, float *shadfac)
}
/* only when face points away from lamp, in direction of lamp, trace ray and find first exit point */
-void ray_translucent(ShadeInput *shi, LampRen *lar, float *distfac, float *co)
+static void ray_translucent(ShadeInput *shi, LampRen *lar, float *distfac, float *co)
{
Isect isec;
float lampco[3], maxsize;
diff --git a/source/blender/render/intern/source/shadeoutput.c b/source/blender/render/intern/source/shadeoutput.c
index 91621c24365..c4fac1aeb06 100644
--- a/source/blender/render/intern/source/shadeoutput.c
+++ b/source/blender/render/intern/source/shadeoutput.c
@@ -1460,10 +1460,10 @@ static void shade_lamp_loop_only_shadow(ShadeInput *shi, ShadeResult *shr)
LampRen *lar;
GroupObject *go;
float inpr, lv[3];
- float *vn, *view, shadfac[4];
+ float *view, shadfac[4];
float ir, accum, visifac, lampdist;
- vn= shi->vn;
+
view= shi->view;
accum= ir= 0.0f;
diff --git a/source/blender/render/intern/source/texture.c b/source/blender/render/intern/source/texture.c
index c14425e274f..7ce66ff6d12 100644
--- a/source/blender/render/intern/source/texture.c
+++ b/source/blender/render/intern/source/texture.c
@@ -1712,18 +1712,18 @@ void do_material_tex(ShadeInput *shi)
texres.nor[2]= texres.tb;
}
else {
- float co= 0.5*cos(texres.tin-0.5);
+ float co_nor= 0.5*cos(texres.tin-0.5);
float si= 0.5*sin(texres.tin-0.5);
float f1, f2;
f1= shi->vn[0];
f2= shi->vn[1];
- texres.nor[0]= f1*co+f2*si;
- texres.nor[1]= f2*co-f1*si;
+ texres.nor[0]= f1*co_nor+f2*si;
+ texres.nor[1]= f2*co_nor-f1*si;
f1= shi->vn[1];
f2= shi->vn[2];
- texres.nor[1]= f1*co+f2*si;
- texres.nor[2]= f2*co-f1*si;
+ texres.nor[1]= f1*co_nor+f2*si;
+ texres.nor[2]= f2*co_nor-f1*si;
}
}
// warping, local space
diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c
index cf4261f43b1..ef6f5a97cee 100644
--- a/source/blender/src/buttons_editing.c
+++ b/source/blender/src/buttons_editing.c
@@ -3753,11 +3753,9 @@ static void editing_panel_camera_yafraydof(Object *ob, Camera *cam)
void do_cambuts(unsigned short event)
{
Object *ob;
- Camera *cam;
ob= OBACT;
if (ob==0) return;
- cam= ob->data;
switch(event) {
case 0:
diff --git a/source/blender/src/buttons_logic.c b/source/blender/src/buttons_logic.c
index 5fbbf4d80c3..9e6bc32d4b0 100644
--- a/source/blender/src/buttons_logic.c
+++ b/source/blender/src/buttons_logic.c
@@ -93,9 +93,9 @@
#include "interface.h"
/* internals */
-void buttons_enji(uiBlock *, Object *);
-void buttons_ketsji(uiBlock *, Object *);
-void buttons_bullet(uiBlock *, Object *);
+static void buttons_enji(uiBlock *, Object *);
+static void buttons_ketsji(uiBlock *, Object *);
+static void buttons_bullet(uiBlock *, Object *);
/****/
@@ -2812,7 +2812,7 @@ static uiBlock *actuator_menu(void *arg_unused)
}
-void buttons_enji(uiBlock *block, Object *ob)
+static void buttons_enji(uiBlock *block, Object *ob)
{
uiDefButBitI(block, TOG, OB_SECTOR, B_SETSECTOR, "Sector",
10,205,65,19, &ob->gameflag, 0, 0, 0, 0,
@@ -2857,7 +2857,7 @@ void buttons_enji(uiBlock *block, Object *ob)
}
-void buttons_ketsji(uiBlock *block, Object *ob)
+static void buttons_ketsji(uiBlock *block, Object *ob)
{
uiDefButBitI(block, TOG, OB_COLLISION, B_REDR, "Physics",
10,205,70,19, &ob->gameflag, 0, 0, 0, 0,
@@ -3083,7 +3083,7 @@ static uiBlock *advanced_bullet_menu(void *arg_ob)
return block;
}
-void buttons_bullet(uiBlock *block, Object *ob)
+static void buttons_bullet(uiBlock *block, Object *ob)
{
uiBut *but;
diff --git a/source/blender/src/drawimage.c b/source/blender/src/drawimage.c
index 97765690ceb..6db33a89adb 100644
--- a/source/blender/src/drawimage.c
+++ b/source/blender/src/drawimage.c
@@ -2455,12 +2455,12 @@ static void image_zoom_set_factor(float zoomfac)
void image_viewmove(int mode)
{
- short mval[2], mvalo[2], zoom0;
+ short mval[2], mvalo[2];
int oldcursor;
Window *win;
getmouseco_sc(mvalo);
- zoom0= G.sima->zoom;
+
oldcursor=get_cursor();
win=winlay_get_active_window();
diff --git a/source/blender/src/drawtext.c b/source/blender/src/drawtext.c
index 7f913eb5d49..231533722c1 100644
--- a/source/blender/src/drawtext.c
+++ b/source/blender/src/drawtext.c
@@ -123,10 +123,10 @@ def wrap(line, view_width, wrap_chars):
void drawtextspace(ScrArea *sa, void *spacedata);
void winqreadtextspace(struct ScrArea *sa, void *spacedata, struct BWinEvent *evt);
-void txt_copy_selectbuffer (Text *text);
-void draw_brackets(SpaceText *st);
void redraw_alltext(void);
+static void txt_copy_selectbuffer(Text *text);
+static void draw_brackets(SpaceText *st);
static void get_selection_buffer(Text *text);
static int check_bracket(char ch);
static int check_delim(char ch);
@@ -1551,7 +1551,6 @@ void find_and_replace(SpaceText *st, short mode) {
static void do_find_buttons(val) {
Text *text;
SpaceText *st;
- int do_draw= 0;
char *tmp;
st= curarea->spacedata.first;
@@ -1565,26 +1564,21 @@ static void do_find_buttons(val) {
tmp= txt_sel_to_buf(text);
strncpy(g_find_str, tmp, TXT_MAXFINDSTR);
MEM_freeN(tmp);
- do_draw= 1;
break;
case B_PASTEREPLACE:
if (!g_replace_str) break;
tmp= txt_sel_to_buf(text);
strncpy(g_replace_str, tmp, TXT_MAXFINDSTR);
MEM_freeN(tmp);
- do_draw= 1;
break;
case B_TEXTFIND:
find_and_replace(st, 0);
- do_draw= 1;
break;
case B_TEXTREPLACE:
find_and_replace(st, 1);
- do_draw= 1;
break;
case B_TEXTMARKALL:
find_and_replace(st, 2);
- do_draw= 1;
break;
}
}
@@ -1882,7 +1876,7 @@ int jumptoline_interactive(SpaceText *st) {
int bufferlength;
static char *copybuffer = NULL;
-void txt_copy_selectbuffer (Text *text)
+static void txt_copy_selectbuffer (Text *text)
{
int length=0;
TextLine *tmp, *linef, *linel;
@@ -3180,7 +3174,7 @@ void winqreadtextspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
redraw_alltext();
}
-void draw_brackets(SpaceText *st)
+static void draw_brackets(SpaceText *st)
{
char ch;
int b, c, startc, endc, find, stack;
diff --git a/source/blender/src/drawview.c b/source/blender/src/drawview.c
index 60d7ab599ab..b432d6edc34 100644
--- a/source/blender/src/drawview.c
+++ b/source/blender/src/drawview.c
@@ -181,7 +181,7 @@
#include "radio.h"
/* locals */
-void drawname(Object *ob);
+static void drawname(Object *ob);
static void star_stuff_init_func(void)
{
@@ -1199,7 +1199,7 @@ exit:
return index;
}
-void drawname(Object *ob)
+static void drawname(Object *ob)
{
cpack(0x404040);
glRasterPos3f(0.0, 0.0, 0.0);
diff --git a/source/blender/src/edit.c b/source/blender/src/edit.c
index a44bbc3af0f..87bb6f9e94e 100644
--- a/source/blender/src/edit.c
+++ b/source/blender/src/edit.c
@@ -136,10 +136,10 @@ extern void obedit_selectionCB(short selecting, Object *editobj,
extern void uvedit_selectionCB(short selecting, Object *editobj,
short *mval, float rad);
-void circle_selectCB(select_CBfunc func);
+static void circle_selectCB(select_CBfunc func);
/* local protos ---------------*/
-void snap_curs_to_firstsel(void);
+static void snap_curs_to_firstsel(void);
/* flag==2 only border, flag==3 cross+border
flag==5 cross + border + start&end frame
@@ -478,7 +478,7 @@ void draw_sel_circle(short *mval, short *mvalo, float rad, float rado, int selec
* it (hopefully) reusable for other windows than the 3D view.
*/
-void circle_selectCB(select_CBfunc callback)
+static void circle_selectCB(select_CBfunc callback)
{
static float rad= 40.0;
float rado= rad;
@@ -1548,7 +1548,7 @@ void snap_curs_to_active()
allqueue(REDRAWVIEW3D, 0);
}
-void snap_curs_to_firstsel()
+static void snap_curs_to_firstsel()
{
TransVert *tv;
Base *base;
diff --git a/source/blender/src/editface.c b/source/blender/src/editface.c
index 008ddf3b5f0..77c27dfa3db 100644
--- a/source/blender/src/editface.c
+++ b/source/blender/src/editface.c
@@ -312,7 +312,7 @@ static void uv_calc_shift_project(float *target, float *shift, float rotmat[][4]
}
}
-void correct_uv_aspect( void )
+static void correct_uv_aspect( void )
{
float aspx=1, aspy=1;
EditMesh *em = G.editMesh;
@@ -1050,7 +1050,7 @@ int edgetag_shortest_path(EditEdge *source, EditEdge *target)
return 1;
}
-void seam_edgehash_insert_face(EdgeHash *ehash, MFace *mf)
+static void seam_edgehash_insert_face(EdgeHash *ehash, MFace *mf)
{
BLI_edgehash_insert(ehash, mf->v1, mf->v2, NULL);
BLI_edgehash_insert(ehash, mf->v2, mf->v3, NULL);
diff --git a/source/blender/src/editmesh.c b/source/blender/src/editmesh.c
index 4c5afe0e6bc..25e7c50b07e 100644
--- a/source/blender/src/editmesh.c
+++ b/source/blender/src/editmesh.c
@@ -1342,7 +1342,7 @@ void load_editMesh(void)
{
Object *ob;
ModifierData *md;
- EditVert *eve, **vertMap = NULL;
+ EditVert **vertMap = NULL;
int i,j;
for (ob=G.main->object.first; ob; ob=ob->id.next) {
diff --git a/source/blender/src/editmesh_add.c b/source/blender/src/editmesh_add.c
index 71e04541643..4dc64b0f933 100644
--- a/source/blender/src/editmesh_add.c
+++ b/source/blender/src/editmesh_add.c
@@ -598,7 +598,7 @@ static void fix_new_face(EditFace *eface)
}
}
-void addfaces_from_edgenet()
+void addfaces_from_edgenet(void)
{
EditVert *eve1, *eve2, *eve3, *eve4;
EditMesh *em= G.editMesh;
@@ -1172,7 +1172,6 @@ void make_prim(int type, float imat[3][3], int tot, int seg,
//extern signed char monkeyf[][4];
//extern signed char monkeyv[][3];
EditVert **tv= MEM_mallocN(sizeof(*tv)*monkeynv*2, "tv");
- EditFace *efa;
int i;
for (i=0; i<monkeynv; i++) {
@@ -1184,8 +1183,8 @@ void make_prim(int type, float imat[3][3], int tot, int seg,
tv[monkeynv+i]->f |= SELECT;
}
for (i=0; i<monkeynf; i++) {
- efa= addfacelist(tv[monkeyf[i][0]+i-monkeyo], tv[monkeyf[i][1]+i-monkeyo], tv[monkeyf[i][2]+i-monkeyo], (monkeyf[i][3]!=monkeyf[i][2])?tv[monkeyf[i][3]+i-monkeyo]:NULL, NULL, NULL);
- efa= addfacelist(tv[monkeynv+monkeyf[i][2]+i-monkeyo], tv[monkeynv+monkeyf[i][1]+i-monkeyo], tv[monkeynv+monkeyf[i][0]+i-monkeyo], (monkeyf[i][3]!=monkeyf[i][2])?tv[monkeynv+monkeyf[i][3]+i-monkeyo]:NULL, NULL, NULL);
+ addfacelist(tv[monkeyf[i][0]+i-monkeyo], tv[monkeyf[i][1]+i-monkeyo], tv[monkeyf[i][2]+i-monkeyo], (monkeyf[i][3]!=monkeyf[i][2])?tv[monkeyf[i][3]+i-monkeyo]:NULL, NULL, NULL);
+ addfacelist(tv[monkeynv+monkeyf[i][2]+i-monkeyo], tv[monkeynv+monkeyf[i][1]+i-monkeyo], tv[monkeynv+monkeyf[i][0]+i-monkeyo], (monkeyf[i][3]!=monkeyf[i][2])?tv[monkeynv+monkeyf[i][3]+i-monkeyo]:NULL, NULL, NULL);
}
MEM_freeN(tv);
diff --git a/source/blender/src/editmesh_loop.c b/source/blender/src/editmesh_loop.c
index 138dd93e490..dfd18e208fb 100644
--- a/source/blender/src/editmesh_loop.c
+++ b/source/blender/src/editmesh_loop.c
@@ -538,7 +538,6 @@ static CutCurve *get_mouse_trail(int *len, char mode, char cutmode, struct GHash
bglFlush();
glDrawBuffer(GL_BACK);
return(NULL);
- break;
}
if (rubberband) { /* rubberband mode, undraw last rubberband */
diff --git a/source/blender/src/editmesh_tools.c b/source/blender/src/editmesh_tools.c
index ae4bc056964..af2246131e3 100644
--- a/source/blender/src/editmesh_tools.c
+++ b/source/blender/src/editmesh_tools.c
@@ -4486,7 +4486,7 @@ static void bevel_mesh_recurs(float bsize, short recurs, int allfaces)
}
}
-void bevel_menu() {
+void bevel_menu(void) {
BME_Mesh *bm;
BME_TransData_Head *td;
TransInfo *t;
diff --git a/source/blender/src/editparticle.c b/source/blender/src/editparticle.c
index f420d46c827..7e67277880e 100644
--- a/source/blender/src/editparticle.c
+++ b/source/blender/src/editparticle.c
@@ -2022,7 +2022,7 @@ static void PE_radialcontrol_callback(const int mode, const int val)
(*PE_radialcontrol()) = NULL;
}
-RadialControl **PE_radialcontrol()
+RadialControl **PE_radialcontrol(void)
{
static RadialControl *rc = NULL;
return &rc;
diff --git a/source/blender/src/editsima.c b/source/blender/src/editsima.c
index 1762e49a2a2..7fc76dd5202 100644
--- a/source/blender/src/editsima.c
+++ b/source/blender/src/editsima.c
@@ -110,7 +110,7 @@
#include "editmesh.h"
/* local prototypes */
-void sel_uvco_inside_radius(short , EditFace *efa, MTFace *, int , float *, float *, short);
+static void sel_uvco_inside_radius(short , EditFace *efa, MTFace *, int , float *, float *, short);
void uvedit_selectionCB(short , Object *, short *, float ); /* used in edit.c*/
void object_uvs_changed(Object *ob)
@@ -1264,7 +1264,7 @@ void snap_menu_sima(void)
* Just for readability...
*/
-void sel_uvco_inside_radius(short sel, EditFace *efa, MTFace *tface, int index, float *offset, float *ell, short select_index)
+static void sel_uvco_inside_radius(short sel, EditFace *efa, MTFace *tface, int index, float *offset, float *ell, short select_index)
{
// normalized ellipse: ell[0] = scaleX,
// [1] = scaleY
@@ -1730,7 +1730,7 @@ void uvface_setsel__internal(short select)
} else if ((G.sima->flag & SI_SYNC_UVSEL)==0 && G.sima->sticky == SI_STICKY_LOC) {
EditFace *efa_vlist;
MTFace *tf_vlist;
- UvMapVert *vlist, *start_vlist=NULL, *vlist_iter;
+ UvMapVert *start_vlist=NULL, *vlist_iter;
struct UvVertMap *vmap;
float limit[2];
int efa_index;
@@ -1760,7 +1760,7 @@ void uvface_setsel__internal(short select)
simaUVSel_UnSet(efa, tf, i);
}
- vlist= vlist_iter= get_uv_map_vert_EM(vmap, (*(&efa->v1 + i))->tmp.l);
+ vlist_iter= get_uv_map_vert_EM(vmap, (*(&efa->v1 + i))->tmp.l);
while (vlist_iter) {
if (vlist_iter->separate)
diff --git a/source/blender/src/editsound.c b/source/blender/src/editsound.c
index 2d70525f971..c6ecc8d5865 100644
--- a/source/blender/src/editsound.c
+++ b/source/blender/src/editsound.c
@@ -91,15 +91,12 @@
/* this might move to the external header */
-void* sound_get_libraryinterface(void);
-
static SND_SceneHandle ghSoundScene=NULL;
static SND_AudioDeviceInterfaceHandle ghAudioDeviceInterface=NULL;
/* que? why only here? because of the type define? */
-bSound *sound_find_sound(char *id_name);
-void sound_read_wav_data(bSound * sound, PackedFile * pf);
-void sound_stop_sound(void *object, bSound *sound);
+static bSound *sound_find_sound(char *id_name);
+static void sound_read_wav_data(bSound * sound, PackedFile * pf);
void winqreadsoundspace(struct ScrArea *sa, void *spacedata, struct BWinEvent *evt);
/* void sound_stop_all_sounds(void); already in BIF_editsound.h */
@@ -358,7 +355,7 @@ void sound_initialize_sample(bSound *sound)
}
-void sound_read_wav_data(bSound *sound, PackedFile *pf)
+static void sound_read_wav_data(bSound *sound, PackedFile *pf)
{
int i, temp;
short shortbuf, *temps;
@@ -1026,7 +1023,7 @@ void sound_play_sound(bSound *sound)
-bSound *sound_find_sound(char *id_name)
+static bSound *sound_find_sound(char *id_name)
{
bSound *sound;
diff --git a/source/blender/src/meshtools.c b/source/blender/src/meshtools.c
index eed7737c26d..66a484eb903 100644
--- a/source/blender/src/meshtools.c
+++ b/source/blender/src/meshtools.c
@@ -771,15 +771,15 @@ intptr_t mesh_octree_table(Object *ob, float *co, char mode)
}
else {
MVert *mvert;
- float *co;
+ float *vco;
int a, totvert;
MeshOctree.orco= mesh_getRefKeyCos(me, &totvert);
mesh_get_texspace(me, MeshOctree.orcoloc, NULL, NULL);
for(a=0, mvert= me->mvert; a<me->totvert; a++, mvert++) {
- co= (MeshOctree.orco)? MeshOctree.orco[a]: mvert->co;
- DO_MINMAX(co, min, max);
+ vco= (MeshOctree.orco)? MeshOctree.orco[a]: mvert->co;
+ DO_MINMAX(vco, min, max);
}
}
@@ -813,12 +813,12 @@ intptr_t mesh_octree_table(Object *ob, float *co, char mode)
}
else {
MVert *mvert;
- float *co;
+ float *vco;
int a;
for(a=0, mvert= me->mvert; a<me->totvert; a++, mvert++) {
- co= (MeshOctree.orco)? MeshOctree.orco[a]: mvert->co;
- mesh_octree_add_nodes(MeshOctree.table, co, MeshOctree.offs, MeshOctree.div, a+1);
+ vco= (MeshOctree.orco)? MeshOctree.orco[a]: mvert->co;
+ mesh_octree_add_nodes(MeshOctree.table, vco, MeshOctree.offs, MeshOctree.div, a+1);
}
}
}
diff --git a/source/blender/src/parametrizer.c b/source/blender/src/parametrizer.c
index 7aa27f99d77..1cf796d86bc 100644
--- a/source/blender/src/parametrizer.c
+++ b/source/blender/src/parametrizer.c
@@ -998,7 +998,7 @@ static float p_edge_boundary_angle(PEdge *e)
static void p_chart_fill_boundary(PChart *chart, PEdge *be, int nedges)
{
PEdge *e, *e1, *e2;
- PHashKey vkeys[3];
+
PFace *f;
struct Heap *heap = BLI_heap_new();
float angle;
@@ -1036,9 +1036,9 @@ static void p_chart_fill_boundary(PChart *chart, PEdge *be, int nedges)
e->flag |= PEDGE_FILLED;
e1->flag |= PEDGE_FILLED;
- vkeys[0] = e->vert->u.key;
- vkeys[1] = e1->vert->u.key;
- vkeys[2] = e2->vert->u.key;
+
+
+
f = p_face_add_fill(chart, e->vert, e1->vert, e2->vert);
f->flag |= PFACE_FILLED;
@@ -1078,11 +1078,11 @@ static void p_chart_fill_boundary(PChart *chart, PEdge *be, int nedges)
static void p_chart_fill_boundaries(PChart *chart, PEdge *outer)
{
- PEdge *e, *enext, *be;
+ PEdge *e, *be; /* *enext - as yet unused */
int nedges;
for (e=chart->edges; e; e=e->nextlink) {
- enext = e->nextlink;
+ /* enext = e->nextlink; - as yet unused */
if (e->pair || (e->flag & PEDGE_FILLED))
continue;
@@ -3199,7 +3199,7 @@ static PBool p_chart_convex_hull(PChart *chart, PVert ***verts, int *nverts, int
return P_TRUE;
}
-float p_rectangle_area(float *p1, float *dir, float *p2, float *p3, float *p4)
+static float p_rectangle_area(float *p1, float *dir, float *p2, float *p3, float *p4)
{
/* given 4 points on the rectangle edges and the direction of on edge,
compute the area of the rectangle */
@@ -3342,7 +3342,7 @@ static float p_chart_minimum_area_angle(PChart *chart)
return minangle;
}
-void p_chart_rotate_minimum_area(PChart *chart)
+static void p_chart_rotate_minimum_area(PChart *chart)
{
float angle = p_chart_minimum_area_angle(chart);
float sine = sin(angle);
@@ -3541,7 +3541,7 @@ static float p_smooth_distortion(PEdge *e, float avg2d, float avg3d)
return (len3d == 0.0f)? 0.0f: len2d/len3d;
}
-void p_smooth(PChart *chart)
+static void p_smooth(PChart *chart)
{
PEdge *e;
PVert *v;
@@ -3964,7 +3964,7 @@ void param_construct_end(ParamHandle *handle, ParamBool fill, ParamBool impl)
for (i = j = 0; i < phandle->ncharts; i++) {
PVert *v;
- PChart *chart = phandle->charts[i];
+ chart = phandle->charts[i];
p_chart_boundaries(chart, &nboundaries, &outer);
diff --git a/source/blender/src/retopo.c b/source/blender/src/retopo.c
index 47eee872a8a..5118744127c 100644
--- a/source/blender/src/retopo.c
+++ b/source/blender/src/retopo.c
@@ -85,18 +85,18 @@ typedef struct RetopoPaintHit {
float where;
} RetopoPaintHit;
-void retopo_do_2d(View3D *v3d, double proj[2], float *v, char adj);
-void retopo_paint_debug_print(RetopoPaintData *rpd);
+static void retopo_do_2d(View3D *v3d, double proj[2], float *v, char adj);
+static void retopo_paint_debug_print(RetopoPaintData *rpd);
/* Painting */
-RetopoPaintData *get_retopo_paint_data()
+RetopoPaintData *get_retopo_paint_data(void)
{
if(!retopo_mesh_paint_check()) return NULL;
if(!G.editMesh) return NULL;
return G.editMesh->retopo_paint_data;
}
-char retopo_mesh_paint_check()
+char retopo_mesh_paint_check(void)
{
return retopo_mesh_check() && G.scene->toolsettings->retopo_mode & RETOPO_PAINT;
}
@@ -117,7 +117,7 @@ void retopo_free_paint_data(RetopoPaintData *rpd)
}
}
-void retopo_free_paint()
+void retopo_free_paint(void)
{
retopo_free_paint_data(G.editMesh->retopo_paint_data);
G.editMesh->retopo_paint_data= NULL;
@@ -251,7 +251,7 @@ EditFace *addfaceif(EditMesh *em, EditVert *v1, EditVert *v2, EditVert *v3, Edit
return addfacelist(v1,v2,v3,v4,NULL,NULL);
}
-void retopo_paint_apply()
+void retopo_paint_apply(void)
{
RetopoPaintData *rpd= G.editMesh->retopo_paint_data;
EditVert *eve;
@@ -392,7 +392,7 @@ void retopo_paint_add_ellipse(RetopoPaintData *rpd, short mouse[2])
allqueue(REDRAWVIEW3D,0);
}
-void retopo_end_okee()
+void retopo_end_okee(void)
{
if(okee("Apply retopo paint?"))
retopo_paint_apply();
@@ -442,7 +442,7 @@ void retopo_paint_view_update(struct View3D *v3d)
}
}
-void retopo_force_update()
+void retopo_force_update(void)
{
RetopoPaintData *rpd= get_retopo_paint_data();
@@ -727,11 +727,11 @@ RetopoPaintData *retopo_paint_data_copy(RetopoPaintData *rpd)
return copy;
}
-char retopo_mesh_check()
+char retopo_mesh_check(void)
{
return G.obedit && G.obedit->type==OB_MESH && (G.scene->toolsettings->retopo_mode & RETOPO);
}
-char retopo_curve_check()
+char retopo_curve_check(void)
{
return G.obedit && (G.obedit->type==OB_CURVE ||
G.obedit->type==OB_SURF) && (((Curve*)G.obedit->data)->flag & CU_RETOPO);
@@ -751,7 +751,7 @@ void retopo_toggle(void *j1,void *j2)
allqueue(REDRAWVIEW3D, 0);
}
-void retopo_do_2d(View3D *v3d, double proj[2], float *v, char adj)
+static void retopo_do_2d(View3D *v3d, double proj[2], float *v, char adj)
{
/* Check to make sure vert is visible in window */
if(proj[0]>0 && proj[1]>0 && proj[0] < v3d->depths->w && proj[1] < v3d->depths->h) {
@@ -792,7 +792,7 @@ void retopo_do_vert(View3D *v3d, float *v)
retopo_do_2d(v3d,proj,v,0);
}
-void retopo_do_all()
+void retopo_do_all(void)
{
RetopoViewData *rvd= G.vd->retopo_view_data;
if(retopo_mesh_check()) {
@@ -905,7 +905,7 @@ void retopo_free_view_data(View3D *v3d)
}
}
-void retopo_paint_debug_print(RetopoPaintData *rpd)
+static void retopo_paint_debug_print(RetopoPaintData *rpd)
{
RetopoPaintLine *l;
RetopoPaintPoint *p;
diff --git a/source/blender/src/sculptmode.c b/source/blender/src/sculptmode.c
index 31d5ae4610d..c534a8b3cab 100644
--- a/source/blender/src/sculptmode.c
+++ b/source/blender/src/sculptmode.c
@@ -192,9 +192,9 @@ SculptData *sculpt_data(void)
return &G.scene->sculptdata;
}
-void sculpt_init_session(void);
-void init_brushaction(BrushAction *a, short *, short *);
-void sculpt_undo_push(const short);
+static void sculpt_init_session(void);
+static void init_brushaction(BrushAction *a, short *, short *);
+static void sculpt_undo_push(const short);
SculptSession *sculpt_session(void)
{
@@ -208,7 +208,7 @@ SculptSession *sculpt_session(void)
* Allocate/initialize/free data
*/
-void sculpt_init_session(void)
+static void sculpt_init_session(void)
{
if(sculpt_data()->session)
sculptsession_free(G.scene);
@@ -217,7 +217,7 @@ void sculpt_init_session(void)
/* vertex_users is an array of Lists that store all the faces that use a
particular vertex. vertex_users is in the same order as mesh.mvert */
-void calc_vertex_users()
+static void calc_vertex_users()
{
SculptSession *ss= sculpt_session();
int i,j;
@@ -865,14 +865,14 @@ float tex_strength(BrushAction *a, float *point, const float len,const unsigned
float fy= point_2d[1];
float angle= atan2(fy, fx) - rot;
- float len= sqrtf(fx*fx + fy*fy);
+ float flen= sqrtf(fx*fx + fy*fy);
if(rot<0.001 && rot>-0.001) {
px= point_2d[0];
py= point_2d[1];
} else {
- px= len * cos(angle) + 2000;
- py= len * sin(angle) + 2000;
+ px= flen * cos(angle) + 2000;
+ py= flen * sin(angle) + 2000;
}
if(sx != 1)
px %= sx-1;
@@ -884,10 +884,10 @@ float tex_strength(BrushAction *a, float *point, const float len,const unsigned
float fy= (point_2d[1] - a->mouse[1]) / bsize;
float angle= atan2(fy, fx) - rot;
- float len= sqrtf(fx*fx + fy*fy);
+ float flen= sqrtf(fx*fx + fy*fy);
- fx = len * cos(angle) + 0.5;
- fy = len * sin(angle) + 0.5;
+ fx = flen * cos(angle) + 0.5;
+ fy = flen * sin(angle) + 0.5;
avg= get_texcache_pixel_bilinear(ss, fx * TC_SIZE, fy * TC_SIZE);
}
@@ -1223,7 +1223,7 @@ void sculptmode_update_tex()
}
/* pr_mouse is only used for the grab brush, can be NULL otherwise */
-void init_brushaction(BrushAction *a, short *mouse, short *pr_mouse)
+static void init_brushaction(BrushAction *a, short *mouse, short *pr_mouse)
{
SculptData *sd = sculpt_data();
const float mouse_depth = get_depth(mouse[0], mouse[1]);
@@ -1809,7 +1809,7 @@ void sculpt(void)
allqueue(REDRAWVIEW3D, 0);
}
-void sculpt_undo_push(const short brush_type)
+static void sculpt_undo_push(const short brush_type)
{
switch(brush_type) {
case DRAW_BRUSH:
diff --git a/source/blender/src/seqaudio.c b/source/blender/src/seqaudio.c
index 2c86ac92c7f..1e0c8099dea 100644
--- a/source/blender/src/seqaudio.c
+++ b/source/blender/src/seqaudio.c
@@ -86,7 +86,7 @@
#include "blendef.h"
-void audio_fill(void *mixdown, Uint8 *sstream, int len);
+static void audio_fill(void *mixdown, Uint8 *sstream, int len);
/* ************ GLOBALS ************* */
static int audio_pos;
@@ -419,7 +419,7 @@ static void audio_fill_seq(Sequence * seq, void * mixdown,
#endif
#ifndef DISABLE_SDL
-void audio_fill(void *mixdown, Uint8 *sstream, int len)
+static void audio_fill(void *mixdown, Uint8 *sstream, int len)
{
Editing *ed;
Sequence *seq;
diff --git a/source/blender/src/space.c b/source/blender/src/space.c
index bc5541f1bcf..76ba4275c1a 100644
--- a/source/blender/src/space.c
+++ b/source/blender/src/space.c
@@ -197,9 +197,9 @@ extern void StartKetsjiShellSimulation(ScrArea *area, char* startscenename, stru
* When the mipmap setting changes, we want to redraw the view right
* away to reflect this setting.
*/
-void space_mipmap_button_function(int event);
+static void space_mipmap_button_function(int event);
-void free_soundspace(SpaceSound *ssound);
+static void free_soundspace(SpaceSound *ssound);
/* *************************************** */
@@ -3311,7 +3311,7 @@ void initipo(ScrArea *sa)
/* ******************** SPACE: INFO ********************** */
-void space_mipmap_button_function(int event) {
+static void space_mipmap_button_function(int event) {
GPU_set_mipmap(!(U.gameflags & USER_DISABLE_MIPMAP));
allqueue(REDRAWVIEW3D, 0);
@@ -5381,7 +5381,7 @@ static void init_soundspace(ScrArea *sa)
}
-void free_soundspace(SpaceSound *ssound)
+static void free_soundspace(SpaceSound *ssound)
{
/* don't free ssound itself */
diff --git a/source/blender/src/transform_ndofinput.c b/source/blender/src/transform_ndofinput.c
index b7362197423..a22c7ed6472 100644
--- a/source/blender/src/transform_ndofinput.c
+++ b/source/blender/src/transform_ndofinput.c
@@ -38,8 +38,8 @@
#include "transform.h"
-int updateNDofMotion(NDofInput *n); // return 0 when motion is null
-void resetNDofInput(NDofInput *n);
+static int updateNDofMotion(NDofInput *n); // return 0 when motion is null
+static void resetNDofInput(NDofInput *n);
void initNDofInput(NDofInput *n)
{
@@ -56,7 +56,7 @@ void initNDofInput(NDofInput *n)
}
}
-void resetNDofInput(NDofInput *n)
+static void resetNDofInput(NDofInput *n)
{
int i;
for(i = 0; i < 6; i++)
@@ -122,7 +122,7 @@ void applyNDofInput(NDofInput *n, float *vec)
}
-int updateNDofMotion(NDofInput *n)
+static int updateNDofMotion(NDofInput *n)
{
float fval[7];
int i;
diff --git a/source/blender/src/unwrapper.c b/source/blender/src/unwrapper.c
index ee5ce0c914e..612e068c6ca 100644
--- a/source/blender/src/unwrapper.c
+++ b/source/blender/src/unwrapper.c
@@ -202,8 +202,7 @@ ParamHandle *construct_param_handle(EditMesh *em, short implicit, short fill, sh
handle = param_construct_begin();
if ((G.scene->toolsettings->uvcalc_flag & UVCALC_NO_ASPECT_CORRECT)==0) {
- EditMesh *em = G.editMesh;
- EditFace *efa = EM_get_actFace(1);
+ efa = EM_get_actFace(1);
if (efa) {
float aspx, aspy;
MTFace *tface = CustomData_em_get(&em->fdata, efa->data, CD_MTFACE);
diff --git a/source/blender/src/vpaint.c b/source/blender/src/vpaint.c
index 935c546a235..8da5e1b2572 100644
--- a/source/blender/src/vpaint.c
+++ b/source/blender/src/vpaint.c
@@ -740,7 +740,7 @@ static void vpaint_blend( unsigned int *col, unsigned int *colorig, unsigned int
}
-static int sample_backbuf_area(VPaint *vp, int *indexar, int totface, int x, int y, float size)
+static int sample_backbuf_area(int *indexar, int totface, int x, int y, float size)
{
unsigned int *rt;
struct ImBuf *ibuf;
@@ -1196,7 +1196,7 @@ void weight_paint(void)
/* which faces are involved */
if(Gwp.flag & VP_AREA) {
- totindex= sample_backbuf_area(&Gwp, indexar, me->totface, mval[0], mval[1], Gwp.size);
+ totindex= sample_backbuf_area(indexar, me->totface, mval[0], mval[1], Gwp.size);
}
else {
indexar[0]= sample_backbuf(mval[0], mval[1]);
@@ -1428,7 +1428,7 @@ void vertex_paint()
/* which faces are involved */
if(Gvp.flag & VP_AREA) {
- totindex= sample_backbuf_area(&Gvp, indexar, me->totface, mval[0], mval[1], Gvp.size);
+ totindex= sample_backbuf_area(indexar, me->totface, mval[0], mval[1], Gvp.size);
}
else {
indexar[0]= sample_backbuf(mval[0], mval[1]);