Fix Build Without ArmaturePopulate Post Process Step
This post process step introduced new attributes into `aiSkeletonBone`. Said attributes are only defined with the process enabled, i.e. when the `ASSIMP_BUILD_NO_ARMATUREPOPULATE_PROCESS` macro has not been defined. Some code, however, accessed the variables unconditionally, leading to build failures if `ASSIMP_BUILD_NO_ARMATUREPOPULATE_PROCESS` was defined. This commit adds the missing checks.pull/4880/head
parent
70edec0efb
commit
793284a766
|
@ -1455,7 +1455,9 @@ static void copyBoneToSkeletonBone(aiMesh *mesh, aiBone *bone, aiSkeletonBone *s
|
||||||
skeletonBone->mWeights = bone->mWeights;
|
skeletonBone->mWeights = bone->mWeights;
|
||||||
skeletonBone->mOffsetMatrix = bone->mOffsetMatrix;
|
skeletonBone->mOffsetMatrix = bone->mOffsetMatrix;
|
||||||
skeletonBone->mMeshId = mesh;
|
skeletonBone->mMeshId = mesh;
|
||||||
|
#ifndef ASSIMP_BUILD_NO_ARMATUREPOPULATE_PROCESS
|
||||||
skeletonBone->mNode = bone->mNode;
|
skeletonBone->mNode = bone->mNode;
|
||||||
|
#endif
|
||||||
skeletonBone->mParent = -1;
|
skeletonBone->mParent = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -988,8 +988,10 @@ struct aiSkeletonBone {
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
aiSkeletonBone() :
|
aiSkeletonBone() :
|
||||||
mParent(-1),
|
mParent(-1),
|
||||||
|
#ifndef ASSIMP_BUILD_NO_ARMATUREPOPULATE_PROCESS
|
||||||
mArmature(nullptr),
|
mArmature(nullptr),
|
||||||
mNode(nullptr),
|
mNode(nullptr),
|
||||||
|
#endif
|
||||||
mNumnWeights(0),
|
mNumnWeights(0),
|
||||||
mMeshId(nullptr),
|
mMeshId(nullptr),
|
||||||
mWeights(nullptr),
|
mWeights(nullptr),
|
||||||
|
|
Loading…
Reference in New Issue