closes https://github.com/assimp/assimp/issues/1390: aiScene now stores metadata as well.

pull/1731/head
kim kulling 2018-01-23 15:12:57 +01:00
parent b43923a759
commit 8ac1de3287
2 changed files with 21 additions and 7 deletions

View File

@ -118,19 +118,20 @@ ASSIMP_API const char *aiGetBranchName() {
// ------------------------------------------------------------------------------------------------
ASSIMP_API aiScene::aiScene()
: mFlags(0)
, mRootNode(NULL)
, mRootNode(nullptr)
, mNumMeshes(0)
, mMeshes(NULL)
, mMeshes(nullptr)
, mNumMaterials(0)
, mMaterials(NULL)
, mMaterials(nullptr)
, mNumAnimations(0)
, mAnimations(NULL)
, mAnimations(nullptr)
, mNumTextures(0)
, mTextures(NULL)
, mTextures(nullptr)
, mNumLights(0)
, mLights(NULL)
, mLights(nullptr)
, mNumCameras(0)
, mCameras(NULL)
, mCameras(nullptr)
, mMetaData(nullptr)
, mPrivate(new Assimp::ScenePrivateData()) {
// empty
}
@ -173,6 +174,9 @@ ASSIMP_API aiScene::~aiScene() {
delete mCameras[a];
delete [] mCameras;
aiMetadata::Dealloc(mMetaData);
mMetaData = nullptr;
delete static_cast<Assimp::ScenePrivateData*>( mPrivate );
}

View File

@ -326,6 +326,16 @@ struct aiScene
*/
C_STRUCT aiCamera** mCameras;
/**
* @brief The global metadata assigned to the scene itself.
*
* This data contains global metadata which belongs to the scene like
* unit-conversions, versions, vendors or other model-specific data. This
* can be used to store format-specific metadata as well.
*/
C_STRUCT aiMetadata* mMetaData;
#ifdef __cplusplus
//! Default constructor - set everything to 0/NULL