|
Revision 12934, 1.6 kB
(checked in by robert, 16 months ago)
|
|
From Luc Frauciel, "FBX plugin was locked on version 2012.1 of FBX SDK which is not available anymore on Autodesk website.
This patch allows version of FBX >= 2012.1, which includes current one : 2012.2
"
|
-
Property svn:eol-style set to
native
|
| Rev | Line | |
|---|
| [10780] | 1 | #ifndef READERWRITERFBX_H |
|---|
| 2 | #define READERWRITERFBX_H |
|---|
| 3 | |
|---|
| 4 | #include <osgDB/ReaderWriter> |
|---|
| [12337] | 5 | #include <fbxfilesdk/fbxfilesdk_version.h> |
|---|
| [10780] | 6 | |
|---|
| 7 | |
|---|
| 8 | |
|---|
| [12144] | 9 | |
|---|
| [12934] | 10 | |
|---|
| [10780] | 11 | |
|---|
| [12934] | 12 | #if FBXSDK_VERSION_MAJOR != 2012 || FBXSDK_VERSION_MINOR < 1 |
|---|
| [12337] | 13 | #error Wrong FBX SDK version |
|---|
| 14 | #endif |
|---|
| 15 | |
|---|
| [10780] | 16 | class ReaderWriterFBX : public osgDB::ReaderWriter |
|---|
| 17 | { |
|---|
| 18 | public: |
|---|
| 19 | ReaderWriterFBX() |
|---|
| 20 | { |
|---|
| 21 | supportsExtension("fbx", "FBX format"); |
|---|
| [11317] | 22 | supportsOption("Embedded", "(Write option) Embed textures in FBX file"); |
|---|
| [11109] | 23 | supportsOption("UseFbxRoot", "(Read/write option) If the source OSG root node is a simple group with no stateset, the writer will put its children directly under the FBX root, and vice-versa for reading"); |
|---|
| [11589] | 24 | supportsOption("LightmapTextures", "(Read option) Interpret texture maps as overriding the lighting. 3D Studio Max may export files that should be interpreted in this way."); |
|---|
| [11682] | 25 | supportsOption("TessellatePolygons", "(Read option) Tessellate mesh polygons. If the model contains concave polygons this may be necessary, however tessellating can be very slow and may erroneously produce triangle shards."); |
|---|
| [10780] | 26 | } |
|---|
| 27 | |
|---|
| 28 | const char* className() const { return "FBX reader/writer"; } |
|---|
| 29 | |
|---|
| [11109] | 30 | virtual ReadResult readNode(const std::string& filename, const Options*) const; |
|---|
| 31 | virtual WriteResult writeNode(const osg::Node&, const std::string& filename, const Options*) const; |
|---|
| [10780] | 32 | }; |
|---|
| 33 | |
|---|
| 34 | |
|---|
| 35 | |
|---|
| 36 | #endif |
|---|