forked from bartvdbraak/blender
fix for bmesh regression similar to last revision r54920. only effected loading old blend files without edge data.
This commit is contained in:
parent
d17c13d145
commit
1810913f81
@ -887,12 +887,11 @@ static void make_edges_mdata(MVert *UNUSED(allvert), MFace *allface, MLoop *alll
|
|||||||
int old, MEdge **alledge, int *_totedge)
|
int old, MEdge **alledge, int *_totedge)
|
||||||
{
|
{
|
||||||
MPoly *mpoly;
|
MPoly *mpoly;
|
||||||
MLoop *mloop;
|
|
||||||
MFace *mface;
|
MFace *mface;
|
||||||
MEdge *medge;
|
MEdge *medge;
|
||||||
EdgeHash *hash = BLI_edgehash_new();
|
EdgeHash *hash = BLI_edgehash_new();
|
||||||
struct edgesort *edsort, *ed;
|
struct edgesort *edsort, *ed;
|
||||||
int a, b, totedge = 0, final = 0;
|
int a, totedge = 0, final = 0;
|
||||||
|
|
||||||
/* we put all edges in array, sort them, and detect doubles that way */
|
/* we put all edges in array, sort them, and detect doubles that way */
|
||||||
|
|
||||||
@ -973,13 +972,16 @@ static void make_edges_mdata(MVert *UNUSED(allvert), MFace *allface, MLoop *alll
|
|||||||
|
|
||||||
mpoly = allpoly;
|
mpoly = allpoly;
|
||||||
for (a = 0; a < totpoly; a++, mpoly++) {
|
for (a = 0; a < totpoly; a++, mpoly++) {
|
||||||
mloop = allloop + mpoly->loopstart;
|
MLoop *ml, *ml_next;
|
||||||
for (b = 0; b < mpoly->totloop; b++) {
|
int i = mpoly->totloop;
|
||||||
int v1, v2;
|
|
||||||
|
ml_next = allloop + mpoly->loopstart; /* first loop */
|
||||||
v1 = mloop[b].v;
|
ml = &ml_next[i - 1]; /* last loop */
|
||||||
v2 = ME_POLY_LOOP_NEXT(mloop, mpoly, b)->v;
|
|
||||||
mloop[b].e = GET_INT_FROM_POINTER(BLI_edgehash_lookup(hash, v1, v2));
|
while (i-- != 0) {
|
||||||
|
ml->e = GET_INT_FROM_POINTER(BLI_edgehash_lookup(hash, ml->v, ml_next->v));
|
||||||
|
ml = ml_next;
|
||||||
|
ml_next++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -181,12 +181,11 @@ void paintface_reveal(Object *ob)
|
|||||||
|
|
||||||
static void hash_add_face(EdgeHash *ehash, MPoly *mp, MLoop *mloop)
|
static void hash_add_face(EdgeHash *ehash, MPoly *mp, MLoop *mloop)
|
||||||
{
|
{
|
||||||
MLoop *ml;
|
MLoop *ml, *ml_next;
|
||||||
MLoop *ml_next;
|
|
||||||
int i = mp->totloop;
|
int i = mp->totloop;
|
||||||
|
|
||||||
ml_next = mloop;
|
ml_next = mloop; /* first loop */
|
||||||
ml = &mloop[mp->totloop - 1];
|
ml = &ml_next[i - 1]; /* last loop */
|
||||||
|
|
||||||
while (i-- != 0) {
|
while (i-- != 0) {
|
||||||
BLI_edgehash_insert(ehash, ml->v, ml_next->v, NULL);
|
BLI_edgehash_insert(ehash, ml->v, ml_next->v, NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user