Multiple UV and vertex color layers: (still work in progress)

These can be created and deleted in the Mesh panel in the same place as
before. There is always one active UV and vertex color layer, that is
edited and displayed.

Important things to do:
- Render engine, material support
- Multires and NMesh now lose non active layers

Also CustomData changes to support muliple layers of the same type, and
changes to layer allocation, updated documentation is here:
http://mediawiki.blender.org/index.php/BlenderDev/BlenderArchitecture/CustomData
This commit is contained in:
2006-12-12 21:29:09 +00:00
parent 47adee414c
commit 80ee52e444
29 changed files with 775 additions and 662 deletions

View File

@@ -74,6 +74,7 @@
#include "BIF_interface.h"
#include "BIF_mywindow.h"
#include "BIF_toolbox.h"
#include "BIF_resources.h"
#include "BIF_screen.h"
#include "BIF_gl.h"
#include "BIF_graphics.h"
@@ -607,33 +608,13 @@ void default_uv(float uv[][2], float size)
uv[3][1]= size+dy;
}
void default_tface(MTFace *tface)
{
default_uv(tface->uv, 1.0);
tface->mode= TF_TEX;
tface->mode= 0;
tface->flag= TF_SELECT;
tface->tpage= 0;
tface->mode |= TF_DYNAMIC;
}
void make_tfaces(Mesh *me)
{
MTFace *tf;
int a;
if(me->mtface)
return;
me->mtface= CustomData_add_layer(&me->fdata, CD_MTFACE, 0, 0, me->totface);
tf= me->mtface;
for (a=0; a<me->totface; a++, tf++)
default_tface(tf);
if(!me->mtface)
me->mtface= CustomData_add_layer(&me->fdata, CD_MTFACE, CD_DEFAULT,
NULL, me->totface);
}
void reveal_tface()
{
Mesh *me;
@@ -1547,7 +1528,7 @@ static int texpaint_projected_verts(Object *ob, MFace *mf, MTFace *tf, MVert *mv
persp(PERSP_VIEW);
/* get the need opengl matrices */
/* get the needed opengl matrices */
glGetIntegerv(GL_VIEWPORT, view);
glGetDoublev(GL_MODELVIEW_MATRIX, model);
glGetDoublev(GL_PROJECTION_MATRIX, proj);