From 5fd2a5559cda5b8d821e25d0bfeb68aba83a3007 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Wed, 10 Nov 2021 09:19:29 +0100 Subject: [PATCH] Update mesh.h - Add initialization for armature attributes. - closes https://github.com/assimp/assimp/issues/4158 --- include/assimp/mesh.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/assimp/mesh.h b/include/assimp/mesh.h index 8223b3443..225f8556a 100644 --- a/include/assimp/mesh.h +++ b/include/assimp/mesh.h @@ -300,6 +300,10 @@ struct aiBone { aiBone() AI_NO_EXCEPT : mName(), mNumWeights(0), +#ifndef ASSIMP_BUILD_NO_ARMATUREPOPULATE_PROCESS + mArmature(nullptr), + mNode(nullptr), +#endif mWeights(nullptr), mOffsetMatrix() { // empty @@ -309,6 +313,10 @@ struct aiBone { aiBone(const aiBone &other) : mName(other.mName), mNumWeights(other.mNumWeights), +#ifndef ASSIMP_BUILD_NO_ARMATUREPOPULATE_PROCESS + mArmature(nullptr), + mNode(nullptr), +#endif mWeights(nullptr), mOffsetMatrix(other.mOffsetMatrix) { if (other.mWeights && other.mNumWeights) {