Permalink
Browse files

Merge pull request #114 from FishingCactus/Max2012

3DSMax fixes + support for 2012
  • Loading branch information...
2 parents 68317cf + e0aa6e4 commit b2a151a1dd0f689a1915618a99a6be2a604f0095 @fabrobinet fabrobinet committed Oct 3, 2012
Showing with 4,137 additions and 1,187 deletions.
  1. +36 −0 COLLADAFramework/include/COLLADAFWMesh.h
  2. +48 −1 COLLADAFramework/include/COLLADAFWMeshPrimitive.h
  3. +138 −138 COLLADAMax/COLLADAMax.sln
  4. +8 −0 COLLADAMax/include/COLLADAMaxDocumentExporter.h
  5. +13 −0 COLLADAMax/include/COLLADAMaxEffectExporter.h
  6. +269 −0 COLLADAMax/include/COLLADAMaxEffectTextureExporter.h
  7. +153 −0 COLLADAMax/include/COLLADAMaxHwShaderExporter.h
  8. +6 −0 COLLADAMax/include/COLLADAMaxLightExporter.h
  9. +0 −1 COLLADAMax/include/COLLADAMaxPrerequisites.h
  10. +2 −2 COLLADAMax/include/COLLADAMaxStableHeaders.h
  11. +1,206 −1,015 COLLADAMax/scripts/COLLADAMax.vcproj
  12. +104 −5 COLLADAMax/src/COLLADAMaxEffectExporter.cpp
  13. +598 −0 COLLADAMax/src/COLLADAMaxEffectTextureExporter.cpp
  14. +20 −2 COLLADAMax/src/COLLADAMaxGeometryExporter.cpp
  15. +1,217 −0 COLLADAMax/src/COLLADAMaxHwShaderExporter.cpp
  16. +15 −1 COLLADAMax/src/COLLADAMaxLightExporter.cpp
  17. +13 −3 COLLADAMax/src/COLLADAMaxTexTangentCalculator.cpp
  18. +2 −2 COLLADAMaya/src/COLLADAMayaGeometryExporter.cpp
  19. +10 −10 COLLADASaxFrameworkLoader/COLLADASaxFrameworkLoader.sln
  20. +9 −2 COLLADASaxFrameworkLoader/include/COLLADASaxFWLFileLoader.h
  21. +1 −0 COLLADASaxFrameworkLoader/include/COLLADASaxFWLIFilePartLoader.h
  22. +2 −0 COLLADASaxFrameworkLoader/include/COLLADASaxFWLLibraryEffectsLoader.h
  23. +7 −0 COLLADASaxFrameworkLoader/include/COLLADASaxFWLLoader.h
  24. +22 −0 COLLADASaxFrameworkLoader/include/COLLADASaxFWLMeshLoader.h
  25. +10 −0 COLLADASaxFrameworkLoader/include/COLLADASaxFWLMeshPrimitiveInputList.h
  26. +4 −0 COLLADASaxFrameworkLoader/include/COLLADASaxFWLXmlTypes.h
  27. +2 −0 COLLADASaxFrameworkLoader/include/generated14/COLLADASaxFWLLibraryEffectsLoader14.h
  28. +7 −0 COLLADASaxFrameworkLoader/src/COLLADASaxFWLLibraryEffectsLoader.cpp
  29. +5 −3 COLLADASaxFrameworkLoader/src/COLLADASaxFWLLoader.cpp
  30. +200 −0 COLLADASaxFrameworkLoader/src/COLLADASaxFWLMeshLoader.cpp
  31. +7 −0 COLLADASaxFrameworkLoader/src/generated14/COLLADASaxFWLLibraryEffectsLoader14.cpp
  32. +0 −1 COLLADASaxFrameworkLoader/src/generated15/COLLADASaxFWLColladaParserAutoGen15Private.cpp
  33. +2 −0 COLLADAStreamWriter/include/COLLADASWEffectProfile.h
  34. +1 −1 Externals/LibXML/threads.c
