src/MeshImporterExporter.cpp
Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations./*Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.-----------------------------------------------------------------------------------Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.A QtMeshEditor fileToo many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.Copyright (c) Fernando Tonon (https://github.com/fernandotonon)Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.The MIT LicenseToo many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.Permission is hereby granted, free of charge, to any person obtaining a copyToo many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.of this software and associated documentation files (the "Software"), to dealToo many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.in the Software without restriction, including without limitation the rightsToo many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.to use, copy, modify, merge, publish, distribute, sublicense, and/or sellToo many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.copies of the Software, and to permit persons to whom the Software isToo many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.furnished to do so, subject to the following conditions:Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.The above copyright notice and this permission notice shall be included inToo many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.all copies or substantial portions of the Software.Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORToo many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEToo many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERToo many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS INToo many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.THE SOFTWARE.Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.-----------------------------------------------------------------------------------Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.*/Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.#include "MeshImporterExporter.h"Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.#include <assimp/Importer.hpp>Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.#include <assimp/Exporter.hpp>Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.#include <assimp/postprocess.h>Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.#include <QMessageBox>Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.#include <QFileDialog>Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.#include <QDebug>Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.#include "OgreXML/OgreXMLMeshSerializer.h"Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.#include "OgreXML/OgreXMLSkeletonSerializer.h"Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.#include "Manager.h"Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.#include "Assimp/Importer.h"Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.#ifndef WIN32Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. #include <unistd.h>Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.#endifToo many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.const QMap<QString, QString> MeshImporterExporter::exportFormats = {Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {"Ogre Mesh (*.mesh)", ".mesh"},Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {"Ogre Mesh v1.10+(*.mesh)", ".mesh"},Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {"Ogre Mesh v1.8+(*.mesh)", ".mesh"},Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {"Ogre Mesh v1.7+(*.mesh)", ".mesh"},Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {"Ogre Mesh v1.4+(*.mesh)", ".mesh"},Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {"Ogre Mesh v1.0+(*.mesh)", ".mesh"},Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {"Ogre XML (*.mesh.xml)", ".mesh.xml"},Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {"Collada (*.dae)", ".dae"},Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {"X (*.x)", ".x"},Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {"STP (*.stp)", ".stp"},Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {"OBJ (*.obj)", ".obj"},Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {"OBJ without MTL (*.objnomtl)", ".obj"},Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {"STL (*.stl)", ".stl"},Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {"STL Binary (*.stlb)", ".stlb"},Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {"PLY (*.ply)", ".ply"},Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {"PLY Binary (*.plyb)", ".plyb"},Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {"3DS (*.3ds)", ".3ds"},Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {"glTF 2.0 (*.gltf2)", ".gltf2"},Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {"glTF 2.0 Binary (*.glb2)", ".glb2"},Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {"glTF 1.0 (*.gltf)", ".gltf"},Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {"glTF 1.0 Binary (*.glb)", ".glb"},Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {"Assimp Binary (*.assbin)", ".assbin"}Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.};Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.void MeshImporterExporter::configureCamera(const Ogre::Entity *en)Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.{Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Ogre::Real size = std::max(std::max(en->getBoundingBox().getSize().y,en->getBoundingBox().getSize().x),en->getBoundingBox().getSize().z) ;Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. auto cameras = Manager::getSingleton()->getSceneMgr()->getCameras();Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. for(const auto &[_, camera] : cameras)Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. const Ogre::Radian fov = camera->getFOVy();Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Ogre::Real distance = size/(2*std::tan(fov.valueRadians()/2));Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. camera->getParentSceneNode()->setPosition(0,0,-distance);Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. }Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.}Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.void MeshImporterExporter::exportMaterial(const Ogre::Entity* e, const QFileInfo& file)Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.{Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Ogre::MaterialSerializer ms;Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. for (const auto &subEntity : e->getSubEntities())Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. ms.queueForExport(subEntity->getMaterial());Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. exportTextures(subEntity->getMaterial(), file);Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. }Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. ms.exportQueued((file.path() + "/" + file.baseName() + ".material").toStdString());Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.}Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.void MeshImporterExporter::exportTextures(const Ogre::MaterialPtr& material, const QFileInfo& file)Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.{Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. for (const auto &technique : material->getTechniques())Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. for (const auto &pass : technique->getPasses())Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. for (const auto &tus : pass->getTextureUnitStates())Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. if (tus->getContentType() != Ogre::TextureUnitState::CONTENT_NAMED)Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. continue;Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Ogre::TexturePtr tex = tus->_getTexturePtr();Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. if (tex->getTextureType() == Ogre::TEX_TYPE_2D)Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Ogre::Image img;Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. tex->convertToImage(img, true);Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. img.save((file.path() + "/" + tex->getName().c_str()).toStdString());Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. }Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. }Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. }Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. }Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.}Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.void MeshImporterExporter::importer(const QStringList &_uriList)Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.{Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. try{Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. foreach(const QString &fileName,_uriList)Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. if(!fileName.size()) continue;Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. QFileInfo file;Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. file.setFile(fileName);Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. if(!Ogre::ResourceGroupManager::getSingleton().resourceLocationExists(file.path().toStdString().data(),file.path().toStdString().data()))Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Ogre::ResourceGroupManager::getSingleton().addResourceLocation(file.path().toStdString().data(),"FileSystem",file.path().toStdString().data());Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups();Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. }Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Ogre::SceneNode *sn;Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. const Ogre::Entity *en;Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. if(!file.suffix().compare("mesh",Qt::CaseInsensitive))Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. sn = Manager::getSingleton()->addSceneNode(QString(file.baseName()));Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. en = Manager::getSingleton()->createEntity(sn, Ogre::MeshManager::getSingleton().load(file.fileName().toStdString().data(), file.path().toStdString().data()));Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. }Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. else if(!file.suffix().compare("xml",Qt::CaseInsensitive))Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Ogre::MeshPtr mesh;Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. sn = Manager::getSingleton()->addSceneNode(QString(file.baseName()));Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Ogre::Mesh* importedMesh = Ogre::MeshManager::getSingleton().createManual(sn->getName(), "General").get();Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Ogre::Skeleton* importedSk = Ogre::static_pointer_cast<Ogre::Skeleton>(Ogre::SkeletonManager::getSingleton().create(QString(QString(sn->getName().data())+".skeleton.xml").toStdString().data(), "General")).get();Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. tryToo many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Ogre::XMLSkeletonSerializer xmlSS;Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. xmlSS.importSkeleton((file.filePath().left(file.filePath().length()-8)+"skeleton.xml").toStdString().data(),importedSk);Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. importedSk->setBackgroundLoaded(true);Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. while(importedSk->isLoading())Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. #ifdef WIN32Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Sleep(1000);Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. #elseToo many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. sleep(1);Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. #endifToo many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Ogre::XMLMeshSerializer xmlMS;Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. xmlMS.importMesh(file.filePath().toStdString().data(),importedMesh);Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. mesh = importedMesh->clone(sn->getName());Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. }Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. catch(...)Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Ogre::LogManager::getSingleton().logMessage("Trying with assimp...");Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. goto assimp;Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. }Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. en = Manager::getSingleton()->createEntity(sn, mesh);Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. }Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. elseToo many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. assimp:Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. AssimpToOgreImporter importer;Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Ogre::MeshPtr mesh = importer.loadModel(file.filePath().toStdString());Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. if (!mesh) return;Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. auto meshName = file.baseName();Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. sn = Manager::getSingleton()->addSceneNode(QString(meshName));Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. en = Manager::getSingleton()->createEntity(sn, mesh);Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. }Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. sn->setPosition(0,0,0);Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. configureCamera(en);Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. }Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. } Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. catch(Ogre::Exception &e)Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Ogre::LogManager::getSingleton().logMessage(e.getFullDescription());Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. }Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.}Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.QString MeshImporterExporter::formatFileURI(const QString &_uri, const QString &_format)Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.{Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. if(_uri.isEmpty()) return "";Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. const auto ext = exportFormats[_format];Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. if(_uri.right(ext.size())==ext) Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. return _uri;Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. return _uri+ext;Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.}Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.QString MeshImporterExporter::exportFileDialogFilter()Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.{Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. QString filter;Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. for(auto format = exportFormats.keyBegin(); format!=exportFormats.keyEnd(); ++format)Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. filter+=*format+";;";Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. filter.chop(2);Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. return filter;Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.}Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.int MeshImporterExporter::exporter(const Ogre::SceneNode *_sn)Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.{Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. if(!_sn)Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. QMessageBox::warning(nullptr,"No object","Which object are you trying to export?",QMessageBox::Ok);Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. return -1;Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. }Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. QString filter = "Ogre Mesh (*.mesh)";Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. QString fileName = QFileDialog::getSaveFileName(nullptr, QObject::tr("Export Mesh"),Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. _sn->getName().data(),Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. exportFileDialogFilter(),&filter,Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. QFileDialog::DontUseNativeDialog);Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. if(fileName.isEmpty()) return -1;Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. QString uri = formatFileURI(fileName, filter);Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. exporter(_sn, uri, filter);Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. return 0;Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.}Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.int MeshImporterExporter::exporter(const Ogre::SceneNode *_sn, const QString &_uri, const QString &_format)Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.{Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. if(!_sn) return -1;Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. if(_uri.isEmpty()) return -1;Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. QFileInfo file;Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. file.setFile(_uri);Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. if(!Manager::getSingleton()->getSceneMgr()->hasEntity(_sn->getName())) return -1;Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. const Ogre::Entity *e = Manager::getSingleton()->getSceneMgr()->getEntity(_sn->getName());Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. if(!e) return -1;Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. if(_format=="Ogre XML (*.mesh.xml)")Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Ogre::XMLMeshSerializer xmlMS;Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Ogre::String skName;Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. if(e->hasSkeleton())Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Ogre::XMLSkeletonSerializer xmlSS;Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. xmlSS.exportSkeleton(e->getSkeleton(),(_uri.left(_uri.length()-8)+"skeleton.xml").toStdString().data());Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. skName = e->getMesh().get()->getSkeletonName();Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. e->getMesh().get()->setSkeletonName((file.baseName()+".skeleton.xml").toStdString().data());Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. }Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. xmlMS.exportMesh(e->getMesh().get(),_uri.toStdString().data());Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. if(e->hasSkeleton())Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. e->getMesh().get()->setSkeletonName(skName);Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. exportMaterial(e, file);Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. }Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. else if(_format.contains("mesh"))Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Ogre::MeshSerializer m;Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. unsigned int version = 0;Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. std::map<QString, unsigned int> versionMap = {Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {"Ogre Mesh (*.mesh)", 0},Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {"Ogre Mesh v1.10+(*.mesh)", 1},Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {"Ogre Mesh v1.8+(*.mesh)", 2},Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {"Ogre Mesh v1.7+(*.mesh)", 3},Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {"Ogre Mesh v1.4+(*.mesh)", 4},Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {"Ogre Mesh v1.0+(*.mesh)", 5}Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. };Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. version = versionMap[_format];Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. if(e->hasSkeleton())Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Ogre::SkeletonSerializer ss;Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. ss.exportSkeleton(e->getSkeleton(),QString(file.path()+"/"+e->getMesh().get()->getSkeletonName().c_str()).toStdString().data());Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. }Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. m.exportMesh(e->getMesh().get(),_uri.toStdString().data(),(Ogre::MeshVersion)version);Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. exportMaterial(e, file);Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. } else {Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. // Export using AssimpToo many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. // Export temp Ogre XMLToo many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Ogre::XMLMeshSerializer m;Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. /*Ogre::String skName;Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. if(e->hasSkeleton())Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. {Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. skName = e->getMesh().get()->getSkeletonName();Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Ogre::XMLSkeletonSerializer xmlSS;Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. xmlSS.exportSkeleton(e->getSkeleton(),skName);Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. }*/Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. m.exportMesh(e->getMesh().get(),"./temp.mesh.xml");Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. QFileInfo temp = file;Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. temp.setFile("./temp.material");Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. exportMaterial(e, temp);Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. // Import the temp fileToo many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Assimp::Importer importer;Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. const aiScene* scene = importer.ReadFile(Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. "./temp.mesh.xml",Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. aiProcess_CalcTangentSpace |Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. aiProcess_JoinIdenticalVertices |Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. aiProcess_Triangulate |Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. aiProcess_RemoveComponent |Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. aiProcess_GenSmoothNormals |Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. aiProcess_ValidateDataStructure |Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. aiProcess_OptimizeGraph |Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. aiProcess_LimitBoneWeights |Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. aiProcess_SortByPType |Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. aiProcess_ImproveCacheLocality |Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. aiProcess_FixInfacingNormals |Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. aiProcess_PopulateArmatureData | // necessary to load bone node informationToo many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. aiProcess_OptimizeMeshes |Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. aiProcess_GlobalScaleToo many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. );Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. if(!scene) return -1;Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. // Export to the desired formatToo many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Assimp::Exporter exporter;Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. exporter.Export(scene, file.suffix().toStdString().c_str(), file.filePath().toStdString().c_str());Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. // Remove temporary filesToo many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. QFile::remove("./temp.mesh.xml");Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. // QFile::remove("./temp.skeleton.xml");Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. QFile::remove("./temp.material");Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. }Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations. return 0;Too many #ifdef configurations - cppcheck only checks 12 of 13 configurations. Use --force to check all configurations.}