diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2006-11-20 07:28:02 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2006-11-20 07:28:02 +0300 |
commit | e435fbc3c5a00e5b63c1cd2609ab6828187660d3 (patch) | |
tree | 3f1da9c51451dee55a203cd001d37f8774d2582f /source/blender/src/unwrapper.c | |
parent | 0a7c43c6e5fc7d5d75a4645eca1164cede2d03a6 (diff) |
Added custom vertex/edge/face data for meshes:
All data layers, including MVert/MEdge/MFace, are now managed as custom
data layers. The pointers like Mesh.mvert, Mesh.dvert or Mesh.mcol are
still used of course, but allocating, copying or freeing these arrays
should be done through the CustomData API.
Work in progress documentation on this is here:
http://mediawiki.blender.org/index.php/BlenderDev/BlenderArchitecture/CustomData
Replaced TFace by MTFace:
This is the same struct, except that it does not contain color, that now
always stays separated in MCol. This was not a good design decision to
begin with, and it is needed for adding multiple color layers later. Note
that this does mean older Blender versions will not be able to read UV
coordinates from the next release, due to an SDNA limitation.
Removed DispListMesh:
This now fully replaced by DerivedMesh. To provide access to arrays of
vertices, edges and faces, like DispListMesh does. The semantics of the
DerivedMesh.getVertArray() and similar functions were changed to return
a pointer to an array if one exists, or otherwise allocate a temporary
one. On releasing the DerivedMesh, this temporary array will be removed
automatically.
Removed ssDM and meshDM DerivedMesh backends:
The ssDM backend was for DispListMesh, so that became obsolete automatically.
The meshDM backend was replaced by the custom data backend, that now figures
out which layers need to be modified, and only duplicates those.
This changes code in many places, and overall removes 2514 lines of code.
So, there's a good chance this might break some stuff, although I've been
testing it for a few days now. The good news is, adding multiple color and
uv layers should now become easy.
Diffstat (limited to 'source/blender/src/unwrapper.c')
-rw-r--r-- | source/blender/src/unwrapper.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/src/unwrapper.c b/source/blender/src/unwrapper.c index 851486de323..b0716b81b91 100644 --- a/source/blender/src/unwrapper.c +++ b/source/blender/src/unwrapper.c @@ -82,7 +82,7 @@ static void hash_add_face(EdgeHash *ehash, MFace *mf) void select_linked_tfaces_with_seams(int mode, Mesh *me, unsigned int index) { - TFace *tf; + MTFace *tf; MFace *mf; int a, doit=1, mark=0; char *linkflag; @@ -105,7 +105,7 @@ void select_linked_tfaces_with_seams(int mode, Mesh *me, unsigned int index) } else { /* fill array by selection */ - tf= me->tface; + tf= me->mtface; mf= me->mface; for(a=0; a<me->totface; a++, tf++, mf++) { if(tf->flag & TF_HIDE); @@ -120,7 +120,7 @@ void select_linked_tfaces_with_seams(int mode, Mesh *me, unsigned int index) doit= 0; /* expand selection */ - tf= me->tface; + tf= me->mtface; mf= me->mface; for(a=0; a<me->totface; a++, tf++, mf++) { if(tf->flag & TF_HIDE) @@ -161,24 +161,24 @@ void select_linked_tfaces_with_seams(int mode, Mesh *me, unsigned int index) BLI_edgehash_free(seamhash, NULL); if(mode==0 || mode==2) { - for(a=0, tf=me->tface; a<me->totface; a++, tf++) + for(a=0, tf=me->mtface; a<me->totface; a++, tf++) if(linkflag[a]) tf->flag |= TF_SELECT; else tf->flag &= ~TF_SELECT; } else if(mode==1) { - for(a=0, tf=me->tface; a<me->totface; a++, tf++) + for(a=0, tf=me->mtface; a<me->totface; a++, tf++) if(linkflag[a] && (tf->flag & TF_SELECT)) break; if (a<me->totface) { - for(a=0, tf=me->tface; a<me->totface; a++, tf++) + for(a=0, tf=me->mtface; a<me->totface; a++, tf++) if(linkflag[a]) tf->flag &= ~TF_SELECT; } else { - for(a=0, tf=me->tface; a<me->totface; a++, tf++) + for(a=0, tf=me->mtface; a<me->totface; a++, tf++) if(linkflag[a]) tf->flag |= TF_SELECT; } @@ -195,7 +195,7 @@ void select_linked_tfaces_with_seams(int mode, Mesh *me, unsigned int index) ParamHandle *construct_param_handle(Mesh *me, short implicit, short fill, short sel) { int a; - TFace *tf; + MTFace *tf; MFace *mf; MVert *mv; MEdge *medge; @@ -205,7 +205,7 @@ ParamHandle *construct_param_handle(Mesh *me, short implicit, short fill, short mv= me->mvert; mf= me->mface; - tf= me->tface; + tf= me->mtface; for (a=0; a<me->totface; a++, mf++, tf++) { ParamKey key, vkeys[4]; ParamBool pin[4], select[4]; @@ -282,7 +282,7 @@ void unwrap_lscm(short seamcut) short fillholes = G.scene->toolsettings->uvcalc_flag & 1; me= get_mesh(OBACT); - if(me==0 || me->tface==0) return; + if(me==0 || me->mtface==0) return; handle = construct_param_handle(me, 0, fillholes, seamcut == 0); @@ -315,7 +315,7 @@ void minimize_stretch_tface_uv(void) short fillholes = G.scene->toolsettings->uvcalc_flag & 1; me = get_mesh(OBACT); - if(me==0 || me->tface==0) return; + if(me==0 || me->mtface==0) return; handle = construct_param_handle(me, 1, fillholes, 1); @@ -409,7 +409,7 @@ void unwrap_lscm_live_begin(void) short fillholes = G.scene->toolsettings->uvcalc_flag & 1; me= get_mesh(OBACT); - if(me==0 || me->tface==0) return; + if(me==0 || me->mtface==0) return; liveHandle = construct_param_handle(me, 0, fillholes, 1); |