diff options
Diffstat (limited to 'modules/fbx')
-rw-r--r-- | modules/fbx/fbx_parser/FBXAnimation.cpp | 2 | ||||
-rw-r--r-- | modules/fbx/fbx_parser/FBXDocument.cpp | 4 | ||||
-rw-r--r-- | modules/fbx/fbx_parser/FBXImportSettings.h | 71 | ||||
-rw-r--r-- | modules/fbx/fbx_parser/FBXMaterial.cpp | 4 | ||||
-rw-r--r-- | modules/fbx/fbx_parser/FBXMeshGeometry.cpp | 2 | ||||
-rw-r--r-- | modules/fbx/fbx_parser/FBXParser.cpp | 2 | ||||
-rw-r--r-- | modules/fbx/fbx_parser/FBXProperties.cpp | 3 |
7 files changed, 38 insertions, 50 deletions
diff --git a/modules/fbx/fbx_parser/FBXAnimation.cpp b/modules/fbx/fbx_parser/FBXAnimation.cpp index b11e2c7f55..4ab5edebb1 100644 --- a/modules/fbx/fbx_parser/FBXAnimation.cpp +++ b/modules/fbx/fbx_parser/FBXAnimation.cpp @@ -130,7 +130,7 @@ AnimationCurve::~AnimationCurve() { AnimationCurveNode::AnimationCurveNode(uint64_t id, const ElementPtr element, const std::string &name, const Document &doc, const char *const *target_prop_whitelist /*= NULL*/, size_t whitelist_size /*= 0*/) : - Object(id, element, name), target(), doc(doc) { + Object(id, element, name), doc(doc) { const ScopePtr sc = GetRequiredScope(element); // find target node diff --git a/modules/fbx/fbx_parser/FBXDocument.cpp b/modules/fbx/fbx_parser/FBXDocument.cpp index bcf7fa1565..d156db201b 100644 --- a/modules/fbx/fbx_parser/FBXDocument.cpp +++ b/modules/fbx/fbx_parser/FBXDocument.cpp @@ -93,7 +93,7 @@ using namespace Util; // ------------------------------------------------------------------------------------------------ LazyObject::LazyObject(uint64_t id, const ElementPtr element, const Document &doc) : - doc(doc), element(element), id(id), flags() { + doc(doc), element(element), id(id) { // empty } @@ -252,7 +252,7 @@ FileGlobalSettings::~FileGlobalSettings() { // ------------------------------------------------------------------------------------------------ Document::Document(const Parser &parser, const ImportSettings &settings) : - settings(settings), parser(parser), SafeToImport(false) { + settings(settings), parser(parser) { // Cannot use array default initialization syntax because vc8 fails on it for (unsigned int &timeStamp : creationTimeStamp) { timeStamp = 0; diff --git a/modules/fbx/fbx_parser/FBXImportSettings.h b/modules/fbx/fbx_parser/FBXImportSettings.h index 97ce496eaf..b016db174b 100644 --- a/modules/fbx/fbx_parser/FBXImportSettings.h +++ b/modules/fbx/fbx_parser/FBXImportSettings.h @@ -80,60 +80,52 @@ namespace FBXDocParser { /** FBX import settings, parts of which are publicly accessible via their corresponding AI_CONFIG constants */ struct ImportSettings { - ImportSettings() : - strictMode(true), readAllLayers(true), readAllMaterials(true), readMaterials(true), readTextures(true), readCameras(true), readLights(true), readAnimations(true), readWeights(true), preservePivots(true), optimizeEmptyAnimationCurves(true), useLegacyEmbeddedTextureNaming(false), removeEmptyBones(true), convertToMeters(false) { - // empty - } - /** enable strict mode: * - only accept fbx 2012, 2013 files * - on the slightest error, give up. * * Basically, strict mode means that the fbx file will actually - * be validated. Strict mode is off by default. */ - bool strictMode; + * be validated.*/ + bool strictMode = true; /** specifies whether all geometry layers are read and scanned for * usable data channels. The FBX spec indicates that many readers * will only read the first channel and that this is in some way * the recommended way- in reality, however, it happens a lot that - * vertex data is spread among multiple layers. The default - * value for this option is true.*/ - bool readAllLayers; + * vertex data is spread among multiple layers.*/ + bool readAllLayers = true; /** specifies whether all materials are read, or only those that * are referenced by at least one mesh. Reading all materials * may make FBX reading a lot slower since all objects - * need to be processed . - * This bit is ignored unless readMaterials=true*/ - bool readAllMaterials; + * need to be processed. + * This bit is ignored unless readMaterials=true.*/ + bool readAllMaterials = true; /** import materials (true) or skip them and assign a default - * material. The default value is true.*/ - bool readMaterials; + * material.*/ + bool readMaterials = true; - /** import embedded textures? Default value is true.*/ - bool readTextures; + /** import embedded textures?*/ + bool readTextures = true; - /** import cameras? Default value is true.*/ - bool readCameras; + /** import cameras?*/ + bool readCameras = true; - /** import light sources? Default value is true.*/ - bool readLights; + /** import light sources?*/ + bool readLights = true; /** import animations (i.e. animation curves, the node - * skeleton is always imported). Default value is true. */ - bool readAnimations; + * skeleton is always imported).*/ + bool readAnimations = true; - /** read bones (vertex weights and deform info). - * Default value is true. */ - bool readWeights; + /** read bones (vertex weights and deform info).*/ + bool readWeights = true; /** preserve transformation pivots and offsets. Since these can * not directly be represented in assimp, additional dummy * nodes will be generated. Note that settings this to false - * can make animation import a lot slower. The default value - * is true. + * can make animation import a lot slower. * * The naming scheme for the generated nodes is: * <OriginalName>_$AssimpFbx$_<TransformName> @@ -149,24 +141,21 @@ struct ImportSettings { * Scaling * Rotation **/ - bool preservePivots; + bool preservePivots = true; /** do not import animation curves that specify a constant - * values matching the corresponding node transformation. - * The default value is true. */ - bool optimizeEmptyAnimationCurves; + * values matching the corresponding node transformation.*/ + bool optimizeEmptyAnimationCurves = true; - /** use legacy naming for embedded textures eg: (*0, *1, *2) - */ - bool useLegacyEmbeddedTextureNaming; + /** use legacy naming for embedded textures eg: (*0, *1, *2).*/ + bool useLegacyEmbeddedTextureNaming = false; - /** Empty bones shall be removed - */ - bool removeEmptyBones; + /** Empty bones shall be removed.*/ + bool removeEmptyBones = true; - /** Set to true to perform a conversion from cm to meter after the import - */ - bool convertToMeters; + /** Set to true to perform a conversion from cm to meter after + * the import.*/ + bool convertToMeters = false; }; } // namespace FBXDocParser diff --git a/modules/fbx/fbx_parser/FBXMaterial.cpp b/modules/fbx/fbx_parser/FBXMaterial.cpp index 9970a2b0b1..cb6a6af903 100644 --- a/modules/fbx/fbx_parser/FBXMaterial.cpp +++ b/modules/fbx/fbx_parser/FBXMaterial.cpp @@ -171,7 +171,7 @@ Material::~Material() { // ------------------------------------------------------------------------------------------------ Texture::Texture(uint64_t id, const ElementPtr element, const Document &doc, const std::string &name) : - Object(id, element, name), uvScaling(1.0f, 1.0f), media(nullptr) { + Object(id, element, name), uvScaling(1.0f, 1.0f) { const ScopePtr sc = GetRequiredScope(element); const ElementPtr Type = sc->GetElement("Type"); @@ -297,7 +297,7 @@ void LayeredTexture::fillTexture(const Document &doc) { // ------------------------------------------------------------------------------------------------ Video::Video(uint64_t id, const ElementPtr element, const Document &doc, const std::string &name) : - Object(id, element, name), contentLength(0), content(0) { + Object(id, element, name) { const ScopePtr sc = GetRequiredScope(element); const ElementPtr Type = sc->GetElement("Type"); diff --git a/modules/fbx/fbx_parser/FBXMeshGeometry.cpp b/modules/fbx/fbx_parser/FBXMeshGeometry.cpp index ccc06550fe..a28e7565c6 100644 --- a/modules/fbx/fbx_parser/FBXMeshGeometry.cpp +++ b/modules/fbx/fbx_parser/FBXMeshGeometry.cpp @@ -88,7 +88,7 @@ using namespace Util; // ------------------------------------------------------------------------------------------------ Geometry::Geometry(uint64_t id, const ElementPtr element, const std::string &name, const Document &doc) : - Object(id, element, name), skin() { + Object(id, element, name) { const std::vector<const Connection *> &conns = doc.GetConnectionsByDestinationSequenced(ID(), "Deformer"); for (const Connection *con : conns) { const Skin *sk = ProcessSimpleConnection<Skin>(*con, false, "Skin -> Geometry", element); diff --git a/modules/fbx/fbx_parser/FBXParser.cpp b/modules/fbx/fbx_parser/FBXParser.cpp index 44c24ff926..166d98bb8c 100644 --- a/modules/fbx/fbx_parser/FBXParser.cpp +++ b/modules/fbx/fbx_parser/FBXParser.cpp @@ -216,7 +216,7 @@ Scope::~Scope() { // ------------------------------------------------------------------------------------------------ Parser::Parser(const TokenList &tokens, bool is_binary) : - tokens(tokens), last(), current(), cursor(tokens.begin()), is_binary(is_binary) { + tokens(tokens), cursor(tokens.begin()), is_binary(is_binary) { root = new_Scope(*this, true); scopes.push_back(root); } diff --git a/modules/fbx/fbx_parser/FBXProperties.cpp b/modules/fbx/fbx_parser/FBXProperties.cpp index 8ab94e1ef4..d796c578f9 100644 --- a/modules/fbx/fbx_parser/FBXProperties.cpp +++ b/modules/fbx/fbx_parser/FBXProperties.cpp @@ -145,8 +145,7 @@ std::string PeekPropertyName(const Element &element) { } // namespace // ------------------------------------------------------------------------------------------------ -PropertyTable::PropertyTable() : - templateProps(), element() { +PropertyTable::PropertyTable() { } // ------------------------------------------------------------------------------------------------ |