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:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-04-05 17:01:41 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-04-05 17:01:41 +0400
commitaaafb7c0cd055de36f24f53aa04a58ae84203030 (patch)
tree25a10ad847bd2595e1d0b40030c42c6a66bd2a9b /source/blender/makesrna/intern/rna_mesh_utils.h
parentea1539ce430c4d637734601bb18edc98016130bc (diff)
Fix for setting active UV, vertex colors and probably shape keys from python API.
It was an error how index of requested layer was searching: iterating used to start from the beginning of data layers datablock, not from index at which requested layer type actually begins.
Diffstat (limited to 'source/blender/makesrna/intern/rna_mesh_utils.h')
-rw-r--r--source/blender/makesrna/intern/rna_mesh_utils.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_mesh_utils.h b/source/blender/makesrna/intern/rna_mesh_utils.h
index 932a69680af..cfb9f7e8f3d 100644
--- a/source/blender/makesrna/intern/rna_mesh_utils.h
+++ b/source/blender/makesrna/intern/rna_mesh_utils.h
@@ -101,7 +101,7 @@
if (data) { \
CustomDataLayer *layer; \
int layer_index = CustomData_get_layer_index(data, layer_type); \
- for (layer = data->layers, a = 0; layer_index + a < data->totlayer; layer++, a++) { \
+ for (layer = data->layers + layer_index, a = 0; layer_index + a < data->totlayer; layer++, a++) { \
if (value.data == layer) { \
CustomData_set_layer_##active_type(data, layer_type, a); \
\