| 361 | |
| 362 | template<typename SrcType, typename DstType = SrcType> |
| 363 | VtValue convertFromCyclesArray(const array<SrcType> &value) |
| 364 | { |
| 365 | static_assert(sizeof(DstType) == sizeof(SrcType), |
| 366 | "Size mismatch between VtArray and array base type"); |
| 367 | |
| 368 | VtArray<DstType> convertedValue; |
| 369 | convertedValue.resize(value.size()); |
| 370 | std::memcpy(convertedValue.data(), value.data(), value.size() * sizeof(SrcType)); |
| 371 | return VtValue(convertedValue); |
| 372 | } |
| 373 | |
| 374 | template<> VtValue convertFromCyclesArray<float2, GfVec2f>(const array<float2> &value) |
| 375 | { |
no test coverage detected