forked from bartvdbraak/blender
Copy vcols wasnt working me->mcol[a] needs to be me->mcol[a*4]
This commit is contained in:
parent
cbd84b26f4
commit
2d87c36efa
@ -4252,7 +4252,7 @@ void do_fpaintbuts(unsigned short event)
|
||||
else tf->mode &= ~TF_TILES;
|
||||
}
|
||||
else if(event==B_COPY_TF_COL && activemcol)
|
||||
memcpy(&me->mcol[a], activemcol, sizeof(MCol)*4);
|
||||
memcpy(&me->mcol[a*4], activemcol, sizeof(MCol)*4);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -584,21 +584,21 @@ MTFace *get_active_tface(MCol **mcol)
|
||||
|
||||
for(a=0, tf=me->mtface; a < me->totface; a++, tf++) {
|
||||
if(tf->flag & TF_ACTIVE) {
|
||||
if(mcol) *mcol = (me->mcol)? &me->mcol[a]: NULL;
|
||||
if(mcol) *mcol = (me->mcol)? &me->mcol[a*4]: NULL;
|
||||
return tf;
|
||||
}
|
||||
}
|
||||
|
||||
for(a=0, tf=me->mtface; a < me->totface; a++, tf++) {
|
||||
if(tf->flag & TF_SELECT) {
|
||||
if(mcol) *mcol = (me->mcol)? &me->mcol[a]: NULL;
|
||||
if(mcol) *mcol = (me->mcol)? &me->mcol[a*4]: NULL;
|
||||
return tf;
|
||||
}
|
||||
}
|
||||
|
||||
for(a=0, tf=me->mtface; a < me->totface; a++, tf++) {
|
||||
if((tf->flag & TF_HIDE)==0) {
|
||||
if(mcol) *mcol = (me->mcol)? &me->mcol[a]: NULL;
|
||||
if(mcol) *mcol = (me->mcol)? &me->mcol[a*4]: NULL;
|
||||
return tf;
|
||||
}
|
||||
}
|
||||
|
@ -3270,13 +3270,13 @@ void copy_attr_tface(short event)
|
||||
case 1:
|
||||
tface->tpage = activetf->tpage;
|
||||
tface->tile= activetf->tile;
|
||||
tface->mode = activetf->mode & TF_TEX;
|
||||
tface->mode |= TF_TEX;
|
||||
break;
|
||||
case 2:
|
||||
memcpy(tface->uv, activetf->uv, sizeof(tface->uv)); break;
|
||||
case 3:
|
||||
if(activemcol)
|
||||
memcpy(&me->mcol[a], activemcol, sizeof(MCol)*3); break;
|
||||
memcpy(&me->mcol[a*4], activemcol, sizeof(MCol)*4); break;
|
||||
case 4:
|
||||
tface->mode = activetf->mode; break;
|
||||
case 5:
|
||||
|
@ -4220,7 +4220,7 @@ static void do_view3d_faceselmenu(void *arg, int event)
|
||||
|
||||
}
|
||||
else if(event==2 && activemcol)
|
||||
memcpy(&me->mcol[a], activemcol, sizeof(MCol)*4);
|
||||
memcpy(&me->mcol[a*4], activemcol, sizeof(MCol)*4);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user