diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-03-08 00:56:25 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-03-08 00:56:25 +0400 |
commit | 333433d15e049971792f56580044893aa74837ce (patch) | |
tree | dc3ccd2f6f493959d59b46ca75525babb5dbef35 /source/blender/makesrna/intern/rna_object.c | |
parent | 5ebe91ca1f75526f95324f0bc16f38fec5b632f2 (diff) |
Fix for setting uv_layer name for modifiers
Issue was caused by missing fdata for meshes which doesn't have tessellated
faces yet. Real fix would be to use loop's MLOOPUV layer, but currently interface
is using mtex layer names for UV lists so use poly's mtex layer to check if
layer name is indeed correct.
Should work fine until we'll separate setting textures and UV coordinates.
Diffstat (limited to 'source/blender/makesrna/intern/rna_object.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_object.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index a1e288f6107..088d4870143 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -558,10 +558,10 @@ void rna_object_uvlayer_name_set(PointerRNA *ptr, const char *value, char *resul if (ob->type == OB_MESH && ob->data) { me = (Mesh*)ob->data; - for (a = 0; a<me->fdata.totlayer; a++) { - layer = &me->fdata.layers[a]; + for (a = 0; a<me->pdata.totlayer; a++) { + layer = &me->pdata.layers[a]; - if (layer->type == CD_MTFACE && strcmp(layer->name, value) == 0) { + if (layer->type == CD_MTEXPOLY && strcmp(layer->name, value) == 0) { BLI_strncpy(result, value, maxlen); return; } |