- improve symmetry between Assimp::Importer and Assimp::Exporter.

+ aiCopyScene -- a bit dysfunctional because we will also need getters and setters for all other scene components to avoid running into ownership & heap issues when users modify scenes.
# fix handling of postprocessing during exporting

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1061 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
aramis_acg
2011-08-04 08:53:59 +00:00
parent 665f73861e
commit 36b3695a31
8 changed files with 185 additions and 85 deletions

View File

@@ -917,11 +917,15 @@ void SceneCombiner::CopySceneFlat(aiScene** _dest,const aiScene* src)
}
// ------------------------------------------------------------------------------------------------
void SceneCombiner::CopyScene(aiScene** _dest,const aiScene* src)
void SceneCombiner::CopyScene(aiScene** _dest,const aiScene* src,bool allocate)
{
ai_assert(NULL != _dest && NULL != src);
aiScene* dest = *_dest = new aiScene();
if (allocate) {
*_dest = new aiScene();
}
aiScene* dest = *_dest;
ai_assert(dest);
// copy animations
dest->mNumAnimations = src->mNumAnimations;
@@ -958,6 +962,9 @@ void SceneCombiner::CopyScene(aiScene** _dest,const aiScene* src)
// and keep the flags ...
dest->mFlags = src->mFlags;
// source private data might be NULL if the scene is user-allocated (i.e. for use with the export API)
ScenePriv(dest)->mPPStepsApplied = ScenePriv(src) ? ScenePriv(src)->mPPStepsApplied : NULL;
}
// ------------------------------------------------------------------------------------------------