Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

131 lines
3.9 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Describes the way to compile data in DCC files (describes an export step)
  4. //
  5. //===========================================================================//
  6. #ifndef DMEDCCMAKEFILE_H
  7. #define DMEDCCMAKEFILE_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "movieobjects/dmemakefile.h"
  12. //-----------------------------------------------------------------------------
  13. // Describes a source for DCC makefiles
  14. //-----------------------------------------------------------------------------
  15. class CDmeSourceDCCFile : public CDmeSource
  16. {
  17. DEFINE_ELEMENT( CDmeSourceDCCFile, CDmeSource );
  18. public:
  19. CDmaStringArray m_RootDCCObjects;
  20. CDmaVar< int > m_ExportType; // 0 == model, 1 == skeletal animation
  21. CDmaVar< float > m_FrameStart;
  22. CDmaVar< float > m_FrameEnd;
  23. CDmaVar< float > m_FrameIncrement;
  24. };
  25. //-----------------------------------------------------------------------------
  26. // Strictly here to customize OpenEditor
  27. //-----------------------------------------------------------------------------
  28. class CDmeSourceMayaFile : public CDmeSourceDCCFile
  29. {
  30. DEFINE_ELEMENT( CDmeSourceMayaFile, CDmeSourceDCCFile );
  31. };
  32. class CDmeSourceMayaModelFile : public CDmeSourceMayaFile
  33. {
  34. DEFINE_ELEMENT( CDmeSourceMayaModelFile, CDmeSourceMayaFile );
  35. };
  36. class CDmeSourceMayaAnimationFile : public CDmeSourceMayaFile
  37. {
  38. DEFINE_ELEMENT( CDmeSourceMayaAnimationFile, CDmeSourceMayaFile );
  39. };
  40. class CDmeSourceXSIFile : public CDmeSourceDCCFile
  41. {
  42. DEFINE_ELEMENT( CDmeSourceXSIFile, CDmeSourceDCCFile );
  43. };
  44. //-----------------------------------------------------------------------------
  45. // Describes a DCC asset
  46. //-----------------------------------------------------------------------------
  47. class CDmeDCCMakefile : public CDmeMakefile
  48. {
  49. DEFINE_ELEMENT( CDmeDCCMakefile, CDmeMakefile );
  50. public:
  51. virtual void GetOutputs( CUtlVector<CUtlString> &fullPaths );
  52. private:
  53. virtual CDmElement *CreateOutputElement( );
  54. virtual void DestroyOutputElement( CDmElement *pOutput );
  55. virtual const char *GetOutputDirectoryID() { return "makefiledir:..\\dmx"; }
  56. bool m_bFlushFile;
  57. };
  58. //-----------------------------------------------------------------------------
  59. // Describes a Maya asset
  60. //-----------------------------------------------------------------------------
  61. class CDmeMayaMakefile : public CDmeDCCMakefile
  62. {
  63. DEFINE_ELEMENT( CDmeMayaMakefile, CDmeDCCMakefile );
  64. };
  65. //-----------------------------------------------------------------------------
  66. // Describes a XSI asset
  67. //-----------------------------------------------------------------------------
  68. class CDmeXSIMakefile : public CDmeDCCMakefile
  69. {
  70. DEFINE_ELEMENT( CDmeXSIMakefile, CDmeDCCMakefile );
  71. public:
  72. // Compiling is just exporting the data in the file
  73. virtual DmeMakefileType_t *GetMakefileType();
  74. virtual DmeMakefileType_t* GetSourceTypes();
  75. };
  76. //-----------------------------------------------------------------------------
  77. // Describes a Maya model/animation asset
  78. //-----------------------------------------------------------------------------
  79. class CDmeMayaModelMakefile : public CDmeMayaMakefile
  80. {
  81. DEFINE_ELEMENT( CDmeMayaModelMakefile, CDmeMayaMakefile );
  82. public:
  83. // Compiling is just exporting the data in the file
  84. virtual DmeMakefileType_t *GetMakefileType();
  85. virtual DmeMakefileType_t* GetSourceTypes();
  86. };
  87. class CDmeMayaAnimationMakefile : public CDmeMayaMakefile
  88. {
  89. DEFINE_ELEMENT( CDmeMayaAnimationMakefile, CDmeMayaMakefile );
  90. public:
  91. // Compiling is just exporting the data in the file
  92. virtual DmeMakefileType_t *GetMakefileType();
  93. virtual DmeMakefileType_t* GetSourceTypes();
  94. };
  95. //-----------------------------------------------------------------------------
  96. // Describes a XSI animation asset
  97. //-----------------------------------------------------------------------------
  98. class CDmeXSIAnimationMakefile : public CDmeXSIMakefile
  99. {
  100. DEFINE_ELEMENT( CDmeXSIAnimationMakefile, CDmeXSIMakefile );
  101. };
  102. #endif // DMEDCCMAKEFILE_H