Fixed 3DS, ASE, MD3 and Q3D orientation after Schrompf' recent changes to the RH-LH conversion.
WIP version of animation support in the 3DS loader. Still hoping to find out why the pivots aren't handled correctly ... Added first draft of a B3D loader provided by Mark Sibly. Moved DeterminePType-Step to ScenePreprocessor. Small LWO fix. Still texturing problems. git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@231 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
@@ -455,6 +455,7 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile,
|
||||
int textMeaning = 0;
|
||||
int vertexFormat = 0; // 0 = normal; 1 = 2 tcoords, 2 = tangents
|
||||
bool useColors = false;
|
||||
bool needLightMap = false;
|
||||
|
||||
// Parse the XML file
|
||||
while (reader->read())
|
||||
@@ -752,7 +753,12 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile,
|
||||
mat->AddProperty(&curColors[0].a,1,AI_MATKEY_OPACITY);
|
||||
}
|
||||
|
||||
/* TODO: Add lightmapping support here */
|
||||
// store the material flags for later use
|
||||
curMesh->mNumUVComponents[3] = curMatFlags;
|
||||
if ( curMatFlags & AI_IRRMESH_MAT_lightmap )
|
||||
{
|
||||
needLightMap = true;
|
||||
}
|
||||
}}
|
||||
break;
|
||||
|
||||
@@ -783,10 +789,22 @@ void IRRMeshImporter::InternReadFile( const std::string& pFile,
|
||||
if (materials.empty())
|
||||
throw new ImportErrorException("IRRMESH: Unable to read a mesh from this file");
|
||||
|
||||
if(needLightMap)
|
||||
{
|
||||
// Compute light map UV coordinates
|
||||
// ComputeLightMapUVCoordinates(meshes,materials);
|
||||
}
|
||||
|
||||
// now generate the output scene
|
||||
pScene->mNumMeshes = (unsigned int)meshes.size();
|
||||
pScene->mMeshes = new aiMesh*[pScene->mNumMeshes];
|
||||
::memcpy(pScene->mMeshes,&meshes[0],sizeof(void*)*pScene->mNumMeshes);
|
||||
for (unsigned int i = 0; i < pScene->mNumMeshes;++i)
|
||||
{
|
||||
pScene->mMeshes[i] = meshes[i];
|
||||
|
||||
// clean this value ...
|
||||
pScene->mMeshes[i]->mNumUVComponents[3] = 0;
|
||||
}
|
||||
|
||||
pScene->mNumMaterials = (unsigned int)materials.size();
|
||||
pScene->mMaterials = new aiMaterial*[pScene->mNumMaterials];
|
||||
|
||||
Reference in New Issue
Block a user