diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2006-12-13 00:29:09 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2006-12-13 00:29:09 +0300 |
commit | 80ee52e444f05a6fd7a45f2ddfe72720648fbab8 (patch) | |
tree | 577238b0fdb738813ca560f0c5fc08dd6b945956 /source/blender/src/filesel.c | |
parent | 47adee414c7848f6ad898e9029205e804b9d6601 (diff) |
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
Diffstat (limited to 'source/blender/src/filesel.c')
-rw-r--r-- | source/blender/src/filesel.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/source/blender/src/filesel.c b/source/blender/src/filesel.c index 815c9f8ebbd..bcee676ae90 100644 --- a/source/blender/src/filesel.c +++ b/source/blender/src/filesel.c @@ -1759,19 +1759,20 @@ static void replace_image(ID *oldblock, ID *newblock) { } for (me= G.main->mesh.first; me; me= me->id.next) { - MTFace *tfaces= me->mtface; - - if (tfaces) { - int i; - - for (i=0; i<me->totface; i++) { - MTFace *tf= &tfaces[i]; - - if (tf->tpage == oldima) { - /* not change_id_link, tpage's aren't owners :( - * see hack below. - */ - tf->tpage= newima; + int i, a; + MTFace *tface; + + for(i=0; i<me->fdata.totlayer; i++) { + if(me->fdata.layers[i].type == CD_MTFACE) { + tface= (MTFace*)me->fdata.layers[i].data; + + for (a=0; a<me->totface; a++, tface++) { + if (tface->tpage == oldima) { + /* not change_id_link, tpage's aren't owners :( + * see hack below. + */ + tface->tpage= newima; + } } } } |