Merge branch 'master' into doc/expand_description_about_embedded_textures
commit
1025b15045
|
@ -222,6 +222,7 @@ void ColladaParser::ReadStructure()
|
||||||
}
|
}
|
||||||
|
|
||||||
PostProcessRootAnimations();
|
PostProcessRootAnimations();
|
||||||
|
PostProcessControllers();
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
@ -360,6 +361,21 @@ void ColladaParser::ReadAnimationClipLibrary()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ColladaParser::PostProcessControllers()
|
||||||
|
{
|
||||||
|
for (ControllerLibrary::iterator it = mControllerLibrary.begin(); it != mControllerLibrary.end(); ++it)
|
||||||
|
{
|
||||||
|
std::string meshId = it->second.mMeshId;
|
||||||
|
ControllerLibrary::iterator findItr = mControllerLibrary.find(meshId);
|
||||||
|
while(findItr != mControllerLibrary.end()) {
|
||||||
|
meshId = findItr->second.mMeshId;
|
||||||
|
findItr = mControllerLibrary.find(meshId);
|
||||||
|
}
|
||||||
|
|
||||||
|
it->second.mMeshId = meshId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
// Re-build animations from animation clip library, if present, otherwise combine single-channel animations
|
// Re-build animations from animation clip library, if present, otherwise combine single-channel animations
|
||||||
void ColladaParser::PostProcessRootAnimations()
|
void ColladaParser::PostProcessRootAnimations()
|
||||||
|
|
|
@ -87,6 +87,9 @@ namespace Assimp
|
||||||
/** Reads the animation clip library */
|
/** Reads the animation clip library */
|
||||||
void ReadAnimationClipLibrary();
|
void ReadAnimationClipLibrary();
|
||||||
|
|
||||||
|
/** Unwrap controllers dependency hierarchy */
|
||||||
|
void PostProcessControllers();
|
||||||
|
|
||||||
/** Re-build animations from animation clip library, if present, otherwise combine single-channel animations */
|
/** Re-build animations from animation clip library, if present, otherwise combine single-channel animations */
|
||||||
void PostProcessRootAnimations();
|
void PostProcessRootAnimations();
|
||||||
|
|
||||||
|
|
|
@ -148,6 +148,17 @@ PlyExporter::PlyExporter(const char* _filename, const aiScene* pScene, bool bina
|
||||||
<< aiGetVersionMajor() << '.' << aiGetVersionMinor() << '.'
|
<< aiGetVersionMajor() << '.' << aiGetVersionMinor() << '.'
|
||||||
<< aiGetVersionRevision() << ")" << endl;
|
<< aiGetVersionRevision() << ")" << endl;
|
||||||
|
|
||||||
|
// Look through materials for a diffuse texture, and add it if found
|
||||||
|
for ( unsigned int i = 0; i < pScene->mNumMaterials; ++i )
|
||||||
|
{
|
||||||
|
const aiMaterial* const mat = pScene->mMaterials[i];
|
||||||
|
aiString s;
|
||||||
|
if ( AI_SUCCESS == mat->Get( AI_MATKEY_TEXTURE_DIFFUSE( 0 ), s ) )
|
||||||
|
{
|
||||||
|
mOutput << "comment TextureFile " << s.data << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: probably want to check here rather than just assume something
|
// TODO: probably want to check here rather than just assume something
|
||||||
// definitely not good to always write float even if we might have double precision
|
// definitely not good to always write float even if we might have double precision
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue