FBXImportSettings.h 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. /*
  2. Open Asset Import Library (assimp)
  3. ----------------------------------------------------------------------
  4. Copyright (c) 2006-2015, 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. , readCameras(true)
  49. , readLights(true)
  50. , readAnimations(true)
  51. , readWeights(true)
  52. , preservePivots(true)
  53. , optimizeEmptyAnimationCurves(true)
  54. {}
  55. /** enable strict mode:
  56. * - only accept fbx 2012, 2013 files
  57. * - on the slightest error, give up.
  58. *
  59. * Basically, strict mode means that the fbx file will actually
  60. * be validated. Strict mode is off by default. */
  61. bool strictMode;
  62. /** specifies whether all geometry layers are read and scanned for
  63. * usable data channels. The FBX spec indicates that many readers
  64. * will only read the first channel and that this is in some way
  65. * the recommended way- in reality, however, it happens a lot that
  66. * vertex data is spread among multiple layers. The default
  67. * value for this option is true.*/
  68. bool readAllLayers;
  69. /** specifies whether all materials are read, or only those that
  70. * are referenced by at least one mesh. Reading all materials
  71. * may make FBX reading a lot slower since all objects
  72. * need to be processed .
  73. * This bit is ignored unless readMaterials=true*/
  74. bool readAllMaterials;
  75. /** import materials (true) or skip them and assign a default
  76. * material. The default value is true.*/
  77. bool readMaterials;
  78. /** import cameras? Default value is true.*/
  79. bool readCameras;
  80. /** import light sources? Default value is true.*/
  81. bool readLights;
  82. /** import animations (i.e. animation curves, the node
  83. * skeleton is always imported). Default value is true. */
  84. bool readAnimations;
  85. /** read bones (vertex weights and deform info).
  86. * Default value is true. */
  87. bool readWeights;
  88. /** preserve transformation pivots and offsets. Since these can
  89. * not directly be represented in assimp, additional dummy
  90. * nodes will be generated. Note that settings this to false
  91. * can make animation import a lot slower. The default value
  92. * is true.
  93. *
  94. * The naming scheme for the generated nodes is:
  95. * <OriginalName>_$AssimpFbx$_<TransformName>
  96. *
  97. * where <TransformName> is one of
  98. * RotationPivot
  99. * RotationOffset
  100. * PreRotation
  101. * PostRotation
  102. * ScalingPivot
  103. * ScalingOffset
  104. * Translation
  105. * Scaling
  106. * Rotation
  107. **/
  108. bool preservePivots;
  109. /** do not import animation curves that specify a constant
  110. * values matching the corresponding node transformation.
  111. * The default value is true. */
  112. bool optimizeEmptyAnimationCurves;
  113. };
  114. } // !FBX
  115. } // !Assimp
  116. #endif