Update LWSLoader.cpp

pull/5142/head
Kim Kulling 2023-06-16 10:16:37 +02:00 committed by GitHub
parent 484aec2968
commit 7bc4a6671c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -863,10 +863,13 @@ void LWSImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSy
master->mCameras = new aiCamera *[master->mNumCameras = num_camera];
}
aiCamera **cams = master->mCameras;
master->mCameras = nullptr;
if (num_light) {
master->mLights = new aiLight *[master->mNumLights = num_light];
}
aiLight **lights = master->mLights;
master->mLights = nullptr;
std::vector<AttachmentInfo> attach;
std::vector<aiNodeAnim *> anims;
@ -888,6 +891,7 @@ void LWSImporter::InternReadFile(const std::string &pFile, aiScene *pScene, IOSy
if (anims.size()) {
master->mAnimations = new aiAnimation *[master->mNumAnimations = 1];
aiAnimation *anim = master->mAnimations[0] = new aiAnimation();
master->mAnimations[0] = nullptr;
anim->mName.Set("LWSMasterAnim");
// LWS uses seconds as time units, but we convert to frames