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.
This commit is contained in:
Sergey Sharybin
2012-04-05 13:01:41 +00:00
parent ea1539ce43
commit aaafb7c0cd

View File

@@ -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); \
\