FBXImportSettings.h 4.8 KB

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