closes https://github.com/assimp/assimp/issues/1390: aiScene now stores metadata as well.
parent
b43923a759
commit
8ac1de3287
|
@ -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 );
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue