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:
@@ -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); \
|
||||
\
|
||||
|
||||
Reference in New Issue
Block a user