@@ -72,6 +72,18 @@ namespace COLLADAFW
MeshVertexData mUVCoords;
/**
+ * The Tangent array
+ */
+
+ MeshVertexData mTangents;
+
+ /**
+ * The Binormal array
+ */
+
+ MeshVertexData mBinormals;
+
+ /**
* Geometric primitives, which assemble values from the inputs into vertex attribute data.
* Each primitive element holds the index arrays of the used input elements
* Can be any combination of the following in any order:
@@ -215,6 +227,30 @@ namespace COLLADAFW
return 0;
}
+ /**
+ * The 3 dimensional tangent coordinates array.
+ * Tangent coordinates can be stored as float or double values.
+ */
+ const MeshVertexData& getTangents () const { return mTangents; }
+
+ /**
+ * The 3 dimensional tangent coordinates array.
+ * Tangent coordinates can be stored as float or double values.
+ */
+ MeshVertexData& getTangents () { return mTangents; }
+
+ /**
+ * The 3 dimensional binormal coordinates array.
+ * Binormal coordinates can be stored as float or double values.
+ */
+ const MeshVertexData& getBinormals () const { return mBinormals; }
+
+ /**
+ * The 3 dimensional binormal coordinates array.
+ * Binormal coordinates can be stored as float or double values.
+ */
+ MeshVertexData& getBinormals () { return mBinormals; }
+
/**
* Geometric primitives, which assemble values from the inputs into vertex attribute data.
* Can be any combination of the following in any order:
@@ -109,6 +109,17 @@ namespace COLLADAFW
UIntValuesArray mNormalIndices;
/**
+ * The index list of the tangent array (support of multiple uv sets).
+ */
+ UIntValuesArray mTangentIndices;
+
+ /**
+ * The index list of the binormal array (support of multiple uv sets).
+ */
+ UIntValuesArray mBinormalIndices;
+
+
+ /**
* The index list of the colors array (support of multiple colors).
*/
IndexListArray mColorIndicesArray;
@@ -117,7 +128,7 @@ namespace COLLADAFW
* The index list of the uv coordinates array (support of multiple uv sets).
*/
IndexListArray mUVCoordIndicesArray;
-
+
public:
/**
@@ -201,6 +212,42 @@ namespace COLLADAFW
bool hasNormalIndices() const { return !mNormalIndices.empty(); }
/**
+ * The index list of the normals array.
+ */
+ UIntValuesArray& getTangentIndices () { return mTangentIndices; }
+
+ /**
+ * The index list of the normals array.
+ */
+ const UIntValuesArray& getTangentIndices () const{ return mTangentIndices; }
+
+ /**
+ * The index list of the normals array.
+ */
+ void setTagentIndices ( const UIntValuesArray& TangentIndices ) { mTangentIndices = TangentIndices; }
+
+ /**Returns true if the mesh primitive has normals.*/
+ bool hasTangentIndices() const { return !mTangentIndices.empty(); }
+
+ /**
+ * The index list of the normals array.
+ */
+ UIntValuesArray& getBinormalIndices () { return mBinormalIndices; }
+
+ /**
+ * The index list of the normals array.
+ */
+ const UIntValuesArray& getBinormalIndices () const{ return mBinormalIndices; }
+
+ /**
+ * The index list of the normals array.
+ */
+ void setBinormalIndices ( const UIntValuesArray& BinormalIndices ) { mBinormalIndices = BinormalIndices; }
+
+ /**Returns true if the mesh primitive has normals.*/
+ bool hasBinormalIndices() const { return !mBinormalIndices.empty(); }
+
+ /**
* The index list of the colors array.
*/
IndexList* getColorIndices ( size_t index )
Oops, something went wrong.
@@ -36,6 +36,8 @@ namespace COLLADAMax
class AnimationExporter;
+ typedef std::map<String, String> StringToStringMap;
+
/** Class that uniquely identifies object.*/
class ObjectIdentifier
{
@@ -164,6 +166,12 @@ namespace COLLADAMax
return mOptions;
}
+ /**
+ * Returns a pointer to the collada stream writer.
+ * @return StreamWriter* Pointer to the collada stream writer
+ */
+ COLLADASW::StreamWriter & getStreamWriter() { return mStreamWriter; };
+
/** The uri of the main output file.*/
const COLLADASW::URI& getOutputFileUri()const { return mOutputFileUri; }
@@ -28,6 +28,7 @@
#include "COLLADAMaxExportSceneGraph.h"
#include "COLLADAMaxMaterialExporter.h"
+#include "COLLADAMaxEffectTextureExporter.h"
#include "COLLADAMaxExtra.h"
#include "COLLADAMaxTypes.h"
@@ -174,6 +175,8 @@ namespace COLLADAMax
AnimationExporter * mAnimationExporter;
+ EffectTextureExporter mTextureExporter;
+
/** List of ids of the already exported materials that are used in the COLLADASW file.*/
ExportedEffectIdAndNameList * mExportedEffectIdList;
@@ -189,6 +192,10 @@ namespace COLLADAMax
/** Maps material and channels to the IParamBlock of the corresponding StdUVGen*/
MaterialChannelPairParamBlockMap mMaterialChannelPairParamBlockMap;
+ /**
+ * The max id with the collada id.
+ */
+ StringToStringMap mMaxIdColladaImageIdMap;
public:
/** Constructor
@@ -221,6 +228,9 @@ namespace COLLADAMax
return mExportedImageMap;
}
+ /** Returns the TextureExporter of the effect exporter.*/
+ EffectTextureExporter* getTextureExporter () { return &mTextureExporter; }
+
/** Returns the MaterialChannelPairParamBlockMap used by the effect exporter*/
const MaterialChannelPairParamBlockMap & getMaterialChannelPairParamBlockMap() const
{
@@ -260,6 +270,9 @@ namespace COLLADAMax
/** Exports am common COLLADASW effect created from @a material.*/
void exportCommonEffect ( COLLADASW::EffectProfile & effectProfile, ExportNode* exportNode, Mtl* material, const String & effectId, float weight = 1.0, bool inited = false );
+ /** Exports a HLSL COLLADASW effect created from @a material.*/
+ void exportHLSLEffect ( COLLADASW::EffectProfile & effectProfile, ExportNode* exportNode, Mtl* material, const String & effectId, float weight = 1.0, bool inited = false );
+
/** Exports the material @a material.*/
void exportSimpleEffect ( ExportNode* exportNode, Mtl* material );
Oops, something went wrong.

0 comments on commit b2a151a

Please sign in to comment.