Revision: 48388
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48388
Author:   aramis_acg
Date:     2012-06-28 22:18:13 +0000 (Thu, 28 Jun 2012)
Log Message:
-----------
- ext_assimp: merge https://github.com/acgessler/assimp-gsoc2012-fbx. This 
updates assimp to 3.0 and adds the current status of my FBX importer, so the 
"Import via Open Asset Import Library" menu item now accepts FBX.

Modified Paths:
--------------
    branches/soc-2012-bratwurst/extern/assimp/CMakeLists.txt
    branches/soc-2012-bratwurst/extern/assimp/code/ASELoader.cpp
    branches/soc-2012-bratwurst/extern/assimp/code/ASELoader.h
    branches/soc-2012-bratwurst/extern/assimp/code/BVHLoader.cpp
    branches/soc-2012-bratwurst/extern/assimp/code/BVHLoader.h
    branches/soc-2012-bratwurst/extern/assimp/code/CSMLoader.cpp
    branches/soc-2012-bratwurst/extern/assimp/code/CSMLoader.h
    branches/soc-2012-bratwurst/extern/assimp/code/ImporterRegistry.cpp
    branches/soc-2012-bratwurst/extern/assimp/code/LWSLoader.cpp
    branches/soc-2012-bratwurst/extern/assimp/code/LWSLoader.h
    branches/soc-2012-bratwurst/extern/assimp/code/ObjTools.h
    branches/soc-2012-bratwurst/extern/assimp/code/OgreImporter.cpp
    branches/soc-2012-bratwurst/extern/assimp/code/OgreImporter.hpp
    branches/soc-2012-bratwurst/extern/assimp/code/OgreMaterial.cpp
    branches/soc-2012-bratwurst/extern/assimp/code/OgreSkeleton.cpp
    branches/soc-2012-bratwurst/extern/assimp/code/STEPFileReader.cpp
    branches/soc-2012-bratwurst/extern/assimp/include/assimp/config.h

Added Paths:
-----------
    branches/soc-2012-bratwurst/extern/assimp/code/FBXCompileConfig.h
    branches/soc-2012-bratwurst/extern/assimp/code/FBXConverter.cpp
    branches/soc-2012-bratwurst/extern/assimp/code/FBXConverter.h
    branches/soc-2012-bratwurst/extern/assimp/code/FBXDocument.cpp
    branches/soc-2012-bratwurst/extern/assimp/code/FBXDocument.h
    branches/soc-2012-bratwurst/extern/assimp/code/FBXImportSettings.h
    branches/soc-2012-bratwurst/extern/assimp/code/FBXImporter.cpp
    branches/soc-2012-bratwurst/extern/assimp/code/FBXImporter.h
    branches/soc-2012-bratwurst/extern/assimp/code/FBXParser.cpp
    branches/soc-2012-bratwurst/extern/assimp/code/FBXParser.h
    branches/soc-2012-bratwurst/extern/assimp/code/FBXTokenizer.cpp
    branches/soc-2012-bratwurst/extern/assimp/code/FBXTokenizer.h
    branches/soc-2012-bratwurst/extern/assimp/code/FBXUtil.cpp
    branches/soc-2012-bratwurst/extern/assimp/code/FBXUtil.h

Modified: branches/soc-2012-bratwurst/extern/assimp/CMakeLists.txt
===================================================================
--- branches/soc-2012-bratwurst/extern/assimp/CMakeLists.txt    2012-06-28 
20:48:18 UTC (rev 48387)
+++ branches/soc-2012-bratwurst/extern/assimp/CMakeLists.txt    2012-06-28 
22:18:13 UTC (rev 48388)
@@ -282,7 +282,24 @@
        code/XGLLoader.h
 )
 
+SET(FBX_SRCS
+       code/FBXCompileConfig.h
+       code/FBXConverter.cpp
+       code/FBXConverter.h
+       code/FBXDocument.cpp
+       code/FBXDocument.h
+       code/FBXImporter.cpp
+       code/FBXImporter.h
+       code/FBXImportSettings.h
+       code/FBXParser.cpp
+       code/FBXParser.h
+       code/FBXTokenizer.cpp
+       code/FBXTokenizer.h
+       code/FBXUtil.cpp
+       code/FBXUtil.h
+)
 
