You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
Updated assimp to 308db73 from https://github.com/assimp/assimp/
This commit is contained in:
21
thirdparty/assimp/code/Common/SceneCombiner.cpp
vendored
21
thirdparty/assimp/code/Common/SceneCombiner.cpp
vendored
@@ -1196,6 +1196,7 @@ void SceneCombiner::Copy( aiAnimation** _dest, const aiAnimation* src ) {
|
||||
|
||||
// and reallocate all arrays
|
||||
CopyPtrArray( dest->mChannels, src->mChannels, dest->mNumChannels );
|
||||
CopyPtrArray( dest->mMorphMeshChannels, src->mMorphMeshChannels, dest->mNumMorphMeshChannels );
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
@@ -1215,6 +1216,26 @@ void SceneCombiner::Copy(aiNodeAnim** _dest, const aiNodeAnim* src) {
|
||||
GetArrayCopy( dest->mRotationKeys, dest->mNumRotationKeys );
|
||||
}
|
||||
|
||||
void SceneCombiner::Copy(aiMeshMorphAnim** _dest, const aiMeshMorphAnim* src) {
|
||||
if ( nullptr == _dest || nullptr == src ) {
|
||||
return;
|
||||
}
|
||||
|
||||
aiMeshMorphAnim* dest = *_dest = new aiMeshMorphAnim();
|
||||
|
||||
// get a flat copy
|
||||
::memcpy(dest,src,sizeof(aiMeshMorphAnim));
|
||||
|
||||
// and reallocate all arrays
|
||||
GetArrayCopy( dest->mKeys, dest->mNumKeys );
|
||||
for (ai_uint i = 0; i < dest->mNumKeys;++i) {
|
||||
dest->mKeys[i].mValues = new unsigned int[dest->mKeys[i].mNumValuesAndWeights];
|
||||
dest->mKeys[i].mWeights = new double[dest->mKeys[i].mNumValuesAndWeights];
|
||||
::memcpy(dest->mKeys[i].mValues, src->mKeys[i].mValues, dest->mKeys[i].mNumValuesAndWeights * sizeof(unsigned int));
|
||||
::memcpy(dest->mKeys[i].mWeights, src->mKeys[i].mWeights, dest->mKeys[i].mNumValuesAndWeights * sizeof(double));
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void SceneCombiner::Copy( aiCamera** _dest,const aiCamera* src) {
|
||||
if ( nullptr == _dest || nullptr == src ) {
|
||||
|
||||
Reference in New Issue
Block a user