+ if(mColors.IsDefined())
+ {
+ uint32_t propertySize = mColors.mBlob.mElementSizeHint;
+ Property::Type propertyType = (propertySize == sizeof(Vector4)) ? Property::VECTOR4 : ((propertySize == sizeof(Vector3)) ? Property::VECTOR3 : Property::NONE);
+ if(propertyType != Property::NONE)
+ {
+ DALI_ASSERT_ALWAYS(((mColors.mBlob.mLength % propertySize == 0) ||
+ mColors.mBlob.mStride >= propertySize) &&
+ "Colors buffer length not a multiple of element size");
+ const auto bufferSize = mColors.mBlob.GetBufferSize();
+ std::vector<uint8_t> buffer(bufferSize);
+ if(!ReadAccessor(mColors, binFile, buffer.data()))
+ {
+ ExceptionFlinger(ASSERT_LOCATION) << "Failed to read colors from '" << meshPath << "'.";
+ }
+ mColors.mBlob.ApplyMinMax(bufferSize / propertySize, reinterpret_cast<float*>(buffer.data()));
+
+ raw.mAttribs.push_back({"aVertexColor", propertyType, static_cast<uint32_t>(bufferSize / propertySize), std::move(buffer)});
+ }
+ }
+