diff --git a/src/libmm3d/md3filter.cc b/src/libmm3d/md3filter.cc index a8e71dcd..66804dfd 100644 --- a/src/libmm3d/md3filter.cc +++ b/src/libmm3d/md3filter.cc @@ -1920,13 +1920,6 @@ Model::ModelErrorE Md3Filter::writeSectionFile( const char * filename, Md3Filter } } - if ( numFrames > MD3_MAX_FRAMES ) - { - log_error( "Number of frames(%d) is larger than %d\n.\n", numFrames, MD3_MAX_FRAMES ); - m_model->setFilterSpecificError( transll( QT_TRANSLATE_NOOP( "LowLevel", "Too many animation frames for MD3 export." ) ).c_str() ); - return Model::ERROR_FILTER_SPECIFIC; - } - if ( animCount == 0 ) { animCount = 1; @@ -1954,10 +1947,6 @@ Model::ModelErrorE Md3Filter::writeSectionFile( const char * filename, Md3Filter MeshList::iterator mlit; int32_t numMeshes = 0; - size_t maxMeshTris = 0; - size_t maxMeshVerts = 0; - - std::string groupName; for ( mlit = meshes.begin(); mlit != meshes.end(); mlit++ ) { @@ -1969,49 +1958,17 @@ Model::ModelErrorE Md3Filter::writeSectionFile( const char * filename, Md3Filter if ( groupInSection( m_model->getGroupName( (*mlit).group ), section ) ) { numMeshes++; - if ( (*mlit).faces.size() > maxMeshTris ) { - maxMeshTris = (*mlit).faces.size(); - } - if ( (*mlit).vertices.size() > maxMeshVerts ) { - maxMeshVerts = (*mlit).vertices.size(); - } } } } int32_t numSkins = 0; - if ( numTags > MD3_MAX_TAGS ) - { - log_error( "Number of tags(%d) is larger than %d\n.\n", numTags, MD3_MAX_TAGS ); - m_model->setFilterSpecificError( transll( QT_TRANSLATE_NOOP( "LowLevel", "Too many points for MD3 export." ) ).c_str() ); - return Model::ERROR_FILTER_SPECIFIC; - } - if ( numMeshes > MD3_MAX_SURFACES ) - { - log_error( "Number of groups(%d) is larger than %d\n.\n", numMeshes, MD3_MAX_SURFACES ); - m_model->setFilterSpecificError( transll( QT_TRANSLATE_NOOP( "LowLevel", "Too many groups for MD3 export." ) ).c_str() ); - return Model::ERROR_FILTER_SPECIFIC; - } // numSkins is usually zero for MD3 header, there can be skins for each mesh though later int32_t offsetFrames = HEADER_SIZE; int32_t offsetTags = offsetFrames + numFrames * FRAME_SIZE; int32_t offsetMeshes = offsetTags + numFrames * numTags * TAG_SIZE; int32_t offsetEnd = offsetMeshes; - // MD3 limit tests - if ( maxMeshTris > MD3_MAX_TRIANGLES ) - { - log_error( "Number of triangles(%d) is larger than %d\n.\n", maxMeshTris, MD3_MAX_TRIANGLES ); - m_model->setFilterSpecificError( transll( QT_TRANSLATE_NOOP( "LowLevel", "Too many faces in a single group for MD3 export" ) ).c_str() ); - return Model::ERROR_FILTER_SPECIFIC; - } - if ( maxMeshVerts > MD3_MAX_VERTS ) - { - log_error( "Number of verticies(%d) is larger than %d\n.\n", maxMeshVerts, MD3_MAX_VERTS ); - m_model->setFilterSpecificError( transll( QT_TRANSLATE_NOOP( "LowLevel", "Too many vertices in a single group for MD3 export" ) ).c_str() ); - return Model::ERROR_FILTER_SPECIFIC; - } - // Open file for writing Model::ModelErrorE err = Model::ERROR_NONE; m_dst = openOutput( filename, err );