1 /* 2 Open Asset Import Library (assimp) 3 ---------------------------------------------------------------------- 4 5 Copyright (c) 2006-2019, assimp team 6 7 8 All rights reserved. 9 10 Redistribution and use of this software in source and binary forms, 11 with or without modification, are permitted provided that the 12 following conditions are met: 13 14 * Redistributions of source code must retain the above 15 copyright notice, this list of conditions and the 16 following disclaimer. 17 18 * Redistributions in binary form must reproduce the above 19 copyright notice, this list of conditions and the 20 following disclaimer in the documentation and/or other 21 materials provided with the distribution. 22 23 * Neither the name of the assimp team, nor the names of its 24 contributors may be used to endorse or promote products 25 derived from this software without specific prior 26 written permission of the assimp team. 27 28 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 29 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 30 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 31 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 32 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 33 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 34 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 35 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 36 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 37 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 38 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 39 40 ---------------------------------------------------------------------- 41 */ 42 43 /** @file FBXImportSettings.h 44 * @brief FBX importer runtime configuration 45 */ 46 #ifndef INCLUDED_AI_FBX_IMPORTSETTINGS_H 47 #define INCLUDED_AI_FBX_IMPORTSETTINGS_H 48 49 namespace Assimp { 50 namespace FBX { 51 52 /** FBX import settings, parts of which are publicly accessible via their corresponding AI_CONFIG constants */ 53 struct ImportSettings 54 { ImportSettingsImportSettings55 ImportSettings() 56 : strictMode(true) 57 , readAllLayers(true) 58 , readAllMaterials(false) 59 , readMaterials(true) 60 , readTextures(true) 61 , readCameras(true) 62 , readLights(true) 63 , readAnimations(true) 64 , readWeights(true) 65 , preservePivots(true) 66 , optimizeEmptyAnimationCurves(true) 67 , useLegacyEmbeddedTextureNaming(false) 68 , removeEmptyBones( true ) 69 , convertToMeters( false ) { 70 // empty 71 } 72 73 74 /** enable strict mode: 75 * - only accept fbx 2012, 2013 files 76 * - on the slightest error, give up. 77 * 78 * Basically, strict mode means that the fbx file will actually 79 * be validated. Strict mode is off by default. */ 80 bool strictMode; 81 82 /** specifies whether all geometry layers are read and scanned for 83 * usable data channels. The FBX spec indicates that many readers 84 * will only read the first channel and that this is in some way 85 * the recommended way- in reality, however, it happens a lot that 86 * vertex data is spread among multiple layers. The default 87 * value for this option is true.*/ 88 bool readAllLayers; 89 90 /** specifies whether all materials are read, or only those that 91 * are referenced by at least one mesh. Reading all materials 92 * may make FBX reading a lot slower since all objects 93 * need to be processed . 94 * This bit is ignored unless readMaterials=true*/ 95 bool readAllMaterials; 96 97 98 /** import materials (true) or skip them and assign a default 99 * material. The default value is true.*/ 100 bool readMaterials; 101 102 /** import embedded textures? Default value is true.*/ 103 bool readTextures; 104 105 /** import cameras? Default value is true.*/ 106 bool readCameras; 107 108 /** import light sources? Default value is true.*/ 109 bool readLights; 110 111 /** import animations (i.e. animation curves, the node 112 * skeleton is always imported). Default value is true. */ 113 bool readAnimations; 114 115 /** read bones (vertex weights and deform info). 116 * Default value is true. */ 117 bool readWeights; 118 119 /** preserve transformation pivots and offsets. Since these can 120 * not directly be represented in assimp, additional dummy 121 * nodes will be generated. Note that settings this to false 122 * can make animation import a lot slower. The default value 123 * is true. 124 * 125 * The naming scheme for the generated nodes is: 126 * <OriginalName>_$AssimpFbx$_<TransformName> 127 * 128 * where <TransformName> is one of 129 * RotationPivot 130 * RotationOffset 131 * PreRotation 132 * PostRotation 133 * ScalingPivot 134 * ScalingOffset 135 * Translation 136 * Scaling 137 * Rotation 138 **/ 139 bool preservePivots; 140 141 /** do not import animation curves that specify a constant 142 * values matching the corresponding node transformation. 143 * The default value is true. */ 144 bool optimizeEmptyAnimationCurves; 145 146 /** use legacy naming for embedded textures eg: (*0, *1, *2) 147 */ 148 bool useLegacyEmbeddedTextureNaming; 149 150 /** Empty bones shall be removed 151 */ 152 bool removeEmptyBones; 153 154 /** Set to true to perform a conversion from cm to meter after the import 155 */ 156 bool convertToMeters; 157 }; 158 159 160 } // !FBX 161 } // !Assimp 162 163 #endif 164 165