mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-30 09:36:43 +00:00
Don't bother storing the shape name for the submesh name
The submesh name Ogre has is completely useless to us
This commit is contained in:
parent
5d5d28c06c
commit
ff1ecb85c6
1 changed files with 3 additions and 6 deletions
|
@ -763,7 +763,6 @@ class NIFMeshLoader : Ogre::ManualResourceLoader
|
||||||
std::string mGroup;
|
std::string mGroup;
|
||||||
size_t mShapeIndex;
|
size_t mShapeIndex;
|
||||||
std::string mMaterialName;
|
std::string mMaterialName;
|
||||||
std::string mShapeName;
|
|
||||||
|
|
||||||
void warn(const std::string &msg)
|
void warn(const std::string &msg)
|
||||||
{
|
{
|
||||||
|
@ -872,8 +871,7 @@ class NIFMeshLoader : Ogre::ManualResourceLoader
|
||||||
Ogre::VertexDeclaration *decl;
|
Ogre::VertexDeclaration *decl;
|
||||||
int nextBuf = 0;
|
int nextBuf = 0;
|
||||||
|
|
||||||
Ogre::SubMesh *sub = ((mShapeName.length() > 0) ? mesh->createSubMesh(mShapeName) :
|
Ogre::SubMesh *sub = mesh->createSubMesh();
|
||||||
mesh->createSubMesh());
|
|
||||||
|
|
||||||
// Add vertices
|
// Add vertices
|
||||||
sub->useSharedVertices = false;
|
sub->useSharedVertices = false;
|
||||||
|
@ -1061,12 +1059,11 @@ public:
|
||||||
if(node->recType == Nif::RC_NiTriShape && !(flags&0x01)) // Not hidden
|
if(node->recType == Nif::RC_NiTriShape && !(flags&0x01)) // Not hidden
|
||||||
{
|
{
|
||||||
const Nif::NiTriShape *shape = dynamic_cast<const Nif::NiTriShape*>(node);
|
const Nif::NiTriShape *shape = dynamic_cast<const Nif::NiTriShape*>(node);
|
||||||
mShapeName = shape->name;
|
|
||||||
|
|
||||||
Ogre::MeshManager &meshMgr = Ogre::MeshManager::getSingleton();
|
Ogre::MeshManager &meshMgr = Ogre::MeshManager::getSingleton();
|
||||||
std::string fullname = mName+"@index="+Ogre::StringConverter::toString(shape->recIndex);
|
std::string fullname = mName+"@index="+Ogre::StringConverter::toString(shape->recIndex);
|
||||||
if(mShapeName.length() > 0)
|
if(shape->name.length() > 0)
|
||||||
fullname += "@shape="+mShapeName;
|
fullname += "@shape="+shape->name;
|
||||||
|
|
||||||
Misc::StringUtils::toLower(fullname);
|
Misc::StringUtils::toLower(fullname);
|
||||||
Ogre::MeshPtr mesh = meshMgr.getByName(fullname);
|
Ogre::MeshPtr mesh = meshMgr.getByName(fullname);
|
||||||
|
|
Loading…
Reference in a new issue