Fix for bug #5523:
A crash on rendering with multiple UV layers, layer names weren't always getting copied correct.
This commit is contained in:
parent
ad1cc8a8fc
commit
d24597c8a3
|
@ -87,7 +87,7 @@ typedef struct CustomData {
|
|||
#define CD_FLAG_TEMPORARY ((1<<2)|CD_FLAG_NOCOPY)
|
||||
|
||||
/* Limits */
|
||||
#define MAX_MTFACE 4
|
||||
#define MAX_MCOL 4
|
||||
#define MAX_MTFACE 8
|
||||
#define MAX_MCOL 8
|
||||
|
||||
#endif
|
||||
|
|
|
@ -128,8 +128,8 @@ typedef struct ShadeInput
|
|||
float refcol[4], displace[3];
|
||||
float strand, tang[3], stress, winspeed[4];
|
||||
|
||||
ShadeInputUV uv[4]; /* 4 = MAX_MTFACE */
|
||||
ShadeInputCol col[4]; /* 4 = MAX_MCOL */
|
||||
ShadeInputUV uv[8]; /* 8 = MAX_MTFACE */
|
||||
ShadeInputCol col[8]; /* 8 = MAX_MCOL */
|
||||
int totuv, totcol;
|
||||
|
||||
/* dx/dy OSA coordinates */
|
||||
|
|
|
@ -372,6 +372,8 @@ VlakRen *RE_vlakren_copy(Render *re, VlakRen *vlr)
|
|||
VlakRen *vlr1 = RE_findOrAddVlak(re, re->totvlak++);
|
||||
MTFace *mtface, *mtface1;
|
||||
MCol *mcol, *mcol1;
|
||||
VlakTableNode *node = &re->vlaknodes[vlr->index>>8];
|
||||
VlakTableNode *node1 = &re->vlaknodes[vlr1->index>>8];
|
||||
int i, index = vlr1->index;
|
||||
char *name;
|
||||
|
||||
|
@ -388,6 +390,9 @@ VlakRen *RE_vlakren_copy(Render *re, VlakRen *vlr)
|
|||
memcpy(mcol1, mcol, sizeof(MCol)*RE_MCOL_ELEMS);
|
||||
}
|
||||
|
||||
if (node->names && node1->names)
|
||||
node1->names[vlr1->index&255] = node->names[vlr->index&255];
|
||||
|
||||
return vlr1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue