// FILE HEADER\r
#include <dali-scene-loader/public-api/facial-animation-loader.h>\r
\r
+// EXTERNAL INCLUDES\r
+#include <sstream>\r
+\r
// INTERNAL INCLUDES\r
#include <dali-scene-loader/internal/json-reader.h>\r
#include <dali-scene-loader/public-api/blend-shape-details.h>\r
}\r
\r
// Set the property names\r
- char weightNameBuffer[32];\r
- char* const pWeightName = weightNameBuffer + sprintf(weightNameBuffer, "%s", BlendShapes::WEIGHTS_UNIFORM.c_str());\r
- uint32_t targets = 0u;\r
+ uint32_t targets = 0u;\r
for(const auto& blendShape : facialAnimation.mBlendShapes)\r
{\r
for(uint32_t morphTargetIndex = 0u; morphTargetIndex < blendShape.mNumberOfMorphTarget; ++morphTargetIndex)\r
\r
animatedProperty.mNodeName = blendShape.mNodeName;\r
\r
- snprintf(pWeightName, sizeof(weightNameBuffer) - (pWeightName - weightNameBuffer), "[%d]", morphTargetIndex);\r
- animatedProperty.mPropertyName = weightNameBuffer;\r
+ std::stringstream weightPropertyStream;\r
+ weightPropertyStream << BlendShapes::WEIGHTS_UNIFORM << "[" << morphTargetIndex << "]";\r
+ animatedProperty.mPropertyName = weightPropertyStream.str();\r
}\r
targets += blendShape.mNumberOfMorphTarget;\r
}\r