+
 SET( PostProcessing_SRCS
        code/CalcTangentsProcess.cpp
        code/CalcTangentsProcess.h
@@ -493,6 +510,7 @@
        ${NDO_SRCS}
        ${IFC_SRCS}
        ${XGL_SRCS}
+       ${FBX_SRCS}
        
        # Third-party libraries
        ${IrrXML_SRCS}

Modified: branches/soc-2012-bratwurst/extern/assimp/code/ASELoader.cpp
===================================================================
--- branches/soc-2012-bratwurst/extern/assimp/code/ASELoader.cpp        
2012-06-28 20:48:18 UTC (rev 48387)
+++ branches/soc-2012-bratwurst/extern/assimp/code/ASELoader.cpp        
2012-06-28 22:18:13 UTC (rev 48388)
@@ -74,6 +74,7 @@
 // 
------------------------------------------------------------------------------------------------
 // Constructor to be privately used by Importer
 ASEImporter::ASEImporter()
+: noSkeletonMesh()
 {}
 
 // 
------------------------------------------------------------------------------------------------
@@ -111,6 +112,8 @@
 {
        configRecomputeNormals = (pImp->GetPropertyInteger(
                AI_CONFIG_IMPORT_ASE_RECONSTRUCT_NORMALS,1) ? true : false);
+
+       noSkeletonMesh = 
pImp->GetPropertyInteger(AI_CONFIG_IMPORT_NO_SKELETON_MESHES,0) != 0;
 }
 
 // 
------------------------------------------------------------------------------------------------
@@ -244,7 +247,9 @@
        // ------------------------------------------------------------------
        if (!pScene->mNumMeshes)        {
                pScene->mFlags |= AI_SCENE_FLAGS_INCOMPLETE;
-               SkeletonMeshBuilder skeleton(pScene);
+               if (!noSkeletonMesh) {
+                       SkeletonMeshBuilder skeleton(pScene);
+               }
        }
 }
 // 
------------------------------------------------------------------------------------------------

Modified: branches/soc-2012-bratwurst/extern/assimp/code/ASELoader.h
===================================================================
--- branches/soc-2012-bratwurst/extern/assimp/code/ASELoader.h  2012-06-28 
20:48:18 UTC (rev 48387)
+++ branches/soc-2012-bratwurst/extern/assimp/code/ASELoader.h  2012-06-28 
22:18:13 UTC (rev 48388)
@@ -197,6 +197,7 @@
        /** Config options: Recompute the normals in every case - WA
            for 3DS Max broken ASE normal export */
        bool configRecomputeNormals;
+       bool noSkeletonMesh;
 };
 
 } // end of namespace Assimp

Modified: branches/soc-2012-bratwurst/extern/assimp/code/BVHLoader.cpp
===================================================================
--- branches/soc-2012-bratwurst/extern/assimp/code/BVHLoader.cpp        
2012-06-28 20:48:18 UTC (rev 48387)
+++ branches/soc-2012-bratwurst/extern/assimp/code/BVHLoader.cpp        
2012-06-28 22:18:13 UTC (rev 48388)
@@ -65,6 +65,7 @@
 // 
------------------------------------------------------------------------------------------------
 // Constructor to be privately used by Importer
 BVHLoader::BVHLoader()
+: noSkeletonMesh()
 {}
 
 // 
------------------------------------------------------------------------------------------------
@@ -90,6 +91,12 @@
 }
 
 // 
------------------------------------------------------------------------------------------------
+void BVHLoader::SetupProperties(const Importer* pImp)
+{
+       noSkeletonMesh = 
pImp->GetPropertyInteger(AI_CONFIG_IMPORT_NO_SKELETON_MESHES,0) != 0;
+}
+
+// 
------------------------------------------------------------------------------------------------
 // Loader meta information
 const aiImporterDesc* BVHLoader::GetInfo () const
 {
@@ -119,8 +126,10 @@
        mLine = 1;
        ReadStructure( pScene);
 
-       // build a dummy mesh for the skeleton so that we see something at least
-       SkeletonMeshBuilder meshBuilder( pScene);
+       if (!noSkeletonMesh) {
+               // build a dummy mesh for the skeleton so that we see something 
at least
+               SkeletonMeshBuilder meshBuilder( pScene);
+       }
 
        // construct an animation from all the motion data we read
        CreateAnimation( pScene);

Modified: branches/soc-2012-bratwurst/extern/assimp/code/BVHLoader.h
===================================================================
--- branches/soc-2012-bratwurst/extern/assimp/code/BVHLoader.h  2012-06-28 
20:48:18 UTC (rev 48387)
+++ branches/soc-2012-bratwurst/extern/assimp/code/BVHLoader.h  2012-06-28 
22:18:13 UTC (rev 48388)
@@ -94,6 +94,7 @@
         * See BaseImporter::CanRead() for details.     */
        bool CanRead( const std::string& pFile, IOSystem* pIOHandler, bool cs) 
const;
 
+       void SetupProperties(const Importer* pImp);
        const aiImporterDesc* GetInfo () const;
 
 protected:
@@ -159,6 +160,8 @@
        /** basic Animation parameters */
        float mAnimTickDuration;
        unsigned int mAnimNumFrames;
+
+       bool noSkeletonMesh;
 };
 
 } // end of namespace Assimp

