Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/customdata.c
| Show First 20 Lines • Show All 2,995 Lines • ▼ Show 20 Lines | void CustomData_copy_elements(int type, void *src_data_ofs, void *dst_data_ofs, int count) | ||||
| if (typeInfo->copy) { | if (typeInfo->copy) { | ||||
| typeInfo->copy(src_data_ofs, dst_data_ofs, count); | typeInfo->copy(src_data_ofs, dst_data_ofs, count); | ||||
| } | } | ||||
| else { | else { | ||||
| memcpy(dst_data_ofs, src_data_ofs, (size_t)count * typeInfo->size); | memcpy(dst_data_ofs, src_data_ofs, (size_t)count * typeInfo->size); | ||||
| } | } | ||||
| } | } | ||||
| static void CustomData_copy_data_layer(const CustomData *source, | void CustomData_copy_data_layer(const CustomData *source, | ||||
| CustomData *dest, | CustomData *dest, | ||||
| int src_i, | int src_i, | ||||
| int dst_i, | int dst_i, | ||||
| int src_index, | int src_index, | ||||
| int dst_index, | int dst_index, | ||||
| int count) | int count) | ||||
| { | { | ||||
| const LayerTypeInfo *typeInfo; | const LayerTypeInfo *typeInfo; | ||||
| const void *src_data = source->layers[src_i].data; | const void *src_data = source->layers[src_i].data; | ||||
| void *dst_data = dest->layers[dst_i].data; | void *dst_data = dest->layers[dst_i].data; | ||||
| typeInfo = layerType_getInfo(source->layers[src_i].type); | typeInfo = layerType_getInfo(source->layers[src_i].type); | ||||
| ▲ Show 20 Lines • Show All 2,321 Lines • Show Last 20 Lines | |||||