Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Bishop <nicholasbishop@gmail.com>2007-01-31 02:07:57 +0300
committerNicholas Bishop <nicholasbishop@gmail.com>2007-01-31 02:07:57 +0300
commit9ce5dd4cc4361382f30def0dede7e3397b4e7dd4 (patch)
treecae7de492563546145ff1045ff044b2f6ed33391 /source/blender/src/editface.c
parent3ab085a5b6bafe4e6a43c594f4c6dda9d9be17d7 (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.c14
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()