Modified: branches/soc-2012-bratwurst/extern/assimp/code/CSMLoader.cpp
===================================================================
--- branches/soc-2012-bratwurst/extern/assimp/code/CSMLoader.cpp        
2012-06-28 20:48:18 UTC (rev 48387)
+++ branches/soc-2012-bratwurst/extern/assimp/code/CSMLoader.cpp        
2012-06-28 22:18:13 UTC (rev 48388)
@@ -71,6 +71,7 @@
 // 
------------------------------------------------------------------------------------------------
 // Constructor to be privately used by Importer
 CSMImporter::CSMImporter()
+: noSkeletonMesh()
 {}
 
 // 
------------------------------------------------------------------------------------------------
@@ -104,9 +105,9 @@
 
 // 
------------------------------------------------------------------------------------------------
 // Setup configuration properties for the loader
-void CSMImporter::SetupProperties(const Importer* /*pImp*/)
+void CSMImporter::SetupProperties(const Importer* pImp)
 {
-       // nothing to be done for the moment
+       noSkeletonMesh = 
pImp->GetPropertyInteger(AI_CONFIG_IMPORT_NO_SKELETON_MESHES,0) != 0;
 }
 
 // 
------------------------------------------------------------------------------------------------
@@ -289,7 +290,10 @@
 
        // mark the scene as incomplete and run SkeletonMeshBuilder on it
        pScene->mFlags |= AI_SCENE_FLAGS_INCOMPLETE;
-       SkeletonMeshBuilder maker(pScene,pScene->mRootNode,true);
+       
+       if (!noSkeletonMesh) {
+               SkeletonMeshBuilder maker(pScene,pScene->mRootNode,true);
+       }
 }
 
 #endif // !! ASSIMP_BUILD_NO_CSM_IMPORTER

Modified: branches/soc-2012-bratwurst/extern/assimp/code/CSMLoader.h
===================================================================
--- branches/soc-2012-bratwurst/extern/assimp/code/CSMLoader.h  2012-06-28 
20:48:18 UTC (rev 48387)
+++ branches/soc-2012-bratwurst/extern/assimp/code/CSMLoader.h  2012-06-28 
22:18:13 UTC (rev 48388)
@@ -79,6 +79,9 @@
                IOSystem* pIOHandler);
 
 private:
+
+       bool noSkeletonMesh;
+
 }; // end of class CSMImporter
 } // end of namespace Assimp
 #endif // AI_AC3DIMPORTER_H_INC

Added: branches/soc-2012-bratwurst/extern/assimp/code/FBXCompileConfig.h
===================================================================
--- branches/soc-2012-bratwurst/extern/assimp/code/FBXCompileConfig.h           
                (rev 0)
+++ branches/soc-2012-bratwurst/extern/assimp/code/FBXCompileConfig.h   
2012-06-28 22:18:13 UTC (rev 48388)
@@ -0,0 +1,66 @@
+/*
+Open Asset Import Library (assimp)
+----------------------------------------------------------------------
+
+Copyright (c) 2006-2012, assimp team
+All rights reserved.
+
+Redistribution and use of this software in source and binary forms, 
+with or without modification, are permitted provided that the 
+following conditions are met:
+
+* Redistributions of source code must retain the above
+  copyright notice, this list of conditions and the
+  following disclaimer.
+
+* Redistributions in binary form must reproduce the above
+  copyright notice, this list of conditions and the
+  following disclaimer in the documentation and/or other
+  materials provided with the distribution.
+
+* Neither the name of the assimp team, nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of the assimp team.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+----------------------------------------------------------------------
+*/
+
+/** @file  FBXCompileConfig.h
+ *  @brief FBX importer compile-time switches
+ */
+#ifndef INCLUDED_AI_FBX_COMPILECONFIG_H
+#define INCLUDED_AI_FBX_COMPILECONFIG_H
+
+//
+#if _MSC_VER > 1500 || (defined __GNUC___)
+#      define ASSIMP_FBX_USE_UNORDERED_MULTIMAP
+#      else
+#      define fbx_unordered_map map
+#      define fbx_unordered_multimap multimap
+#endif
+
+#ifdef ASSIMP_FBX_USE_UNORDERED_MULTIMAP
+#      include <unordered_map>
+#      if _MSC_VER > 1600
+#              define fbx_unordered_map unordered_map
+#              define fbx_unordered_multimap unordered_multimap
+#      else
+#              define fbx_unordered_map tr1::unordered_map
+#              define fbx_unordered_multimap tr1::unordered_multimap
+#      endif
+#endif
+
+#endif

Added: branches/soc-2012-bratwurst/extern/assimp/code/FBXConverter.cpp
===================================================================
--- branches/soc-2012-bratwurst/extern/assimp/code/FBXConverter.cpp             
                (rev 0)
+++ branches/soc-2012-bratwurst/extern/assimp/code/FBXConverter.cpp     
2012-06-28 22:18:13 UTC (rev 48388)
@@ -0,0 +1,262 @@
+/*
+Open Asset Import Library (assimp)
+----------------------------------------------------------------------
+

@@ Diff output truncated at 10240 characters. @@
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to