svn merge ^/trunk/blender -r42882:42886
This commit is contained in:
@@ -191,7 +191,7 @@ void BLF_lang_set(const char *str)
|
||||
locreturn= setlocale(LC_ALL, long_locale);
|
||||
|
||||
if (locreturn == NULL) {
|
||||
if(G.debug & G_DEBUG)
|
||||
if(G.f & G_DEBUG)
|
||||
printf("Could not change locale to %s\n", long_locale);
|
||||
|
||||
ok= 0;
|
||||
|
||||
@@ -803,8 +803,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);
|
||||
@@ -814,8 +814,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);
|
||||
@@ -857,12 +857,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;
|
||||
@@ -968,7 +970,7 @@ static void make_edges_mdata(MVert *UNUSED(allvert), MFace *allface, MLoop *alll
|
||||
/* 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++;
|
||||
}
|
||||
@@ -1434,17 +1436,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;
|
||||
@@ -1516,8 +1518,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++;
|
||||
|
||||
@@ -1146,8 +1146,8 @@ int *mesh_get_x_mirror_faces(Object *ob, BMEditMesh *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);
|
||||
|
||||
@@ -129,12 +129,13 @@ void paint_calc_redraw_planes(float planes[4][4],
|
||||
view3d_get_transformation(ar, rv3d, ob, &mats);
|
||||
|
||||
/* use some extra space just in case */
|
||||
rect = *screen_rect;
|
||||
rect.xmin -= 2;
|
||||
rect.xmax += 2;
|
||||
rect.ymin -= 2;
|
||||
rect.ymax += 2;
|
||||
|
||||
ED_view3d_calc_clipping(&bb, planes, &mats, screen_rect);
|
||||
ED_view3d_calc_clipping(&bb, planes, &mats, &rect);
|
||||
mul_m4_fl(planes, -1.0f);
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user