MCPcopy Create free account
hub / github.com/blender/cycles / convertFromCyclesArray

Function convertFromCyclesArray

src/hydra/node_util.cpp:363–372  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

361
362template<typename SrcType, typename DstType = SrcType>
363VtValue 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
374template<> VtValue convertFromCyclesArray<float2, GfVec2f>(const array<float2> &value)
375{

Callers 1

GetNodeValueFunction · 0.85

Calls 3

resizeMethod · 0.45
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected