Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/blender/blenkernel/intern/mesh.c26
-rw-r--r--source/blender/editors/mesh/meshtools.c4
-rw-r--r--source/blender/modifiers/intern/MOD_mirror.c2
-rw-r--r--source/blender/modifiers/intern/MOD_screw.c18
-rw-r--r--source/blender/modifiers/intern/MOD_solidify.c4
-rw-r--r--source/blender/render/intern/source/convertblender.c14
6 files changed, 36 insertions, 32 deletions
diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c
index 43958457edb..4b4875213b1 100644
--- a/source/blender/blenkernel/intern/mesh.c
+++ b/source/blender/blenkernel/intern/mesh.c
@@ -466,8 +466,8 @@ int test_index_face(MFace *mface, CustomData *fdata, int mfindex, int nr)
if(mface->v3==0) {
static int corner_indices[4] = {1, 2, 0, 3};
- SWAP(int, mface->v1, mface->v2);
- SWAP(int, mface->v2, mface->v3);
+ SWAP(unsigned int, mface->v1, mface->v2);
+ SWAP(unsigned int, mface->v2, mface->v3);
if(fdata)
CustomData_swap(fdata, mfindex, corner_indices);
@@ -477,8 +477,8 @@ int test_index_face(MFace *mface, CustomData *fdata, int mfindex, int nr)
if(mface->v3==0 || mface->v4==0) {
static int corner_indices[4] = {2, 3, 0, 1};
- SWAP(int, mface->v1, mface->v3);
- SWAP(int, mface->v2, mface->v4);
+ SWAP(unsigned int, mface->v1, mface->v3);
+ SWAP(unsigned int, mface->v2, mface->v4);
if(fdata)
CustomData_swap(fdata, mfindex, corner_indices);
@@ -520,12 +520,14 @@ void set_mesh(Object *ob, Mesh *me)
/* ************** make edges in a Mesh, for outside of editmode */
struct edgesort {
- int v1, v2;
+ unsigned int v1, v2;
short is_loose, is_draw;
};
/* edges have to be added with lowest index first for sorting */
-static void to_edgesort(struct edgesort *ed, int v1, int v2, short is_loose, short is_draw)
+static void to_edgesort(struct edgesort *ed,
+ unsigned int v1, unsigned int v2,
+ short is_loose, short is_draw)
{
if(v1<v2) {
ed->v1= v1; ed->v2= v2;
@@ -627,7 +629,7 @@ static void make_edges_mdata(MVert *UNUSED(allvert), MFace *allface, int UNUSED(
/* order is swapped so extruding this edge as a surface wont flip face normals
* with cyclic curves */
if(ed->v1+1 != ed->v2) {
- SWAP(int, medge->v1, medge->v2);
+ SWAP(unsigned int, medge->v1, medge->v2);
}
medge++;
}
@@ -1029,17 +1031,17 @@ typedef struct EdgeLink {
typedef struct VertLink {
Link *next, *prev;
- int index;
+ unsigned int index;
} VertLink;
-static void prependPolyLineVert(ListBase *lb, int index)
+static void prependPolyLineVert(ListBase *lb, unsigned int index)
{
VertLink *vl= MEM_callocN(sizeof(VertLink), "VertLink");
vl->index = index;
BLI_addhead(lb, vl);
}
-static void appendPolyLineVert(ListBase *lb, int index)
+static void appendPolyLineVert(ListBase *lb, unsigned int index)
{
VertLink *vl= MEM_callocN(sizeof(VertLink), "VertLink");
vl->index = index;
@@ -1111,8 +1113,8 @@ void mesh_to_curve(Scene *scene, Object *ob)
int closed = FALSE;
int totpoly= 0;
MEdge *med_current= ((EdgeLink *)edges.last)->edge;
- int startVert= med_current->v1;
- int endVert= med_current->v2;
+ unsigned int startVert= med_current->v1;
+ unsigned int endVert= med_current->v2;
int ok= TRUE;
appendPolyLineVert(&polyline, startVert); totpoly++;
diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c
index f3722e81246..b94b60fc279 100644
--- a/source/blender/editors/mesh/meshtools.c
+++ b/source/blender/editors/mesh/meshtools.c
@@ -1080,8 +1080,8 @@ int *mesh_get_x_mirror_faces(Object *ob, EditMesh *em)
/* make sure v4 is not 0 if a quad */
if(mf->v4 && mirrormf.v4==0) {
- SWAP(int, mirrormf.v1, mirrormf.v3);
- SWAP(int, mirrormf.v2, mirrormf.v4);
+ SWAP(unsigned int, mirrormf.v1, mirrormf.v3);
+ SWAP(unsigned int, mirrormf.v2, mirrormf.v4);
}
hashmf= BLI_ghash_lookup(fhash, &mirrormf);
diff --git a/source/blender/modifiers/intern/MOD_mirror.c b/source/blender/modifiers/intern/MOD_mirror.c
index c72a76f0101..8a003256ff2 100644
--- a/source/blender/modifiers/intern/MOD_mirror.c
+++ b/source/blender/modifiers/intern/MOD_mirror.c
@@ -266,7 +266,7 @@ static DerivedMesh *doMirrorOnAxis(MirrorModifierData *mmd,
}
/* Flip face normal */
- SWAP(int, mf2->v1, mf2->v3);
+ SWAP(unsigned int, mf2->v1, mf2->v3);
DM_swap_face_data(result, numFaces, corner_indices);
test_index_face(mf2, &result->faceData, numFaces, inMF.v4?4:3);
diff --git a/source/blender/modifiers/intern/MOD_screw.c b/source/blender/modifiers/intern/MOD_screw.c
index 0867a4b2a7b..93abbb1780c 100644
--- a/source/blender/modifiers/intern/MOD_screw.c
+++ b/source/blender/modifiers/intern/MOD_screw.c
@@ -145,12 +145,12 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
int mface_index=0;
int step;
int i, j;
- int i1,i2;
+ unsigned int i1, i2;
int step_tot= useRenderParams ? ltmd->render_steps : ltmd->steps;
const int do_flip = ltmd->flag & MOD_SCREW_NORMAL_FLIP ? 1 : 0;
int maxVerts=0, maxEdges=0, maxFaces=0;
- int totvert= dm->getNumVerts(dm);
- int totedge= dm->getNumEdges(dm);
+ const unsigned int totvert= dm->getNumVerts(dm);
+ const unsigned int totedge= dm->getNumEdges(dm);
char axis_char= 'X', close;
float angle= ltmd->angle;
@@ -571,7 +571,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
if (lt_iter.v == lt_iter.e->v1) {
if (ed_loop_flip == 0) {
/*printf("\t\t\tFlipping 0\n");*/
- SWAP(int, lt_iter.e->v1, lt_iter.e->v2);
+ SWAP(unsigned int, lt_iter.e->v1, lt_iter.e->v2);
}/* else {
printf("\t\t\tFlipping Not 0\n");
}*/
@@ -579,7 +579,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
else if (lt_iter.v == lt_iter.e->v2) {
if (ed_loop_flip == 1) {
/*printf("\t\t\tFlipping 1\n");*/
- SWAP(int, lt_iter.e->v1, lt_iter.e->v2);
+ SWAP(unsigned int, lt_iter.e->v1, lt_iter.e->v2);
}/* else {
printf("\t\t\tFlipping Not 1\n");
}*/
@@ -771,8 +771,8 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
}
if( !mf_new->v3 || !mf_new->v4 ) {
- SWAP(int, mf_new->v1, mf_new->v3);
- SWAP(int, mf_new->v2, mf_new->v4);
+ SWAP(unsigned int, mf_new->v1, mf_new->v3);
+ SWAP(unsigned int, mf_new->v2, mf_new->v4);
}
mf_new->flag= ME_SMOOTH;
origindex[mface_index]= ORIGINDEX_NONE;
@@ -807,8 +807,8 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
}
if( !mf_new->v3 || !mf_new->v4 ) {
- SWAP(int, mf_new->v1, mf_new->v3);
- SWAP(int, mf_new->v2, mf_new->v4);
+ SWAP(unsigned int, mf_new->v1, mf_new->v3);
+ SWAP(unsigned int, mf_new->v2, mf_new->v4);
}
mf_new->flag= ME_SMOOTH;
origindex[mface_index]= ORIGINDEX_NONE;
diff --git a/source/blender/modifiers/intern/MOD_solidify.c b/source/blender/modifiers/intern/MOD_solidify.c
index d11d10eb71b..2aa69526c10 100644
--- a/source/blender/modifiers/intern/MOD_solidify.c
+++ b/source/blender/modifiers/intern/MOD_solidify.c
@@ -350,7 +350,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
{
static int corner_indices[4] = {2, 1, 0, 3};
- int is_quad;
+ unsigned int is_quad;
for(i=0, mf=mface+numFaces; i<numFaces; i++, mf++) {
mf->v1 += numVerts;
@@ -362,7 +362,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
/* Flip face normal */
{
is_quad = mf->v4;
- SWAP(int, mf->v1, mf->v3);
+ SWAP(unsigned int, mf->v1, mf->v3);
DM_swap_face_data(result, i+numFaces, corner_indices);
test_index_face(mf, &result->faceData, numFaces, is_quad ? 4:3);
}
diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c
index 122b47016eb..434e596e739 100644
--- a/source/blender/render/intern/source/convertblender.c
+++ b/source/blender/render/intern/source/convertblender.c
@@ -3056,17 +3056,19 @@ static void init_render_curve(Render *re, ObjectRen *obr, int timeoffset)
/* ------------------------------------------------------------------------- */
struct edgesort {
- int v1, v2;
+ unsigned int v1, v2;
int f;
- int i1, i2;
+ unsigned int i1, i2;
};
/* edges have to be added with lowest index first for sorting */
-static void to_edgesort(struct edgesort *ed, int i1, int i2, int v1, int v2, int f)
+static void to_edgesort(struct edgesort *ed,
+ unsigned int i1, unsigned int i2,
+ unsigned int v1, unsigned int v2, int f)
{
- if(v1>v2) {
- SWAP(int, v1, v2);
- SWAP(int, i1, i2);
+ if (v1 > v2) {
+ SWAP(unsigned int, v1, v2);
+ SWAP(unsigned int, i1, i2);
}
ed->v1= v1;