diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2007-01-31 02:07:57 +0300 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2007-01-31 02:07:57 +0300 |
commit | 9ce5dd4cc4361382f30def0dede7e3397b4e7dd4 (patch) | |
tree | cae7de492563546145ff1045ff044b2f6ed33391 /source/blender/src/editface.c | |
parent | 3ab085a5b6bafe4e6a43c594f4c6dda9d9be17d7 (diff) |
== Multires ==
Fixed bug #5815, Multires mesh UVs get lost (or crashes!) when adding additional UV layers
* Switching to Face Select mode adds a UV layer automatically, was missing code there to add the layer to multires as well
* Adding/Deleting a customdata layer on a multires mesh should update the multires data first
Diffstat (limited to 'source/blender/src/editface.c')
-rw-r--r-- | source/blender/src/editface.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/source/blender/src/editface.c b/source/blender/src/editface.c index f3c4c258848..9024b10691f 100644 --- a/source/blender/src/editface.c +++ b/source/blender/src/editface.c @@ -90,6 +90,7 @@ #include "mydevice.h" #include "blendef.h" #include "butspace.h" +#include "multires.h" #include "BSE_trans_types.h" @@ -610,9 +611,16 @@ void default_uv(float uv[][2], float size) void make_tfaces(Mesh *me) { - if(!me->mtface) - me->mtface= CustomData_add_layer(&me->fdata, CD_MTFACE, CD_DEFAULT, - NULL, me->totface); + if(!me->mtface) { + if(me->mr) { + multires_add_layer(me, &me->mr->fdata, CD_MTFACE, + CustomData_number_of_layers(&me->fdata, CD_MTFACE)); + } + else { + me->mtface= CustomData_add_layer(&me->fdata, CD_MTFACE, CD_DEFAULT, + NULL, me->totface); + } + } } void reveal_tface() |