diff --git a/source/blender/avi/intern/avi.c b/source/blender/avi/intern/avi.c index 1fab96b2075..dff22867d81 100644 --- a/source/blender/avi/intern/avi.c +++ b/source/blender/avi/intern/avi.c @@ -53,7 +53,7 @@ static int AVI_DEBUG=0; static char DEBUG_FCC[4]; -#define DEBUG_PRINT(x) if (AVI_DEBUG) printf("AVI DEBUG: " x); +#define DEBUG_PRINT(x) if (AVI_DEBUG) { printf("AVI DEBUG: " x); } (void)0 /* local functions */ char *fcc_to_char (unsigned int fcc); diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index 32bdac9d35e..23aa03b0331 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -1421,7 +1421,7 @@ typedef struct HairGridVert { float velocity[3]; float density; } HairGridVert; -#define HAIR_GRID_INDEX(vec, min, max, axis) (int)( (vec[axis] - min[axis]) / (max[axis] - min[axis]) * 9.99f ); +#define HAIR_GRID_INDEX(vec, min, max, axis) (int)((vec[axis] - min[axis]) / (max[axis] - min[axis]) * 9.99f) /* Smoothing of hair velocities: * adapted from Volumetric Methods for Simulation and Rendering of Hair diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 6b70745d9b2..d8a874872b4 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -1679,7 +1679,7 @@ static void direct_link_brush(FileData *fd, Brush *brush) static void direct_link_script(FileData *UNUSED(fd), Script *script) { script->id.us = 1; - SCRIPT_SET_NULL(script) + SCRIPT_SET_NULL(script); } @@ -5324,7 +5324,7 @@ static void lib_link_screen(FileData *fd, Main *main) if (scpt->script) { scpt->script= newlibadr(fd, sc->id.lib, scpt->script); if (scpt->script) { - SCRIPT_SET_NULL(scpt->script) + SCRIPT_SET_NULL(scpt->script); } } } @@ -5599,7 +5599,7 @@ void lib_link_screen_restore(Main *newmain, bScreen *curscreen, Scene *curscene) /*sc->script = NULL; - 2.45 set to null, better re-run the script */ if (scpt->script) { - SCRIPT_SET_NULL(scpt->script) + SCRIPT_SET_NULL(scpt->script); } } else if (sl->spacetype==SPACE_OUTLINER) { diff --git a/source/blender/bmesh/intern/bmesh_polygon.c b/source/blender/bmesh/intern/bmesh_polygon.c index a48ec6ab1e6..7677a86e789 100644 --- a/source/blender/bmesh/intern/bmesh_polygon.c +++ b/source/blender/bmesh/intern/bmesh_polygon.c @@ -174,10 +174,10 @@ float BM_face_area_calc(BMesh *bm, BMFace *f) copy_v3_v3(verts[i], l->v->co); } - if(f->len == 3) { + if (f->len == 3) { area = area_tri_v3(verts[0], verts[1], verts[2]); } - else if(f->len == 4) { + else if (f->len == 4) { area = area_quad_v3(verts[0], verts[1], verts[2], verts[3]); } else { @@ -321,7 +321,7 @@ void poly_rotate_plane(const float normal[3], float (*verts)[3], const int nvert axis_angle_to_quat(q, axis, (float)angle); quat_to_mat3(mat, q); - for (i = 0; i < nverts; i++) + for (i = 0; i < nverts; i++) mul_m3_v3(mat, verts[i]); } @@ -334,7 +334,7 @@ void BM_edge_normals_update(BMesh *bm, BMEdge *e) BMFace *f; f = BM_iter_new(&iter, bm, BM_FACES_OF_EDGE, e); - for ( ; f; f = BM_iter_step(&iter)) { + for (; f; f = BM_iter_step(&iter)) { BM_face_normal_update(bm, f); } @@ -435,7 +435,7 @@ void BM_face_normal_update(BMesh *UNUSED(bm), BMFace *f) } } /* exact same as 'bmesh_face_normal_update' but accepts vertex coords */ -void BM_face_normal_update_vcos(BMesh *UNUSED(bm), BMFace *f, float no[3], +void BM_face_normal_update_vcos(BMesh *bm, BMFace *f, float no[3], float const (*vertexCos)[3]) { BMLoop *l; @@ -507,26 +507,36 @@ static int linecrossesf(const float v1[2], const float v2[2], const float v3[2], return TRUE; } -#define GETMIN2_AXIS(a, b, ma, mb, axis) ma[axis] = MIN2(a[axis], b[axis]), mb[axis] = MAX2(a[axis], b[axis]) -#define GETMIN2(a, b, ma, mb) GETMIN2_AXIS(a, b, ma, mb, 0); GETMIN2_AXIS(a, b, ma, mb, 1); - - GETMIN2(v1, v2, mv1, mv2); - GETMIN2(v3, v4, mv3, mv4); +#define GETMIN2_AXIS(a, b, ma, mb, axis) \ + { \ + ma[axis] = MIN2(a[axis], b[axis]); \ + mb[axis] = MAX2(a[axis], b[axis]); \ + } (void) + +#define GETMIN2(a, b, ma, mb) \ + { \ + GETMIN2_AXIS(a, b, ma, mb, 0); \ + GETMIN2_AXIS(a, b, ma, mb, 1); \ + GETMIN2(v1, v2, mv1, mv2); \ + GETMIN2(v3, v4, mv3, mv4); \ + } (void) /* do an interval test on the x and y axe */ /* first do x axi */ + #define T (FLT_EPSILON * 15) - if ( ABS(v1[1] - v2[1]) < T && - ABS(v3[1] - v4[1]) < T && - ABS(v1[1] - v3[1]) < T) + + if (ABS(v1[1] - v2[1]) < T && + ABS(v3[1] - v4[1]) < T && + ABS(v1[1] - v3[1]) < T) { return (mv4[0] >= mv1[0] && mv3[0] <= mv2[0]); } /* now do y axi */ - if ( ABS(v1[0] - v2[0]) < T && - ABS(v3[0] - v4[0]) < T && - ABS(v1[0] - v3[0]) < T) + if (ABS(v1[0] - v2[0]) < T && + ABS(v3[0] - v4[0]) < T && + ABS(v1[0] - v3[0]) < T) { return (mv4[1] >= mv1[1] && mv3[1] <= mv2[1]); } @@ -826,7 +836,7 @@ void BM_face_legal_splits(BMesh *bm, BMFace *f, BMLoop *(*loops)[2], int len) { BMIter iter; BMLoop *l; - float v1[3], v2[3], v3[3]/*, v4[3 */, no[3], mid[3], *p1, *p2, *p3, *p4; + float v1[3], v2[3], v3[3] /*, v4[3 */, no[3], mid[3], *p1, *p2, *p3, *p4; float out[3] = {-234324.0f, -234324.0f, 0.0f}; float (*projverts)[3]; float (*edgeverts)[3]; diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index b6784e16cc6..f761be741e9 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -160,11 +160,18 @@ typedef struct ImagePaintState { char *warnpackedfile; char *warnmultifile; - /* texture paint only */ + /* viewport texture paint only, but _not_ project paint */ Object *ob; - Mesh *me; int faceindex; float uv[2]; + int do_facesel; + + DerivedMesh *dm; + int dm_totface; + int dm_release; + + MFace *dm_mface; + MTFace *dm_mtface; } ImagePaintState; typedef struct ImagePaintPartialRedraw { @@ -525,11 +532,11 @@ static Image *imapaint_face_image(const ImagePaintState *s, int face_index) Image *ima; if (scene_use_new_shading_nodes(s->scene)) { - MFace *mf = s->me->mface+face_index; + MFace *mf = &s->dm_mface[face_index]; ED_object_get_active_image(s->ob, mf->mat_nr, &ima, NULL, NULL); } else { - MTFace *tf = s->me->mtface+face_index; + MTFace *tf = &s->dm_mtface[face_index]; ima = tf->tpage; } @@ -4540,9 +4547,9 @@ static int imapaint_paint_stroke(ViewContext *vc, ImagePaintState *s, BrushPaint if (texpaint) { /* pick new face and image */ - if ( imapaint_pick_face(vc, s->me, mval, &newfaceindex) && - ((s->me->editflag & ME_EDIT_PAINT_MASK)==0 || (s->me->mface+newfaceindex)->flag & ME_FACE_SEL) - ) { + if (imapaint_pick_face(vc, mval, &newfaceindex, s->dm_totface) && + ((s->do_facesel == FALSE) || (s->dm_mface[newfaceindex].flag & ME_FACE_SEL))) + { ImBuf *ibuf; newimage = imapaint_face_image(s, newfaceindex); @@ -4853,9 +4860,39 @@ static int texture_paint_init(bContext *C, wmOperator *op) pop->orig_brush_size= brush_size(scene, brush); if (pop->mode != PAINT_MODE_2D) { - pop->s.ob = OBACT; - pop->s.me = get_mesh(pop->s.ob); - if (!pop->s.me) return 0; + Object *ob = OBACT; + Mesh *me = get_mesh(ob); + + if (!me) { + return 0; + } + + pop->s.ob = ob; + pop->s.do_facesel = (me->editflag & ME_EDIT_PAINT_MASK) != 0; + + /* for non prohect paint we need */ + /* fill in derived mesh */ + if (ob->derivedFinal && CustomData_has_layer( &ob->derivedFinal->faceData, CD_MTFACE)) { + pop->s.dm = ob->derivedFinal; + pop->s.dm_release = FALSE; + } + else { + pop->s.dm = mesh_get_derived_final(pop->s.scene, ob, pop->s.scene->customdata_mask | CD_MASK_MTFACE); + pop->s.dm_release = TRUE; + } + + if (!CustomData_has_layer(&pop->s.dm->faceData, CD_MTFACE)) { + + if (pop->s.dm_release) + pop->s.dm->release(pop->s.dm); + + pop->s.dm = NULL; + return 0; + } + + pop->s.dm_mface = pop->s.dm->getTessFaceArray(pop->s.dm); + pop->s.dm_mtface= pop->s.dm->getTessFaceDataArray(pop->s.dm, CD_MTFACE); + pop->s.dm_totface = pop->s.dm->getNumTessFaces(pop->s.dm); } else { pop->s.image = pop->s.sima->image; @@ -4976,6 +5013,11 @@ static void paint_exit(bContext *C, wmOperator *op) project_paint_end(&pop->ps); } + else { + /* non projection 3d paint, could move into own function of more needs adding */ + if (pop->s.dm_release) + pop->s.dm->release(pop->s.dm); + } paint_redraw(C, &pop->s, pop->mode == PAINT_MODE_3D, 1); undo_paint_push_end(UNDO_PAINT_IMAGE); diff --git a/source/blender/imbuf/intern/tiff.c b/source/blender/imbuf/intern/tiff.c index 5a8caa8769f..3fbeb6a957d 100644 --- a/source/blender/imbuf/intern/tiff.c +++ b/source/blender/imbuf/intern/tiff.c @@ -85,7 +85,7 @@ typedef struct ImbTIFFMemFile { toff_t offset; /* Current offset within the file. */ tsize_t size; /* Size of the TIFF file. */ } ImbTIFFMemFile; -#define IMB_TIFF_GET_MEMFILE(x) ((ImbTIFFMemFile*)(x)); +#define IMB_TIFF_GET_MEMFILE(x) ((ImbTIFFMemFile*)(x)) diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index cd17d464fd5..940a5bbb20e 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -348,7 +348,7 @@ typedef struct Script { char scriptname[1024]; /* 1024 = FILE_MAX */ char scriptarg[256]; /* 1024 = FILE_MAX */ } Script; -#define SCRIPT_SET_NULL(_script) _script->py_draw = _script->py_event = _script->py_button = _script->py_browsercallback = _script->py_globaldict = NULL; _script->flags = 0; +#define SCRIPT_SET_NULL(_script) _script->py_draw = _script->py_event = _script->py_button = _script->py_browsercallback = _script->py_globaldict = NULL; _script->flags = 0 typedef struct SpaceScript { SpaceLink *next, *prev; diff --git a/source/blender/modifiers/intern/MOD_explode.c b/source/blender/modifiers/intern/MOD_explode.c index ddc79c4e4f8..56aa0f3c939 100644 --- a/source/blender/modifiers/intern/MOD_explode.c +++ b/source/blender/modifiers/intern/MOD_explode.c @@ -210,8 +210,8 @@ static MFace *get_dface(DerivedMesh *dm, DerivedMesh *split, int cur, int i, MFa v[2]=mf->v##c; uv[2]=c-1; \ v[3]=mf->v##d; uv[3]=d-1; -#define GET_ES(v1, v2) edgecut_get(eh, v1, v2); -#define INT_UV(uvf, c0, c1) interp_v2_v2v2(uvf, mf->uv[c0], mf->uv[c1], 0.5f); +#define GET_ES(v1, v2) edgecut_get(eh, v1, v2) +#define INT_UV(uvf, c0, c1) interp_v2_v2v2(uvf, mf->uv[c0], mf->uv[c1], 0.5f) static void remap_faces_3_6_9_12(DerivedMesh *dm, DerivedMesh *split, MFace *mf, int *facepa, int *vertpa, int i, EdgeHash *eh, int cur, int v1, int v2, int v3, int v4) { @@ -221,15 +221,15 @@ static void remap_faces_3_6_9_12(DerivedMesh *dm, DerivedMesh *split, MFace *mf, facepa[cur] = vertpa[v1]; df1->v1 = v1; - df1->v2 = GET_ES(v1, v2) - df1->v3 = GET_ES(v2, v3) + df1->v2 = GET_ES(v1, v2); + df1->v3 = GET_ES(v2, v3); df1->v4 = v3; df1->flag |= ME_FACE_SEL; facepa[cur+1] = vertpa[v2]; - df2->v1 = GET_ES(v1, v2) + df2->v1 = GET_ES(v1, v2); df2->v2 = v2; - df2->v3 = GET_ES(v2, v3) + df2->v3 = GET_ES(v2, v3); df2->v4 = 0; df2->flag &= ~ME_FACE_SEL; @@ -255,13 +255,13 @@ static void remap_uvs_3_6_9_12(DerivedMesh *dm, DerivedMesh *split, int numlayer mf += i; copy_v2_v2(df1->uv[0], mf->uv[c0]); - INT_UV(df1->uv[1], c0, c1) - INT_UV(df1->uv[2], c1, c2) + INT_UV(df1->uv[1], c0, c1); + INT_UV(df1->uv[2], c1, c2); copy_v2_v2(df1->uv[3], mf->uv[c2]); - INT_UV(df2->uv[0], c0, c1) + INT_UV(df2->uv[0], c0, c1); copy_v2_v2(df2->uv[1], mf->uv[c1]); - INT_UV(df2->uv[2], c1, c2) + INT_UV(df2->uv[2], c1, c2); copy_v2_v2(df3->uv[0], mf->uv[c0]); copy_v2_v2(df3->uv[1], mf->uv[c2]); @@ -277,13 +277,13 @@ static void remap_faces_5_10(DerivedMesh *dm, DerivedMesh *split, MFace *mf, int facepa[cur] = vertpa[v1]; df1->v1 = v1; df1->v2 = v2; - df1->v3 = GET_ES(v2, v3) - df1->v4 = GET_ES(v1, v4) + df1->v3 = GET_ES(v2, v3); + df1->v4 = GET_ES(v1, v4); df1->flag |= ME_FACE_SEL; facepa[cur+1] = vertpa[v3]; - df2->v1 = GET_ES(v1, v4) - df2->v2 = GET_ES(v2, v3) + df2->v1 = GET_ES(v1, v4); + df2->v2 = GET_ES(v2, v3); df2->v3 = v3; df2->v4 = v4; df2->flag |= ME_FACE_SEL; @@ -303,11 +303,11 @@ static void remap_uvs_5_10(DerivedMesh *dm, DerivedMesh *split, int numlayer, in copy_v2_v2(df1->uv[0], mf->uv[c0]); copy_v2_v2(df1->uv[1], mf->uv[c1]); - INT_UV(df1->uv[2], c1, c2) - INT_UV(df1->uv[3], c0, c3) + INT_UV(df1->uv[2], c1, c2); + INT_UV(df1->uv[3], c0, c3); - INT_UV(df2->uv[0], c0, c3) - INT_UV(df2->uv[1], c1, c2) + INT_UV(df2->uv[0], c0, c3); + INT_UV(df2->uv[1], c1, c2); copy_v2_v2(df2->uv[2], mf->uv[c2]); copy_v2_v2(df2->uv[3], mf->uv[c3]); @@ -323,29 +323,29 @@ static void remap_faces_15(DerivedMesh *dm, DerivedMesh *split, MFace *mf, int * facepa[cur] = vertpa[v1]; df1->v1 = v1; - df1->v2 = GET_ES(v1, v2) - df1->v3 = GET_ES(v1, v3) - df1->v4 = GET_ES(v1, v4) + df1->v2 = GET_ES(v1, v2); + df1->v3 = GET_ES(v1, v3); + df1->v4 = GET_ES(v1, v4); df1->flag |= ME_FACE_SEL; facepa[cur+1] = vertpa[v2]; - df2->v1 = GET_ES(v1, v2) + df2->v1 = GET_ES(v1, v2); df2->v2 = v2; - df2->v3 = GET_ES(v2, v3) - df2->v4 = GET_ES(v1, v3) + df2->v3 = GET_ES(v2, v3); + df2->v4 = GET_ES(v1, v3); df2->flag |= ME_FACE_SEL; facepa[cur+2] = vertpa[v3]; - df3->v1 = GET_ES(v1, v3) - df3->v2 = GET_ES(v2, v3) + df3->v1 = GET_ES(v1, v3); + df3->v2 = GET_ES(v2, v3); df3->v3 = v3; - df3->v4 = GET_ES(v3, v4) + df3->v4 = GET_ES(v3, v4); df3->flag |= ME_FACE_SEL; facepa[cur+3] = vertpa[v4]; - df4->v1 = GET_ES(v1, v4) - df4->v2 = GET_ES(v1, v3) - df4->v3 = GET_ES(v3, v4) + df4->v1 = GET_ES(v1, v4); + df4->v2 = GET_ES(v1, v3); + df4->v3 = GET_ES(v3, v4); df4->v4 = v4; df4->flag |= ME_FACE_SEL; } @@ -365,23 +365,23 @@ static void remap_uvs_15(DerivedMesh *dm, DerivedMesh *split, int numlayer, int mf += i; copy_v2_v2(df1->uv[0], mf->uv[c0]); - INT_UV(df1->uv[1], c0, c1) - INT_UV(df1->uv[2], c0, c2) - INT_UV(df1->uv[3], c0, c3) + INT_UV(df1->uv[1], c0, c1); + INT_UV(df1->uv[2], c0, c2); + INT_UV(df1->uv[3], c0, c3); - INT_UV(df2->uv[0], c0, c1) + INT_UV(df2->uv[0], c0, c1); copy_v2_v2(df2->uv[1], mf->uv[c1]); - INT_UV(df2->uv[2], c1, c2) - INT_UV(df2->uv[3], c0, c2) + INT_UV(df2->uv[2], c1, c2); + INT_UV(df2->uv[3], c0, c2); - INT_UV(df3->uv[0], c0, c2) - INT_UV(df3->uv[1], c1, c2) + INT_UV(df3->uv[0], c0, c2); + INT_UV(df3->uv[1], c1, c2); copy_v2_v2(df3->uv[2], mf->uv[c2]); - INT_UV(df3->uv[3], c2, c3) + INT_UV(df3->uv[3], c2, c3); - INT_UV(df4->uv[0], c0, c3) - INT_UV(df4->uv[1], c0, c2) - INT_UV(df4->uv[2], c2, c3) + INT_UV(df4->uv[0], c0, c3); + INT_UV(df4->uv[1], c0, c2); + INT_UV(df4->uv[2], c2, c3); copy_v2_v2(df4->uv[3], mf->uv[c3]); } } @@ -394,21 +394,21 @@ static void remap_faces_7_11_13_14(DerivedMesh *dm, DerivedMesh *split, MFace *m facepa[cur] = vertpa[v1]; df1->v1 = v1; - df1->v2 = GET_ES(v1, v2) - df1->v3 = GET_ES(v2, v3) - df1->v4 = GET_ES(v1, v4) + df1->v2 = GET_ES(v1, v2); + df1->v3 = GET_ES(v2, v3); + df1->v4 = GET_ES(v1, v4); df1->flag |= ME_FACE_SEL; facepa[cur+1] = vertpa[v2]; - df2->v1 = GET_ES(v1, v2) + df2->v1 = GET_ES(v1, v2); df2->v2 = v2; - df2->v3 = GET_ES(v2, v3) + df2->v3 = GET_ES(v2, v3); df2->v4 = 0; df2->flag &= ~ME_FACE_SEL; facepa[cur+2] = vertpa[v4]; - df3->v1 = GET_ES(v1, v4) - df3->v2 = GET_ES(v2, v3) + df3->v1 = GET_ES(v1, v4); + df3->v2 = GET_ES(v2, v3); df3->v3 = v3; df3->v4 = v4; df3->flag |= ME_FACE_SEL; @@ -428,16 +428,16 @@ static void remap_uvs_7_11_13_14(DerivedMesh *dm, DerivedMesh *split, int numlay mf += i; copy_v2_v2(df1->uv[0], mf->uv[c0]); - INT_UV(df1->uv[1], c0, c1) - INT_UV(df1->uv[2], c1, c2) - INT_UV(df1->uv[3], c0, c3) + INT_UV(df1->uv[1], c0, c1); + INT_UV(df1->uv[2], c1, c2); + INT_UV(df1->uv[3], c0, c3); - INT_UV(df2->uv[0], c0, c1) + INT_UV(df2->uv[0], c0, c1); copy_v2_v2(df2->uv[1], mf->uv[c1]); - INT_UV(df2->uv[2], c1, c2) + INT_UV(df2->uv[2], c1, c2); - INT_UV(df3->uv[0], c0, c3) - INT_UV(df3->uv[1], c1, c2) + INT_UV(df3->uv[0], c0, c3); + INT_UV(df3->uv[1], c1, c2); copy_v2_v2(df3->uv[2], mf->uv[c2]); copy_v2_v2(df3->uv[3], mf->uv[c3]); } @@ -450,16 +450,16 @@ static void remap_faces_19_21_22(DerivedMesh *dm, DerivedMesh *split, MFace *mf, facepa[cur] = vertpa[v1]; df1->v1 = v1; - df1->v2 = GET_ES(v1, v2) - df1->v3 = GET_ES(v1, v3) + df1->v2 = GET_ES(v1, v2); + df1->v3 = GET_ES(v1, v3); df1->v4 = 0; df1->flag &= ~ME_FACE_SEL; facepa[cur+1] = vertpa[v2]; - df2->v1 = GET_ES(v1, v2) + df2->v1 = GET_ES(v1, v2); df2->v2 = v2; df2->v3 = v3; - df2->v4 = GET_ES(v1, v3) + df2->v4 = GET_ES(v1, v3); df2->flag |= ME_FACE_SEL; } @@ -476,13 +476,13 @@ static void remap_uvs_19_21_22(DerivedMesh *dm, DerivedMesh *split, int numlayer mf += i; copy_v2_v2(df1->uv[0], mf->uv[c0]); - INT_UV(df1->uv[1], c0, c1) - INT_UV(df1->uv[2], c0, c2) + INT_UV(df1->uv[1], c0, c1); + INT_UV(df1->uv[2], c0, c2); - INT_UV(df2->uv[0], c0, c1) + INT_UV(df2->uv[0], c0, c1); copy_v2_v2(df2->uv[1], mf->uv[c1]); copy_v2_v2(df2->uv[2], mf->uv[c2]); - INT_UV(df2->uv[3], c0, c2) + INT_UV(df2->uv[3], c0, c2); } } @@ -494,21 +494,21 @@ static void remap_faces_23(DerivedMesh *dm, DerivedMesh *split, MFace *mf, int * facepa[cur] = vertpa[v1]; df1->v1 = v1; - df1->v2 = GET_ES(v1, v2) - df1->v3 = GET_ES(v2, v3) - df1->v4 = GET_ES(v1, v3) + df1->v2 = GET_ES(v1, v2); + df1->v3 = GET_ES(v2, v3); + df1->v4 = GET_ES(v1, v3); df1->flag |= ME_FACE_SEL; facepa[cur+1] = vertpa[v2]; - df2->v1 = GET_ES(v1, v2) + df2->v1 = GET_ES(v1, v2); df2->v2 = v2; - df2->v3 = GET_ES(v2, v3) + df2->v3 = GET_ES(v2, v3); df2->v4 = 0; df2->flag &= ~ME_FACE_SEL; facepa[cur+2] = vertpa[v3]; - df3->v1 = GET_ES(v1, v3) - df3->v2 = GET_ES(v2, v3) + df3->v1 = GET_ES(v1, v3); + df3->v2 = GET_ES(v2, v3); df3->v3 = v3; df3->v4 = 0; df3->flag &= ~ME_FACE_SEL; @@ -527,16 +527,16 @@ static void remap_uvs_23(DerivedMesh *dm, DerivedMesh *split, int numlayer, int mf += i; copy_v2_v2(df1->uv[0], mf->uv[c0]); - INT_UV(df1->uv[1], c0, c1) - INT_UV(df1->uv[2], c1, c2) - INT_UV(df1->uv[3], c0, c2) + INT_UV(df1->uv[1], c0, c1); + INT_UV(df1->uv[2], c1, c2); + INT_UV(df1->uv[3], c0, c2); - INT_UV(df2->uv[0], c0, c1) + INT_UV(df2->uv[0], c0, c1); copy_v2_v2(df2->uv[1], mf->uv[c1]); - INT_UV(df2->uv[2], c1, c2) + INT_UV(df2->uv[2], c1, c2); - INT_UV(df2->uv[0], c0, c2) - INT_UV(df2->uv[1], c1, c2) + INT_UV(df2->uv[0], c0, c2); + INT_UV(df2->uv[1], c1, c2); copy_v2_v2(df2->uv[2], mf->uv[c2]); } } diff --git a/source/blender/nodes/intern/node_socket.c b/source/blender/nodes/intern/node_socket.c index 4e6cf1f9bdd..94b9d364418 100644 --- a/source/blender/nodes/intern/node_socket.c +++ b/source/blender/nodes/intern/node_socket.c @@ -160,7 +160,7 @@ static bNodeSocketType node_socket_type_mesh = { void node_socket_type_init(bNodeSocketType *types[]) { - #define INIT_TYPE(name) types[node_socket_type_##name.type] = &node_socket_type_##name; + #define INIT_TYPE(name) types[node_socket_type_##name.type] = &node_socket_type_##name INIT_TYPE(float); INIT_TYPE(vector); diff --git a/source/blender/python/generic/bgl.h b/source/blender/python/generic/bgl.h index daebd7a5194..1a7036daf45 100644 --- a/source/blender/python/generic/bgl.h +++ b/source/blender/python/generic/bgl.h @@ -327,7 +327,7 @@ extern PyTypeObject BGL_bufferType; #define ret_set_GLboolean ret_bool = #define ret_ret_GLboolean return PyLong_FromLong((long) ret_bool) -#define ret_def_GLstring const unsigned char *ret_str; +#define ret_def_GLstring const unsigned char *ret_str #define ret_set_GLstring ret_str = #define ret_ret_GLstring \