PageRenderTime 42ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

/openCOLLADA-svn871/COLLADAMaya/include/COLLADAMayaExportOptions.h

#
C Header | 171 lines | 73 code | 36 blank | 62 comment | 0 complexity | d9483867877a637d5412ac042cae6679 MD5 | raw file
  1. /*
  2. Copyright (c) 2008-2009 NetAllied Systems GmbH
  3. This file is part of COLLADAMaya.
  4. Portions of the code are:
  5. Copyright (c) 2005-2007 Feeling Software Inc.
  6. Copyright (c) 2005-2007 Sony Computer Entertainment America
  7. Copyright (c) 2004-2005 Alias Systems Corp.
  8. Licensed under the MIT Open Source License,
  9. for details please see LICENSE file or the website
  10. http://www.opensource.org/licenses/mit-license.php
  11. */
  12. #ifndef __COLLADA_MAYA_EXPORT_OPTIONS_H__
  13. #define __COLLADA_MAYA_EXPORT_OPTIONS_H__
  14. #include <maya/MPxFileTranslator.h>
  15. namespace COLLADAMaya
  16. {
  17. /**
  18. * COLLADA Export options
  19. * Class which manages the export options.
  20. * All options are stored statically to allow easy retrieval
  21. * from any class. At some point we may want to
  22. * modify this class to use a singleton pattern...
  23. */
  24. class ExportOptions
  25. {
  26. private:
  27. /****************************/
  28. /** General export options */
  29. /****************************/
  30. /** True, if we should a write transform matrix. */
  31. static bool mBakeTransforms;
  32. /** True, if we should write relative pathes to external file references. */
  33. static bool mRelativePaths;
  34. /** True, if the texture files should be copied to the destination folder. */
  35. static bool mCopyTextures;
  36. static bool mExportTriangles;
  37. /** True, if file references to cgfx files should be exported
  38. (instead of directly writing the contant of the file). */
  39. static bool mExportCgfxFileReferences;
  40. static bool mIsSampling;
  41. static bool mCurveConstrainSampling;
  42. static bool mRemoveStaticCurves;
  43. /****************************/
  44. /** Filter export */
  45. /****************************/
  46. static bool mExportPolygonMeshes;
  47. static bool mExportLights;
  48. static bool mExportCameras;
  49. static bool mExportJointsAndSkin;
  50. static bool mExportAnimations;
  51. static bool mExportInvisibleNodes;
  52. static bool mExportDefaultCameras;
  53. static bool mExportTexCoords;
  54. static bool mExportNormals;
  55. static bool mExportNormalsPerVertex;
  56. static bool mExportVertexColors;
  57. static bool mExportVertexColorsPerVertex;
  58. static bool mExportTexTangents;
  59. static bool mExportTangents;
  60. static bool mExportReferencedMaterials;
  61. static bool mExportMaterialsOnly;
  62. /****************************/
  63. /** XRef options */
  64. /****************************/
  65. static bool mExportXRefs;
  66. static bool mDereferenceXRefs;
  67. /****************************/
  68. /** Camera options */
  69. /****************************/
  70. static bool mExportCameraAsLookat;
  71. static bool mCameraXFov;
  72. static bool mCameraYFov;
  73. /****************************/
  74. /** Precision options */
  75. /****************************/
  76. static bool mDoublePrecision;
  77. public:
  78. /** Parse the options String and reset all options to their default values. */
  79. static void set ( const MString &optionsString );
  80. /****************************/
  81. /** General export options */
  82. /****************************/
  83. /** Should the transforms be baked into a single matrix, as opposed to decomposed into
  84. primitive collada transforms (e.g. translate, rotate, scale)? Default: FALSE */
  85. static bool bakeTransforms();
  86. static bool relativePaths();
  87. /** True, if the texture files should be copied to the destination folder. */
  88. static bool copyTextures();
  89. static bool exportTriangles();
  90. /** If true, a reference to the used cgfx files will be included in the exported dae file.
  91. Otherwise, the code of the used cgfx file will be implemented.*/
  92. static bool exportCgfxFileReferences ();
  93. static bool isSampling();
  94. static bool curveConstrainSampling();
  95. static bool removeStaticCurves();
  96. /****************************/
  97. /** Filter export */
  98. /****************************/
  99. static bool exportPolygonMeshes();
  100. static bool exportLights();
  101. static bool exportCameras();
  102. static bool exportJointsAndSkin();
  103. static bool exportAnimations();
  104. static bool exportInvisibleNodes();
  105. static bool exportDefaultCameras();
  106. static bool exportTexCoords();
  107. static bool exportNormals();
  108. static bool exportNormalsPerVertex();
  109. static bool exportVertexColors();
  110. static bool exportVertexColorsPerVertex();
  111. static bool exportTexTangents();
  112. static bool exportTangents();
  113. static bool exportReferencedMaterials ();
  114. static bool exportMaterialsOnly ();
  115. /****************************/
  116. /** XRef options */
  117. /****************************/
  118. static bool exportXRefs();
  119. static bool dereferenceXRefs();
  120. /****************************/
  121. /** Camera options */
  122. /****************************/
  123. static bool exportCameraAsLookat();
  124. static bool cameraXFov();
  125. static bool cameraYFov();
  126. /****************************/
  127. /** Precision options */
  128. /****************************/
  129. static bool doublePrecision();
  130. };
  131. }
  132. #endif // __COLLADA_MAYA_EXPORT_OPTIONS_H__