|
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
|
| Line | |
|---|
| 1 | #ifndef READERWRITERFBX_H |
|---|
| 2 | #define READERWRITERFBX_H |
|---|
| 3 | |
|---|
| 4 | #include <osgDB/ReaderWriter> |
|---|
| 5 | #include <fbxfilesdk/fbxfilesdk_version.h> |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | |
|---|
| 9 | |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | #if FBXSDK_VERSION_MAJOR != 2012 || FBXSDK_VERSION_MINOR < 1 |
|---|
| 13 | #error Wrong FBX SDK version |
|---|
| 14 | #endif |
|---|
| 15 | |
|---|
| 16 | class ReaderWriterFBX : public osgDB::ReaderWriter |
|---|
| 17 | { |
|---|
| 18 | public: |
|---|
| 19 | ReaderWriterFBX() |
|---|
| 20 | { |
|---|
| 21 | supportsExtension("fbx", "FBX format"); |
|---|
| 22 | supportsOption("Embedded", "(Write option) Embed textures in FBX file"); |
|---|
| 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"); |
|---|
| 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."); |
|---|
| 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."); |
|---|
| 26 | } |
|---|
| 27 | |
|---|
| 28 | const char* className() const { return "FBX reader/writer"; } |
|---|
| 29 | |
|---|
| 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; |
|---|
| 32 | }; |
|---|
| 33 | |
|---|
| 34 | |
|---|
| 35 | |
|---|
| 36 | #endif |
|---|