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