diff --git a/thirdparty/assimp/packaging/windows-innosetup/LICENSE.rtf b/thirdparty/assimp/packaging/windows-innosetup/LICENSE.rtf deleted file mode 100644 index 48b00de..0000000 Binary files a/thirdparty/assimp/packaging/windows-innosetup/LICENSE.rtf and /dev/null differ diff --git a/thirdparty/assimp/packaging/windows-innosetup/WEB b/thirdparty/assimp/packaging/windows-innosetup/WEB deleted file mode 100644 index 8840d23..0000000 --- a/thirdparty/assimp/packaging/windows-innosetup/WEB +++ /dev/null @@ -1,8 +0,0 @@ - -Project home page: -http://assimp.sourceforge.net - -Sourceforge.net project page: -http://www.sourceforge.net/projects/assimp - - diff --git a/thirdparty/assimp/packaging/windows-innosetup/howto-build-setup.txt b/thirdparty/assimp/packaging/windows-innosetup/howto-build-setup.txt deleted file mode 100644 index d089c0c..0000000 --- a/thirdparty/assimp/packaging/windows-innosetup/howto-build-setup.txt +++ /dev/null @@ -1,16 +0,0 @@ - -How to build the Assimp installer using Inno Setup - - -1) Get MS VC 2008 SP1 redist packages for x86 and amd64 and copy 'em right here. - -vcredist_x86.exe -vcredist_x64.exe - -2) Get D3DCompiler_NN.dll and D3DX9_NN.dll from a) your system32 folder and b) your SysWOW64 folder. Copy all 4 here. Rename the 64 bit files to _x64.dll. NN is the D3DX version targeted by your DX SDK. If it is not 42, you need to update the Inno setup script (script.iss) as well. If you don't have a 64 bit Windows, get the DLLs from somebody else. Please don't ask google because many DLL downloads are infected. - -3) Build assimp, assimpcmd and assimpview for the 'release-dll' target and both the Win32 and x64 architectures. - -4) Get Inno Setup -5) Compile, output is written to the 'out' folder. - diff --git a/thirdparty/assimp/packaging/windows-innosetup/readme_installer.txt b/thirdparty/assimp/packaging/windows-innosetup/readme_installer.txt deleted file mode 100644 index 6ea969d..0000000 --- a/thirdparty/assimp/packaging/windows-innosetup/readme_installer.txt +++ /dev/null @@ -1,23 +0,0 @@ - ------------------------------------------------------------------------------------- -Open Asset Import Library (Assimp) SDK Installer -Release Notes ------------------------------------------------------------------------------------- - -http://assimp.sf.net - - -Troubleshooting -=============== - -1. Missing d3dx9_(some-number).dll? -Install the latest DirectX runtime or grab the file from somewhere (that's evil but mostly fine). - -2. Application configuration not correct / missing msvcr***.dll? -Reinstall Microsoft Visual C++ 2005 SP1 Redistributable (x86 or x64, depending on your system) - -3. assimp.exe not in PATH -Add it to PATH. That's not a bug, the installer does not alter the PATH. - -4. Crashes immediately -You CPU lacks SSE2 support. Build Assimp from scratch to suit your CPU, sorry. diff --git a/thirdparty/assimp/packaging/windows-innosetup/readme_installer_vieweronly.txt b/thirdparty/assimp/packaging/windows-innosetup/readme_installer_vieweronly.txt deleted file mode 100644 index bfa4f8c..0000000 --- a/thirdparty/assimp/packaging/windows-innosetup/readme_installer_vieweronly.txt +++ /dev/null @@ -1,32 +0,0 @@ - ------------------------------------------------------------------------------------- -Open Asset Import Library (Assimp) Viewer Installer -Release Notes ------------------------------------------------------------------------------------- - -http://assimp.sf.net - -Known Bugs & Limitations -======================== - -Viewer - -- Normals appear flipped from time to time when either of the normals-related menu items was hit. -- Alpha-sorting is implemented, but still causes artifacts when models are moved quickly. -- Several important texture file formats (such as GIF) are not supported. -- HUD is blurred on the right side. ATI/AMD hardware only. - -Troubleshooting -=============== - -1. Missing d3dx9_(number).dll? -Install the latest DirectX runtime or grab the file from somewhere (that's evil but mostly fine). - -2. Application configuration not correct / missing msvcr***.dll? -Reinstall Microsoft Visual C++ 2005 SP1 Redistributable (x86 or x64, depending on your system) - -3. assimp.exe not in PATH -Add it to PATH. That's not a bug, the installer does not alter the PATH. - -4. Crashes immediately -You CPU lacks SSE2 support. Build Assimp from scratch to suit your CPU, sorry. \ No newline at end of file diff --git a/thirdparty/assimp/packaging/windows-innosetup/script_vieweronly.iss b/thirdparty/assimp/packaging/windows-innosetup/script_vieweronly.iss deleted file mode 100644 index 1a91fb9..0000000 --- a/thirdparty/assimp/packaging/windows-innosetup/script_vieweronly.iss +++ /dev/null @@ -1,60 +0,0 @@ -; Setup script for use with Inno Setup. - -[Setup] -AppName=Open Asset Import Library - Viewer -AppVerName=Open Asset Import Library - Viewer (v2.0) -DefaultDirName={pf}\AssimpView -DefaultGroupName=AssimpView -UninstallDisplayIcon={app}\bin\x86\assimp.exe -OutputDir=out_vieweronly -AppCopyright=Assimp Development Team -SetupIconFile=..\..\tools\shared\assimp_tools_icon.ico -WizardImageFile=compiler:WizModernImage-IS.BMP -WizardSmallImageFile=compiler:WizModernSmallImage-IS.BMP -LicenseFile=License.rtf -OutputBaseFileName=assimp-view-2.0-setup -VersionInfoVersion=2.0.0.0 -VersionInfoTextVersion=2.0 -VersionInfoCompany=Assimp Development Team -ArchitecturesInstallIn64BitMode=x64 - - -[Run] -Filename: "{app}\stub\vcredist_x86.exe"; Parameters: "/qb"; StatusMsg: "Installing VS2008 SP1 redistributable package (32 Bit)"; Check: not IsWin64 -Filename: "{app}\stub\vcredist_x64.exe"; Parameters: "/qb"; StatusMsg: "Installing VS2008 SP1 redistributable package (64 Bit)"; Check: IsWin64 - -[Files] - -Source: "readme_installer_vieweronly.txt"; DestDir: "{app}"; Flags: isreadme - -; Installer stub -Source: "vcredist_x86.exe"; DestDir: "{app}\stub\"; Check: not IsWin64 -Source: "vcredist_x64.exe"; DestDir: "{app}\stub\"; Check: IsWin64 - -; Common stuff -Source: "..\..\CREDITS"; DestDir: "{app}" -Source: "..\..\LICENSE"; DestDir: "{app}" -Source: "..\..\README"; DestDir: "{app}" -Source: "WEB"; DestDir: "{app}" - -; x86 binaries -Source: "..\..\bin\assimp_release-dll_Win32\Assimp32.dll"; DestDir: "{app}\bin\x86" -Source: "..\..\bin\assimpview_release-dll_Win32\assimp_view.exe"; DestDir: "{app}\bin\x86" -Source: "D3DCompiler_42.dll"; DestDir: "{app}\bin\x86" -Source: "D3DX9_42.dll"; DestDir: "{app}\bin\x86" -Source: "..\..\bin\assimpcmd_release-dll_Win32\assimp.exe"; DestDir: "{app}\bin\x86" - -; x64 binaries -Source: "..\..\bin\assimp_release-dll_x64\Assimp64.dll"; DestDir: "{app}\bin\x64" -Source: "..\..\bin\assimpview_release-dll_x64\assimp_view.exe"; DestDir: "{app}\bin\x64" -Source: "D3DCompiler_42_x64.dll"; DestDir: "{app}\bin\x64"; DestName: "D3DCompiler_42.dll" -Source: "D3DX9_42_x64.dll"; DestDir: "{app}\bin\x64"; DestName: "D3DX9_42.dll" -Source: "..\..\bin\assimpcmd_release-dll_x64\assimp.exe"; DestDir: "{app}\bin\x64" - -; Documentation -Source: "..\..\doc\AssimpCmdDoc_Html\AssimpCmdDoc.chm"; DestDir: "{app}\doc" - -[Icons] -Name: "{group}\Assimp Command Line Manual"; Filename: "{app}\doc\AssimpCmdDoc.chm" -Name: "{group}\AssimpView"; Filename: "{app}\bin\x64\assimp_view.exe"; Check: IsWin64 -Name: "{group}\AssimpView"; Filename: "{app}\bin\x86\assimp_view.exe"; Check: not IsWin64 diff --git a/thirdparty/assimp/packaging/windows-innosetup/script_x64.iss b/thirdparty/assimp/packaging/windows-innosetup/script_x64.iss deleted file mode 100644 index 4d1b67c..0000000 --- a/thirdparty/assimp/packaging/windows-innosetup/script_x64.iss +++ /dev/null @@ -1,74 +0,0 @@ -; Setup script for use with Inno Setup. - -[Setup] -AppName=Open Asset Import Library - SDK -AppVerName=Open Asset Import Library - SDK (v5.0.0) -DefaultDirName={pf}\Assimp -DefaultGroupName=Assimp -UninstallDisplayIcon={app}\bin\x64\assimp.exe -OutputDir=out -AppCopyright=Assimp Development Team -SetupIconFile=..\..\tools\shared\assimp_tools_icon.ico -WizardImageFile=compiler:WizModernImage-IS.BMP -WizardSmallImageFile=compiler:WizModernSmallImage-IS.BMP -LicenseFile=License.rtf -OutputBaseFileName=assimp-sdk-5.0.0-setup -VersionInfoVersion=5.0.0.0 -VersionInfoTextVersion=5.0.0 -VersionInfoCompany=Assimp Development Team -ArchitecturesInstallIn64BitMode=x64 - -[Types] -Name: "full"; Description: "Full installation" -Name: "compact"; Description: "Compact installation, no test models or language bindings" -Name: "custom"; Description: "Custom installation"; Flags: iscustom - -[Components] -Name: "main"; Description: "Main Files ( 64 Bit )"; Types: full compact custom; Flags: fixed -Name: "tools"; Description: "Asset Viewer & Command Line Tools (32 and 64 Bit)"; Types: full compact -Name: "help"; Description: "Help Files"; Types: full compact -Name: "samples"; Description: "Samples"; Types: full -Name: "test"; Description: "Test Models (BSD-licensed)"; Types: full -Name: "test_nonbsd"; Description: "Test Models (other (free) licenses)"; Types: full - -[Run] -Filename: "{app}\stub\vc_redist.x64.exe"; Parameters: "/qb /passive /quiet"; StatusMsg: "Installing VS2017 redistributable package (64 Bit)"; Check: IsWin64 - -[Files] -Source: "readme_installer.txt"; DestDir: "{app}"; Flags: isreadme - -; Installer stub -Source: "vc_redist.x64.exe"; DestDir: "{app}\stub\"; Check: IsWin64 - -; Common stuff -Source: "..\..\CREDITS"; DestDir: "{app}" -Source: "..\..\LICENSE"; DestDir: "{app}" -Source: "..\..\README"; DestDir: "{app}" -Source: "WEB"; DestDir: "{app}" - -Source: "..\..\scripts\*"; DestDir: "{app}\scripts"; Flags: recursesubdirs - -; x64 binaries -Source: "..\..\bin\release\assimp-vc141-mt.dll"; DestDir: "{app}\bin\x64" -Source: "..\..\bin\release\assimp_viewer.exe"; DestDir: "{app}\bin\x64"; Components: tools -Source: "C:\Windows\SysWOW64\D3DCompiler_42.dll"; DestDir: "{app}\bin\x64"; DestName: "D3DCompiler_42.dll"; Components: tools -Source: "C:\Windows\SysWOW64\D3DX9_42.dll"; DestDir: "{app}\bin\x64"; DestName: "D3DX9_42.dll"; Components: tools -Source: "..\..\bin\release\assimp.exe"; DestDir: "{app}\bin\x64"; Components: tools - -; Import libraries -Source: "..\..\lib\release\assimp-vc141-mt.lib"; DestDir: "{app}\lib\x64" - -; Samples -Source: "..\..\samples\*"; DestDir: "{app}\samples"; Flags: recursesubdirs; Components: samples - -; Include files -Source: "..\..\include\*"; DestDir: "{app}\include"; Flags: recursesubdirs - -; CMake files -Source: "..\..\cmake-modules\*"; DestDir: "{app}\cmake-modules"; Flags: recursesubdirs - -[Icons] -; Name: "{group}\Assimp Manual"; Filename: "{app}\doc\AssimpDoc.chm" ; Components: help -; Name: "{group}\Assimp Command Line Manual"; Filename: "{app}\doc\AssimpCmdDoc.chm"; Components: help -; Name: "{group}\AssimpView"; Filename: "{app}\bin\x64\assimp_view.exe"; Components: tools; Check: IsWin64 -; Name: "{group}\AssimpView"; Filename: "{app}\bin\x86\assimp_view.exe"; Components: tools; Check: not IsWin64 diff --git a/thirdparty/assimp/packaging/windows-innosetup/script_x86.iss b/thirdparty/assimp/packaging/windows-innosetup/script_x86.iss deleted file mode 100644 index d22d23b..0000000 --- a/thirdparty/assimp/packaging/windows-innosetup/script_x86.iss +++ /dev/null @@ -1,75 +0,0 @@ -; Setup script for use with Inno Setup. - -[Setup] -AppName=Open Asset Import Library - SDK -AppVerName=Open Asset Import Library - SDK (v5.0.0) -DefaultDirName={pf}\Assimp -DefaultGroupName=Assimp -UninstallDisplayIcon={app}\bin\x86\assimp.exe -OutputDir=out -AppCopyright=Assimp Development Team -SetupIconFile=..\..\tools\shared\assimp_tools_icon.ico -WizardImageFile=compiler:WizModernImage-IS.BMP -WizardSmallImageFile=compiler:WizModernSmallImage-IS.BMP -LicenseFile=License.rtf -OutputBaseFileName=assimp-sdk-5.0.0-setup -VersionInfoVersion=4.1.0.0 -VersionInfoTextVersion=4.1.0 -VersionInfoCompany=Assimp Development Team -;ArchitecturesInstallIn64BitMode=x64 - -[Types] -Name: "full"; Description: "Full installation" -Name: "compact"; Description: "Compact installation, no test models or language bindings" -Name: "custom"; Description: "Custom installation"; Flags: iscustom - -[Components] -Name: "main"; Description: "Main Files (32 and 64 Bit)"; Types: full compact custom; Flags: fixed -Name: "tools"; Description: "Asset Viewer & Command Line Tools (32 and 64 Bit)"; Types: full compact -Name: "help"; Description: "Help Files"; Types: full compact -Name: "samples"; Description: "Samples"; Types: full -Name: "test"; Description: "Test Models (BSD-licensed)"; Types: full -Name: "test_nonbsd"; Description: "Test Models (other (free) licenses)"; Types: full - -[Run] -Filename: "{app}\stub\vc_redist.x86.exe"; Parameters: "/qb /passive /quiet"; StatusMsg: "Installing VS2017 redistributable package (32 Bit)"; Check: not IsWin64 - -[Files] -Source: "readme_installer.txt"; DestDir: "{app}"; Flags: isreadme - -; Installer stub -Source: "vc_redist.x86.exe"; DestDir: "{app}\stub\"; Check: not IsWin64 - -; Common stuff -Source: "..\..\CREDITS"; DestDir: "{app}" -Source: "..\..\LICENSE"; DestDir: "{app}" -Source: "..\..\README"; DestDir: "{app}" -Source: "WEB"; DestDir: "{app}" - -Source: "..\..\scripts\*"; DestDir: "{app}\scripts"; Flags: recursesubdirs - -; x86 binaries -Source: "..\..\bin\release\assimp-vc141-mt.dll"; DestDir: "{app}\bin\x86" -Source: "..\..\bin\release\assimp_viewer.exe"; DestDir: "{app}\bin\x86"; Components: tools -Source: "C:\Windows\SysWOW64\D3DCompiler_42.dll"; DestDir: "{app}\bin\x86"; Components: tools -Source: "C:\Windows\SysWOW64\D3DX9_42.dll"; DestDir: "{app}\bin\x86"; Components: tools -Source: "..\..\bin\release\assimp.exe"; DestDir: "{app}\bin\x86"; Components: tools - - -; Import libraries -Source: "..\..\lib\release\assimp-vc141-mt.lib"; DestDir: "{app}\lib\x86" - -; Samples -Source: "..\..\samples\*"; DestDir: "{app}\samples"; Flags: recursesubdirs; Components: samples - -; Include files -Source: "..\..\include\*"; DestDir: "{app}\include"; Flags: recursesubdirs - -; CMake files -Source: "..\..\cmake-modules\*"; DestDir: "{app}\cmake-modules"; Flags: recursesubdirs - -[Icons] -; Name: "{group}\Assimp Manual"; Filename: "{app}\doc\AssimpDoc.chm" ; Components: help -; Name: "{group}\Assimp Command Line Manual"; Filename: "{app}\doc\AssimpCmdDoc.chm"; Components: help -; Name: "{group}\AssimpView"; Filename: "{app}\bin\x64\assimp_view.exe"; Components: tools; Check: IsWin64 -; Name: "{group}\AssimpView"; Filename: "{app}\bin\x86\assimp_view.exe"; Components: tools; Check: not IsWin64 diff --git a/thirdparty/assimp/packaging/windows-mkzip/bin_readme.txt b/thirdparty/assimp/packaging/windows-mkzip/bin_readme.txt deleted file mode 100644 index 10839a3..0000000 --- a/thirdparty/assimp/packaging/windows-mkzip/bin_readme.txt +++ /dev/null @@ -1,29 +0,0 @@ - ------------------------------------------------------------------------------------- -Open Asset Import Library (Assimp) Tools/Binaries for Windows -Release Notes ------------------------------------------------------------------------------------- - - -Known Bugs & Limitations -======================== - -Viewer - -- For files more than one embedded texture, only the first is loaded. -- Normals appear flipped from time to time when either of the normals-related menu items was hit. -- Alpha-sorting is implemented, but still causes artifacts when models are moved quickly. -- Several important texture file formats (such as GIF) are not supported. -- HUD is blurred on the right side. ATI/AMD hardware only. - -Troubleshooting -=============== - -1. Missing d3dx9_42.dll? -Install the latest DirectX runtime or grab the file from somewhere (that's evil but mostly fine). - -2. Application configuration not correct / missing msv*** DLLs? -(Re)install Microsoft Visual C++ 2005 SP1 Redistributable (x86 or x64, depending on your system) - -3. Crashes immediately -You CPU lacks SSE2 support. Build Assimp from scratch to suit your CPU, sorry. \ No newline at end of file diff --git a/thirdparty/assimp/packaging/windows-mkzip/mkfinal.bat b/thirdparty/assimp/packaging/windows-mkzip/mkfinal.bat deleted file mode 100644 index b626514..0000000 --- a/thirdparty/assimp/packaging/windows-mkzip/mkfinal.bat +++ /dev/null @@ -1,169 +0,0 @@ - -rem ----------------------------------------------------- -rem Batch file to build zipped redist packages -rem Two different packages are built: -rem -rem assimp---bin.zip -rem Binaries for x86 and x64 -rem Command line reference -rem -rem assimp---sdk.zip -rem Binaries for x86 and x64, Debug & Release -rem Libs for DLL build, x86 & 64, Debug & Release -rem Full SVN checkout exluding mkutil & port -rem -rem -rem PREREQUISITES: -rem -7za.exe (7zip standalone) -rem Download from http://www.7-zip.org/download.html -rem -rem -svnversion.exe (Subversion revision getter) -rem Download any command line SVN package -rem -rem -doxygen.exe (Doxygen client) -rem Download from www.doxygen.com -rem -rem -svn client -rem -rem NOTES: -rem ./bin must not have any local modifications -rem -rem ----------------------------------------------------- - -@echo off -color 4e -cls - -rem ----------------------------------------------------- -rem Setup file revision for build -rem ----------------------------------------------------- -call mkrev.bat - -rem ----------------------------------------------------- -rem Build output file names -rem ----------------------------------------------------- - -cd ..\..\bin -svnversion > tmpfile.txt -SET /p REVISIONBASE= < tmpfile.txt -DEL /q tmpfile.txt -cd ..\packaging\windows-mkzip - -SET VERSIONBASE=2.0.%REVISIONBASE% - -SET OUT_SDK=assimp--%VERSIONBASE%-sdk -SET OUT_BIN=assimp--%VERSIONBASE%-bin - -SET BINCFG_x86=release-dll_win32 -SET BINCFG_x64=release-dll_x64 - -SET BINCFG_x86_DEBUG=debug-dll_win32 -SET BINCFG_x64_DEBUG=debug-dll_x64 - -rem ----------------------------------------------------- -rem Delete previous output directories -rem ----------------------------------------------------- -RD /S /q final\ - -rem ----------------------------------------------------- -rem Create output directories -rem ----------------------------------------------------- - -mkdir final\%OUT_BIN%\x86 -mkdir final\%OUT_BIN%\x64 - -rem ----------------------------------------------------- -rem Copy all executables to 'final-bin' -rem ----------------------------------------------------- - -copy /Y ..\..\bin\assimpview_%BINCFG_x86%\assimp_view.exe "final\%OUT_BIN%\x86\assimp_view.exe" -copy /Y ..\..\bin\assimpview_%BINCFG_x64%\assimp_view.exe "final\%OUT_BIN%\x64\assimp_view.exe" - -copy /Y ..\..\bin\assimpcmd_%BINCFG_x86%\assimp.exe "final\%OUT_BIN%\x86\assimp.exe" -copy /Y ..\..\bin\assimpcmd_%BINCFG_x64%\assimp.exe "final\%OUT_BIN%\x64\assimp.exe" - -copy /Y ..\..\bin\assimp_%BINCFG_x86%\Assimp32.dll "final\%OUT_BIN%\x86\Assimp32.dll" -copy /Y ..\..\bin\assimp_%BINCFG_x64%\Assimp64.dll "final\%OUT_BIN%\x64\Assimp64.dll" - -copy ..\..\LICENSE final\%OUT_BIN%\LICENSE -copy ..\..\CREDITS final\%OUT_BIN%\CREDITS -copy bin_readme.txt final\%OUT_BIN%\README -copy bin_readme.txt final\%OUT_BIN%\README - -copy ..\..\doc\AssimpCmdDoc_Html\AssimpCmdDoc.chm final\%OUT_BIN%\CommandLine.chm - -rem ----------------------------------------------------- -rem Do a clean export of the repository and build SDK -rem -rem We take the current revision and remove some stuff -rem that is nto yet ready to be published. -rem ----------------------------------------------------- - -svn export .\..\..\ .\final\%OUT_SDK% - -mkdir final\%OUT_SDK%\doc\assimp_html -mkdir final\%OUT_SDK%\doc\assimpcmd_html -copy .\..\..\doc\AssimpDoc_Html\* final\%OUT_SDK%\doc\assimp_html -copy .\..\..\doc\AssimpCmdDoc_Html\* final\%OUT_SDK%\doc\assimpcmd_html -del final\%OUT_SDK%\doc\assimpcmd_html\AssimpCmdDoc.chm -del final\%OUT_SDK%\doc\assimp_html\AssimpDoc.chm - -rem Copy doc to a suitable place -move final\%OUT_SDK%\doc\AssimpDoc_Html\AssimpDoc.chm final\%OUT_SDK%\Documentation.chm -move final\%OUT_SDK%\doc\AssimpCmdDoc_Html\AssimpCmdDoc.chm final\%OUT_SDK%\CommandLine.chm - -rem Cleanup ./doc folder -del /q final\%OUT_SDK%\doc\Preamble.txt -RD /s /q final\%OUT_SDK%\doc\AssimpDoc_Html -RD /s /q final\%OUT_SDK%\doc\AssimpCmdDoc_Html - -rem Insert 'dummy' files into empty folders -echo. > final\%OUT_SDK%\lib\dummy -echo. > final\%OUT_SDK%\obj\dummy - - -RD /s /q final\%OUT_SDK%\port\swig - -rem Also, repackaging is not a must-have feature -RD /s /q final\%OUT_SDK%\packaging - -rem Copy prebuilt libs -mkdir "final\%OUT_SDK%\lib\assimp_%BINCFG_x86%" -mkdir "final\%OUT_SDK%\lib\assimp_%BINCFG_x64%" -mkdir "final\%OUT_SDK%\lib\assimp_%BINCFG_x86_DEBUG%" -mkdir "final\%OUT_SDK%\lib\assimp_%BINCFG_x64_DEBUG%" - -copy /Y ..\..\lib\assimp_%BINCFG_x86%\assimp.lib "final\%OUT_SDK%\lib\assimp_%BINCFG_x86%" -copy /Y ..\..\lib\assimp_%BINCFG_x64%\assimp.lib "final\%OUT_SDK%\lib\assimp_%BINCFG_x64%\" -copy /Y ..\..\lib\assimp_%BINCFG_x86_DEBUG%\assimp.lib "final\%OUT_SDK%\lib\assimp_%BINCFG_x86_DEBUG%\" -copy /Y ..\..\lib\assimp_%BINCFG_x64_DEBUG%\assimp.lib "final\%OUT_SDK%\lib\assimp_%BINCFG_x64_DEBUG%\" - -rem Copy prebuilt DLLs -mkdir "final\%OUT_SDK%\bin\assimp_%BINCFG_x86%" -mkdir "final\%OUT_SDK%\bin\assimp_%BINCFG_x64%" -mkdir "final\%OUT_SDK%\bin\assimp_%BINCFG_x86_DEBUG%" -mkdir "final\%OUT_SDK%\bin\assimp_%BINCFG_x64_DEBUG%" - - -copy /Y ..\..\bin\assimp_%BINCFG_x86%\Assimp32.dll "final\%OUT_SDK%\bin\assimp_%BINCFG_x86%\" -copy /Y ..\..\bin\assimp_%BINCFG_x64%\Assimp64.dll "final\%OUT_SDK%\bin\assimp_%BINCFG_x64%\" -copy /Y ..\..\bin\assimp_%BINCFG_x86_DEBUG%\Assimp32d.dll "final\%OUT_SDK%\bin\assimp_%BINCFG_x86_DEBUG%\" -copy /Y ..\..\bin\assimp_%BINCFG_x64_DEBUG%\Assimp64d.dll "final\%OUT_SDK%\bin\assimp_%BINCFG_x64_DEBUG%\" - - -rem ----------------------------------------------------- -rem Make final-bin.zip and final-sdk.zip -rem ----------------------------------------------------- - -IF NOT EXIST 7za.exe ( - cls - echo You need to have 7zip standalone installed to - echo build ZIP archives. Download: http://www.7-zip.org/download.html - pause -) else ( -7za.exe a -tzip "final\%OUT_BIN%.zip" ".\final\%OUT_BIN%" -7za.exe a -tzip "final\%OUT_SDK%.zip" ".\final\%OUT_SDK%" -) - -rem OK. We should have the release packages now. - diff --git a/thirdparty/assimp/packaging/windows-mkzip/mkrev.bat b/thirdparty/assimp/packaging/windows-mkzip/mkrev.bat deleted file mode 100644 index 9d8eec1..0000000 --- a/thirdparty/assimp/packaging/windows-mkzip/mkrev.bat +++ /dev/null @@ -1,27 +0,0 @@ -@echo off - -rem ----------------------------------------------------- -rem Tiny batch script to build the input file revision.h -rem revision.h contains the revision number of the wc. -rem It is included by assimp.rc. -rem ----------------------------------------------------- - -rem This is not very elegant, but it works. -rem ./bin shouldn't have any local modifications - -svnversion > tmpfile.txt -set /p addtext= < tmpfile.txt -del /q tmpfile.txt - -echo #define SVNRevision > tmpfile.txt - -if exist ..\..\revision.h del /q ..\..\revision.h -for /f "delims=" %%l in (tmpfile.txt) Do ( - for /f "delims=M:" %%r in ("%addtext%") Do ( - echo %%l %%r >> ..\..\revision.h - ) -) -del /q tmpfile.txt - - - diff --git a/thirdparty/assimp/port/AndroidJNI/AndroidJNIIOSystem.cpp b/thirdparty/assimp/port/AndroidJNI/AndroidJNIIOSystem.cpp deleted file mode 100644 index e276ea5..0000000 --- a/thirdparty/assimp/port/AndroidJNI/AndroidJNIIOSystem.cpp +++ /dev/null @@ -1,207 +0,0 @@ -/* ---------------------------------------------------------------------------- -Open Asset Import Library (assimp) ---------------------------------------------------------------------------- - -Copyright (c) 2006-2016, 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 Android extension of DefaultIOSystem using the standard C file functions */ - - -#include -#include -#if __ANDROID__ and __ANDROID_API__ > 9 and defined(AI_CONFIG_ANDROID_JNI_ASSIMP_MANAGER_SUPPORT) - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace Assimp; - -// ------------------------------------------------------------------------------------------------ -// Constructor. -AndroidJNIIOSystem::AndroidJNIIOSystem(ANativeActivity* activity) -{ - AndroidActivityInit(activity); -} - -// ------------------------------------------------------------------------------------------------ -// Destructor. -AndroidJNIIOSystem::~AndroidJNIIOSystem() -{ - // nothing to do here -} - -// ------------------------------------------------------------------------------------------------ -// Tests for the existence of a file at the given path. -bool AndroidJNIIOSystem::Exists( const char* pFile) const -{ - AAsset* asset = AAssetManager_open(mApkAssetManager, pFile, - AASSET_MODE_UNKNOWN); - FILE* file = ::fopen( (mApkWorkspacePath + getOsSeparator() + std::string(pFile)).c_str(), "rb"); - - if (!asset && !file) - { - __android_log_print(ANDROID_LOG_ERROR, "Assimp", "Asset manager can not find: %s", pFile); - return false; - } - - __android_log_print(ANDROID_LOG_ERROR, "Assimp", "Asset exists"); - if (file) - ::fclose( file); - return true; -} - -// ------------------------------------------------------------------------------------------------ -// Inits Android extractor -void AndroidJNIIOSystem::AndroidActivityInit(ANativeActivity* activity) -{ - mApkWorkspacePath = activity->internalDataPath; - mApkAssetManager = activity->assetManager; -} - -// ------------------------------------------------------------------------------------------------ -// Create the directory for the extracted resource -static int mkpath(std::string path, mode_t mode) -{ - if (mkdir(path.c_str(), mode) == -1) { - switch(errno) { - case ENOENT: - if (mkpath(path.substr(0, path.find_last_of('/')), mode) == -1) - return -1; - else - return mkdir(path.c_str(), mode); - case EEXIST: - return 0; - default: - return -1; - } - } - - return 0; -} - -// ------------------------------------------------------------------------------------------------ -// Extracts android asset -bool AndroidJNIIOSystem::AndroidExtractAsset(std::string name) -{ - std::string newPath = mApkWorkspacePath + getOsSeparator() + name; - - DefaultIOSystem io; - - // Do not extract if extracted already - if ( io.Exists(newPath.c_str()) ) { - __android_log_print(ANDROID_LOG_DEFAULT, "Assimp", "Asset already extracted"); - return true; - } - // Open file - AAsset* asset = AAssetManager_open(mApkAssetManager, name.c_str(), - AASSET_MODE_UNKNOWN); - std::vector assetContent; - - if (asset != NULL) { - // Find size - off_t assetSize = AAsset_getLength(asset); - - // Prepare input buffer - assetContent.resize(assetSize); - - // Store input buffer - AAsset_read(asset, &assetContent[0], assetSize); - - // Close - AAsset_close(asset); - - // Prepare directory for output buffer - std::string directoryNewPath = newPath; - directoryNewPath = dirname(&directoryNewPath[0]); - - if (mkpath(directoryNewPath, S_IRUSR | S_IWUSR | S_IXUSR) == -1) { - __android_log_print(ANDROID_LOG_ERROR, "assimp", - "Can not create the directory for the output file"); - } - - // Prepare output buffer - std::ofstream assetExtracted(newPath.c_str(), - std::ios::out | std::ios::binary); - if (!assetExtracted) { - __android_log_print(ANDROID_LOG_ERROR, "assimp", - "Can not open output file"); - } - - // Write output buffer into a file - assetExtracted.write(&assetContent[0], assetContent.size()); - assetExtracted.close(); - - __android_log_print(ANDROID_LOG_DEFAULT, "Assimp", "Asset extracted"); - } else { - __android_log_print(ANDROID_LOG_ERROR, "assimp", "Asset not found: %s", name.c_str()); - return false; - } - return true; -} - -// ------------------------------------------------------------------------------------------------ -// Open a new file with a given path. -IOStream* AndroidJNIIOSystem::Open( const char* strFile, const char* strMode) -{ - ai_assert(NULL != strFile); - ai_assert(NULL != strMode); - - std::string fullPath(mApkWorkspacePath + getOsSeparator() + std::string(strFile)); - if (Exists(strFile)) - AndroidExtractAsset(std::string(strFile)); - - FILE* file = ::fopen( fullPath.c_str(), strMode); - - if( NULL == file) - return NULL; - - __android_log_print(ANDROID_LOG_ERROR, "assimp", "AndroidIOSystem: file %s opened", fullPath.c_str()); - return new DefaultIOStream(file, fullPath); -} - -#undef PATHLIMIT -#endif // __ANDROID__ and __ANDROID_API__ > 9 and defined(AI_CONFIG_ANDROID_JNI_ASSIMP_MANAGER_SUPPORT) diff --git a/thirdparty/assimp/port/AndroidJNI/CMakeLists.txt b/thirdparty/assimp/port/AndroidJNI/CMakeLists.txt deleted file mode 100644 index ddc7188..0000000 --- a/thirdparty/assimp/port/AndroidJNI/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -cmake_minimum_required(VERSION 2.8) - -include_directories(./) -include_directories(./../../) -add_library(android_jniiosystem STATIC AndroidJNIIOSystem.cpp) -TARGET_LINK_LIBRARIES(android_jniiosystem android log) diff --git a/thirdparty/assimp/port/AndroidJNI/README.md b/thirdparty/assimp/port/AndroidJNI/README.md deleted file mode 100644 index 0b95efd..0000000 --- a/thirdparty/assimp/port/AndroidJNI/README.md +++ /dev/null @@ -1,27 +0,0 @@ -Build Asset Importer Lib for Android -==================================== -This module provides a facade for the io-stream-access to files behind the android-asset-management within -an Android-native application. -- It is built as a static library -- It requires Android NDK with android API > 9 support. - -### Building ### -To use this module please provide following cmake defines: -``` --DASSIMP_ANDROID_JNIIOSYSTEM=ON --DCMAKE_TOOLCHAIN_FILE=$SOME_PATH/android.toolchain.cmake -``` - -"SOME_PATH" is a path to your cmake android toolchain script. - -### Code ### -A small example how to wrap assimp for Android: -```cpp -#include - -Assimp::Importer* importer = new Assimp::Importer(); -Assimp::AndroidJNIIOSystem *ioSystem = new Assimp::AndroidJNIIOSystem(app->activity); -if ( nullptr != iosSystem ) { - importer->SetIOHandler(ioSystem); -} -``` diff --git a/thirdparty/assimp/port/AssimpDelphi/Readme.txt b/thirdparty/assimp/port/AssimpDelphi/Readme.txt deleted file mode 100644 index 07d6935..0000000 --- a/thirdparty/assimp/port/AssimpDelphi/Readme.txt +++ /dev/null @@ -1,6 +0,0 @@ -This is a set of Delphi units for using the Assimp C DLL. This was created for use with Delphi 7, but should be usable as-is or with minimal modifications with later Delphi versions. - -This set of headers is enough to load and display a model with external textures. Since I'm not familiar with animated models and some of the other functionality of the assimp library, I did not convert the headers for those features. - -See http://sourceforge.net/tracker/?func=detail&aid=3212646&group_id=226462&atid=1067634 for the original patch - diff --git a/thirdparty/assimp/port/AssimpDelphi/aiColor4D.pas b/thirdparty/assimp/port/AssimpDelphi/aiColor4D.pas deleted file mode 100644 index 0bc5d2a..0000000 --- a/thirdparty/assimp/port/AssimpDelphi/aiColor4D.pas +++ /dev/null @@ -1,17 +0,0 @@ -unit aiColor4D; - -interface - -const AI_MAX_NUMBER_OF_COLOR_SETS = $04; - -type TaiColor4D = packed record - r, g, b, a: single; -end; -type PaiColor4D = ^TaiColor4D; - -type TaiColor4DArray = array[0..0] of TaiColor4D; -type PTaiColor4DArray = ^TaiColor4DArray; - -implementation - -end. diff --git a/thirdparty/assimp/port/AssimpDelphi/aiMaterial.pas b/thirdparty/assimp/port/AssimpDelphi/aiMaterial.pas deleted file mode 100644 index ffd8109..0000000 --- a/thirdparty/assimp/port/AssimpDelphi/aiMaterial.pas +++ /dev/null @@ -1,153 +0,0 @@ -unit aiMaterial; - -interface - -uses aiTypes, aiVector2D, aiVector3D; - -{This following directive causes enums to be stored as double words (32bit), to be compatible with - the assimp C Dll} -{$Z4} - -type TaiTextureOp = ( - aiTextureOp_Multiply = $0, - aiTextureOp_Add = $1, - aiTextureOp_Subtract = $2, - aiTextureOp_Divide = $3, - aiTextureOp_SmoothAdd = $4, - aiTextureOp_SignedAdd = $5 - //_aiTextureOp_Force32Bit = 0x9fffffff -); - -type TaiTextureMapMode = ( - aiTextureMapMode_Wrap = $0, - aiTextureMapMode_Clamp = $1, - aiTextureMapMode_Decal = $3, - aiTextureMapMode_Mirror = $2 - //_aiTextureMapMode_Force32Bit = 0x9fffffff -); - -type TaiTextureMapping = ( - aiTextureMapping_UV = $0, - aiTextureMapping_SPHERE = $1, - aiTextureMapping_CYLINDER = $2, - aiTextureMapping_BOX = $3, - aiTextureMapping_PLANE = $4, - aiTextureMapping_OTHER = $5 - //_aiTextureMapping_Force32Bit = 0x9fffffff -); - -type TaiTextureType = ( - aiTextureType_NONE = $0, - aiTextureType_DIFFUSE = $1, - aiTextureType_SPECULAR = $2, - aiTextureType_AMBIENT = $3, - aiTextureType_EMISSIVE = $4, - aiTextureType_HEIGHT = $5, - aiTextureType_NORMALS = $6, - aiTextureType_SHININESS = $7, - aiTextureType_OPACITY = $8, - aiTextureType_DISPLACEMENT = $9, - aiTextureType_LIGHTMAP = $A, - aiTextureType_REFLECTION = $B, - aiTextureType_UNKNOWN = $C - //_aiTextureType_Force32Bit = 0x9fffffff -); - -const AI_TEXTURE_TYPE_MAX = aiTextureType_UNKNOWN; - -type TaiShadingMode = ( - aiShadingMode_Flat = $1, - aiShadingMode_Gouraud = $2, - aiShadingMode_Phong = $3, - aiShadingMode_Blinn = $4, - aiShadingMode_Toon = $5, - aiShadingMode_OrenNayar = $6, - aiShadingMode_Minnaert = $7, - aiShadingMode_CookTorrance = $8, - aiShadingMode_NoShading = $9, - aiShadingMode_Fresnel = $A - //_aiShadingMode_Force32Bit = 0x9fffffff -); - - -type TaiTextureFlags = ( - aiTextureFlags_Invert = $1, - aiTextureFlags_UseAlpha = $2, - aiTextureFlags_IgnoreAlpha = $4 - //_aiTextureFlags_Force32Bit = 0x9fffffff -); - -type TaiBlendMode = ( - aiBlendMode_Default = $0, - aiBlendMode_Additive = $1 - //_aiBlendMode_Force32Bit = 0x9fffffff -); - -type TaiUVTransform = packed record - mTranslation: TaiVector2D; - mScaling: TaiVector2D; - mRotation: single; -end; - -type TaiPropertyTypeInfo = ( - aiPTI_Float = $1, - aiPTI_String = $3, - aiPTI_Integer = $4, - aiPTI_Buffer = $5 - // _aiPTI_Force32Bit = 0x9fffffff -); - -type TaiMaterialProperty = packed record - mKey: aiString; - mSemantic: Cardinal; - mIndex: Cardinal; - mDataLength: Cardinal; - mType: TaiPropertyTypeInfo; - mData: PChar; -end; -type PaiMaterialProperty = ^TaiMaterialProperty; - -type TaiMaterial = packed record - mProperties: pointer; - mNumProperties: Cardinal; - mNumAllocated: Cardinal; -end; -type PaiMaterial = ^TaiMaterial; -type PaiMaterialArray = array[0..0] of PaiMaterial; -type PPaiMaterialArray = ^PaiMaterialArray; - -const AI_MATKEY_NAME = '?mat.name'; -const AI_MATKEY_TWOSIDED = '$mat.twosided'; -const AI_MATKEY_SHADING_MODEL = '$mat.shadingm'; -const AI_MATKEY_ENABLE_WIREFRAME = '$mat.wireframe'; -const AI_MATKEY_BLEND_FUNC = '$mat.blend'; -const AI_MATKEY_OPACITY = '$mat.opacity'; -const AI_MATKEY_BUMPSCALING = '$mat.bumpscaling'; -const AI_MATKEY_SHININESS = '$mat.shininess'; -const AI_MATKEY_REFLECTIVITY = '$mat.reflectivity'; -const AI_MATKEY_SHININESS_STRENGTH = '$mat.shinpercent'; -const AI_MATKEY_REFRACTI = '$mat.refracti'; -const AI_MATKEY_COLOR_DIFFUSE = '$clr.diffuse'; -const AI_MATKEY_COLOR_AMBIENT = '$clr.ambient'; -const AI_MATKEY_COLOR_SPECULAR = '$clr.specular'; -const AI_MATKEY_COLOR_EMISSIVE = '$clr.emissive'; -const AI_MATKEY_COLOR_TRANSPARENT = '$clr.transparent'; -const AI_MATKEY_COLOR_REFLECTIVE = '$clr.reflective'; -const AI_MATKEY_GLOBAL_BACKGROUND_IMAGE = '?bg.global'; - -const _AI_MATKEY_TEXTURE_BASE = '$tex.file'; -const _AI_MATKEY_UVWSRC_BASE = '$tex.uvwsrc'; -const _AI_MATKEY_TEXOP_BASE = '$tex.op'; -const _AI_MATKEY_MAPPING_BASE = '$tex.mapping'; -const _AI_MATKEY_TEXBLEND_BASE = '$tex.blend'; -const _AI_MATKEY_MAPPINGMODE_U_BASE = '$tex.mapmodeu'; -const _AI_MATKEY_MAPPINGMODE_V_BASE = '$tex.mapmodev'; -const _AI_MATKEY_TEXMAP_AXIS_BASE = '$tex.mapaxis'; -const _AI_MATKEY_UVTRANSFORM_BASE = '$tex.uvtrafo'; -const _AI_MATKEY_TEXFLAGS_BASE = '$tex.flags'; - - - -implementation - -end. diff --git a/thirdparty/assimp/port/AssimpDelphi/aiMatrix3x3.pas b/thirdparty/assimp/port/AssimpDelphi/aiMatrix3x3.pas deleted file mode 100644 index a90f11f..0000000 --- a/thirdparty/assimp/port/AssimpDelphi/aiMatrix3x3.pas +++ /dev/null @@ -1,16 +0,0 @@ -unit aiMatrix3x3; - -interface - -type TaiMatrix3x3 = packed record - a1, a2, a3, a4: single; - b1, b2, b3, b4: single; - c1, c2, c3, c4: single; -end; -PaiMatrix3x3 = ^TaiMatrix3x3; - - - -implementation - -end. diff --git a/thirdparty/assimp/port/AssimpDelphi/aiMatrix4x4.pas b/thirdparty/assimp/port/AssimpDelphi/aiMatrix4x4.pas deleted file mode 100644 index 45e0faf..0000000 --- a/thirdparty/assimp/port/AssimpDelphi/aiMatrix4x4.pas +++ /dev/null @@ -1,16 +0,0 @@ -unit aiMatrix4x4; - -interface - -type TaiMatrix4x4 = packed record - a1, a2, a3, a4: single; - b1, b2, b3, b4: single; - c1, c2, c3, c4: single; - d1, d2, d3, d4: single; -end; -PaiMatrix4x4 = ^TaiMatrix4x4; - - -implementation - -end. diff --git a/thirdparty/assimp/port/AssimpDelphi/aiMesh.pas b/thirdparty/assimp/port/AssimpDelphi/aiMesh.pas deleted file mode 100644 index a05a0f2..0000000 --- a/thirdparty/assimp/port/AssimpDelphi/aiMesh.pas +++ /dev/null @@ -1,71 +0,0 @@ -unit aiMesh; - -interface - -uses aiTypes, aiMatrix4x4, aiVector3D, aiColor4D; - -const - AI_MAX_NUMBER_OF_COLOR_SETS = $4; - AI_MAX_NUMBER_OF_TEXTURECOORDS = $4; - -type TaiFace = packed record - mNumIndicies: cardinal; - mIndices: PCardinalArray; -end; -type PaiFace = ^TaiFace; -type PaiFaceArray = array [0..0] of PaiFace; - -type TaiFaceArray = array [0..0] of TaiFace; -type PTaiFaceArray = ^TaiFaceArray; - -type TaiVertexWeight = packed record - mVertexId: cardinal; - mWeight: single; -end; - -type TaiBone = packed record - mName: aiString; - mNumWeights: cardinal; - mWeights: Pointer; - mOffsetMatrix: TaiMatrix4x4; -end; -type PaiBone = ^TaiBone; - -type TaiPrimitiveType = - ( - aiPrimitiveType_POINT = $1, - aiPrimitiveType_LINE = $2, - aiPrimitiveType_TRIANGLE = $4, - aiPrimitiveType_POLYGON = $8 - //,_aiPrimitiveType_Force32Bit = $9fffffff - ); - -type TaiMesh = packed record - mPrimitiveTypes: cardinal; - mNumVertices: cardinal; - mNumFaces: cardinal; - mVertices: PTaiVector3DArray; - mNormals: PTaiVector3DArray; - mTangents: PaiVector3DArray; - mBitangents: PaiVector3DArray; - mColors: array[0..3] of PTaiColor4Darray; //array [0..3] of PaiColor4DArray; //array of 4 - mTextureCoords: array [0..3] of PTaiVector3DArray; //array of 4 - mNumUVComponents: array[0..AI_MAX_NUMBER_OF_TEXTURECOORDS -1] of cardinal; - mFaces: PTaiFaceArray; - mNumBones: cardinal; - mBones: PaiBone; - mMaterialIndex: cardinal; - mName: aiString; - mNumAniMeshes: cardinal; - mAniMeshes: pointer; -end; -type PaiMesh = ^TaiMesh; -type PPaiMesh = ^PaiMesh; -type PaiMeshArray = array [0..0] of PaiMesh; -type PPaiMeshArray = ^PaiMeshArray; - - - -implementation - -end. diff --git a/thirdparty/assimp/port/AssimpDelphi/aiQuaternion.pas b/thirdparty/assimp/port/AssimpDelphi/aiQuaternion.pas deleted file mode 100644 index d5550de..0000000 --- a/thirdparty/assimp/port/AssimpDelphi/aiQuaternion.pas +++ /dev/null @@ -1,12 +0,0 @@ -unit aiQuaternion; - -interface - -type TaiQuaternion = packed record - w, x, y, z: single; -end; -type PaiQuaternion = ^TaiQuaternion; - -implementation - -end. diff --git a/thirdparty/assimp/port/AssimpDelphi/aiScene.pas b/thirdparty/assimp/port/AssimpDelphi/aiScene.pas deleted file mode 100644 index 28cebf1..0000000 --- a/thirdparty/assimp/port/AssimpDelphi/aiScene.pas +++ /dev/null @@ -1,46 +0,0 @@ -unit aiScene; - -interface - -uses aiTypes, aiMatrix4x4, aiMesh, aiMaterial, aiTexture; - - -type - PaiNode = ^TaiNode; - PPaiNode = ^PaiNode; - PaiNodeArray = array[0..0] of PaiNode; - PPaiNodeArray = ^PaiNodeArray; - - TaiNode = packed record - mName: aiString; - mTransformation: TaiMatrix4x4; - mParent: PPaiNode; - mNumChildren: cardinal; - mChildren: PPaiNodeArray; - mNumMeshes: cardinal; - mMeshes: PCardinalArray; - end; - - - -type TaiScene = packed record - mFlags: cardinal; - mRootNode: PaiNode; - mNumMeshes: Cardinal; - mMeshes: PPaiMeshArray; //? - mNumMaterials: Cardinal; - mMaterials: PPaiMaterialArray; - mNumAnimations: Cardinal; - mAnimations: Pointer; - mNumTextures: Cardinal; - mTextures: PPaiTextureArray; - mNumLights: Cardinal; - mLights: Pointer; - mNumCameras: Cardinal; - mCameras: Pointer; -end; -type PaiScene = ^TaiScene; - -implementation - -end. diff --git a/thirdparty/assimp/port/AssimpDelphi/aiTexture.pas b/thirdparty/assimp/port/AssimpDelphi/aiTexture.pas deleted file mode 100644 index 55e246f..0000000 --- a/thirdparty/assimp/port/AssimpDelphi/aiTexture.pas +++ /dev/null @@ -1,26 +0,0 @@ -unit aiTexture; - -interface - -type TaiTexel = packed record - b, g, r, a: byte; -end; -PaiTexel = ^TaiTexel; -TaiTexelArray = array[0..0] of TaiTexel; -PaiTexelArray = ^TaiTexelArray; - -type TaiTexture = packed record - mWidth: Cardinal; //width in pixels, OR total embedded file size if texture is a jpg/png/etc - mHeight: Cardinal; //0 if texture is an embedded file - achFormatHint: array[0..3] of byte; - pcData: PaiTexelArray; -end; -PaiTexture = ^TaiTexture; -PaiTextureArray = array [0..0] of PaiTexture; -PPaiTextureArray = ^PaiTextureArray; - - - -implementation - -end. diff --git a/thirdparty/assimp/port/AssimpDelphi/aiTypes.pas b/thirdparty/assimp/port/AssimpDelphi/aiTypes.pas deleted file mode 100644 index b7924e8..0000000 --- a/thirdparty/assimp/port/AssimpDelphi/aiTypes.pas +++ /dev/null @@ -1,53 +0,0 @@ -unit aiTypes; - -interface - -//added for Delphi interface -type - TCardinalArray = array [0..0] of Cardinal; - PCardinalArray = ^TCardinalArray; - - TSingleArray = array[0..0] of Single; - PSingleArray = ^TSingleArray; - -type aiString = packed record - length: Cardinal; - data: array [0..1023] of char; -end; -type PaiString = ^aiString; - -type aiReturn = ( - aiReturn_SUCCESS = $0, - aiReturn_FAILURE = -$1, - aiReturn_OUTOFMEMORY = -$3, - _AI_ENFORCE_ENUM_SIZE = $7fffffff -); - -const AI_SUCCESS = aiReturn_SUCCESS; -const AI_FAILURE = aiReturn_FAILURE; -const AI_OUTOFMEMORY = aiReturn_OUTOFMEMORY; - - - - -function aiStringToDelphiString( a: aiString): AnsiString; - - -implementation - -function aiStringToDelphiString( a: aiString): AnsiString; -var - i: integer; -begin - result := ''; - if a.length > 0 then - begin - SetLength( result, a.length); - for i := 1 to a.length do - begin - result[i] := a.data[i-1]; - end; - end; -end; - -end. diff --git a/thirdparty/assimp/port/AssimpDelphi/aiVector2D.pas b/thirdparty/assimp/port/AssimpDelphi/aiVector2D.pas deleted file mode 100644 index 1e88209..0000000 --- a/thirdparty/assimp/port/AssimpDelphi/aiVector2D.pas +++ /dev/null @@ -1,13 +0,0 @@ -unit aiVector2D; - -interface - -type TaiVector2D = packed record - x, y: single; -end; -type PaiVector2D = ^TaiVector2D; - - -implementation - -end. diff --git a/thirdparty/assimp/port/AssimpDelphi/aiVector3D.pas b/thirdparty/assimp/port/AssimpDelphi/aiVector3D.pas deleted file mode 100644 index 2081bb4..0000000 --- a/thirdparty/assimp/port/AssimpDelphi/aiVector3D.pas +++ /dev/null @@ -1,16 +0,0 @@ -unit aiVector3D; - -interface - -type TaiVector3D = packed record - x, y, z: single; -end; -type PaiVector3D = ^TaiVector3D; -type PaiVector3DArray = array [0..0] of PaiVector3D; - -type TaiVector3DArray = array[0..0] of TaiVector3D; -type PTaiVector3DArray = ^TaiVector3DArray; - -implementation - -end. diff --git a/thirdparty/assimp/port/AssimpDelphi/assimp.pas b/thirdparty/assimp/port/AssimpDelphi/assimp.pas deleted file mode 100644 index d5bf31d..0000000 --- a/thirdparty/assimp/port/AssimpDelphi/assimp.pas +++ /dev/null @@ -1,58 +0,0 @@ -unit assimp; - -interface - -uses aiTypes, aiMatrix4x4, aiMatrix3x3, aiMesh, aiScene, aiMaterial, aiColor4d, aiVector3D; - -const ASSIMP_DLL = 'assimp32.dll'; - -function aiImportFile(filename: pchar; pFlags: integer): PaiScene; cdecl; external ASSIMP_DLL; -procedure aiReleaseImport( pScene: pointer); cdecl; external ASSIMP_DLL; -function aiGetErrorString(): PChar; cdecl; external ASSIMP_DLL; - -//procedure aiDecomposeMatrix( var mat: TaiMatrix4x4; var scaling: TaiVector3D; var rotation: TaiQuaternion; var position: TaiVector3D); cdecl; external ASSIMP_DLL; -procedure aiTransposeMatrix4( var mat: TaiMatrix4x4); cdecl; external ASSIMP_DLL; -procedure aiTransposeMatrix3( var mat: TaiMatrix3x3); cdecl; external ASSIMP_DLL; -procedure aiTransformVecByMatrix3( var vec: TaiVector3D; var mat: TaiMatrix3x3); cdecl; external ASSIMP_DLL; -procedure aiTransformVecByMatrix4( var vec: TaiVector3D; var mat: TaiMatrix4x4); cdecl; external ASSIMP_DLL; - -procedure aiMultiplyMatrix4(var dst: TaiMatrix4x4; var src: TaiMatrix4x4); cdecl; external ASSIMP_DLL; -procedure aiMultiplyMatrix3(var dst: TaiMatrix3x3; var src: TaiMatrix3x3); cdecl; external ASSIMP_DLL; - - -procedure aiIdentityMatrix3(var mat: TaiMatrix3x3); cdecl; external ASSIMP_DLL; -procedure aiIdentityMatrix4(var mat: TaiMatrix4x4); cdecl; external ASSIMP_DLL; - - -//----- from aiMaterial.h -function aiGetMaterialProperty( pMat: PaiMaterial; pKey: PChar; nType: Cardinal; nIndex: Cardinal; pPropOut: pointer): aiReturn; cdecl; external ASSIMP_DLL; -function aiGetMaterialFloatArray( var pMat: TaiMaterial; pKey: PChar; nType: Cardinal; nIndex: Cardinal; var pOut: Single; var pMax: Cardinal): aiReturn; cdecl; external ASSIMP_DLL; -function aiGetMaterialFloat( var pMat: TaiMaterial; pKey: PChar; nType: Cardinal; nIndex: Cardinal; var pOut: Single): aiReturn; -function aiGetMaterialIntegerArray(var pMat: TaiMaterial; pKey: PChar; nType: Cardinal; nIndex: Cardinal; var pOut: Integer; var pMax: Cardinal): aiReturn; cdecl; external ASSIMP_DLL; -function aiGetMaterialInteger(var pMat: TaiMaterial; pKey: PChar; nType: Cardinal; nIndex: Cardinal; var pOut: Integer): aiReturn; -function aiGetMaterialColor(var pMat: TaiMaterial; pKey: PChar; nType: Cardinal; nIndex: Cardinal; var pOut: TaiColor4d): aiReturn; cdecl; external ASSIMP_DLL; -function aiGetMaterialString(var pMat: TaiMaterial; pKey: PChar; nType: Cardinal; nIndex: Cardinal; var pOut: aiString): aiReturn; cdecl; external ASSIMP_DLL; -function aiGetMaterialTextureCount(var pMat: TaiMaterial; nType: TaiTextureType): Cardinal; cdecl; external ASSIMP_DLL; -function aiGetMaterialTexture(var mat: TaiMaterial; nType: TaiTextureType; nIndex: Cardinal; var path: aiString; var mapping: TaiTextureMapping; var uvindex: Cardinal; var blend: single; var op: TaiTextureOp; var mapmode: TaiTextureMapMode; var flags: Cardinal): aiReturn; cdecl; external ASSIMP_DLL; - - - -implementation - -function aiGetMaterialFloat( var pMat: TaiMaterial; pKey: PChar; nType: Cardinal; nIndex: Cardinal; var pOut: Single): aiReturn; -var - n: cardinal; -begin - n := 0; - result := aiGetMaterialFloatArray( pMat, pKey, nType, nIndex, pOut, n); -end; - -function aiGetMaterialInteger(var pMat: TaiMaterial; pKey: PChar; nType: Cardinal; nIndex: Cardinal; var pOut: integer): aiReturn; -var - n: cardinal; -begin - n := 0; - result := aiGetMaterialIntegerArray( pMat, pKey, nType, nIndex, pOut, n); -end; - -end. diff --git a/thirdparty/assimp/port/AssimpNET/Readme.md b/thirdparty/assimp/port/AssimpNET/Readme.md deleted file mode 100644 index 814cab3..0000000 --- a/thirdparty/assimp/port/AssimpNET/Readme.md +++ /dev/null @@ -1 +0,0 @@ -Please check the following git-repo for the source: https://github.com/kebby/assimp-net diff --git a/thirdparty/assimp/port/AssimpPascal/Readme.md b/thirdparty/assimp/port/AssimpPascal/Readme.md deleted file mode 100644 index 9dfc652..0000000 --- a/thirdparty/assimp/port/AssimpPascal/Readme.md +++ /dev/null @@ -1 +0,0 @@ -See the [AssimpPascal headers here](https://github.com/ev1313/Pascal-Assimp-Headers) (by Tim Blume / ev1313). diff --git a/thirdparty/assimp/port/PyAssimp/3d_viewer_screenshot.png b/thirdparty/assimp/port/PyAssimp/3d_viewer_screenshot.png deleted file mode 100644 index 2031faf..0000000 Binary files a/thirdparty/assimp/port/PyAssimp/3d_viewer_screenshot.png and /dev/null differ diff --git a/thirdparty/assimp/port/PyAssimp/README.md b/thirdparty/assimp/port/PyAssimp/README.md deleted file mode 100644 index d64d727..0000000 --- a/thirdparty/assimp/port/PyAssimp/README.md +++ /dev/null @@ -1,91 +0,0 @@ -PyAssimp Readme -=============== - -A simple Python wrapper for Assimp using `ctypes` to access the library. -Requires Python >= 2.6. - -Python 3 support is mostly here, but not well tested. - -Note that pyassimp is not complete. Many ASSIMP features are missing. - -USAGE ------ - -### Complete example: 3D viewer - -`pyassimp` comes with a simple 3D viewer that shows how to load and display a 3D -model using a shader-based OpenGL pipeline. - -![Screenshot](3d_viewer_screenshot.png) - -To use it, from within `/port/PyAssimp`: - -```console -$ cd scripts -$ python ./3D-viewer -``` - -You can use this code as starting point in your applications. - -### Writing your own code - -To get started with `pyassimp`, examine the simpler `sample.py` script in `scripts/`, -which illustrates the basic usage. All Assimp data structures are wrapped using -`ctypes`. All the data+length fields in Assimp's data structures (such as -`aiMesh::mNumVertices`, `aiMesh::mVertices`) are replaced by simple python -lists, so you can call `len()` on them to get their respective size and access -members using `[]`. - -For example, to load a file named `hello.3ds` and print the first -vertex of the first mesh, you would do (proper error handling -substituted by assertions ...): - -```python - -from pyassimp import * -scene = load('hello.3ds') - -assert len(scene.meshes) -mesh = scene.meshes[0] - -assert len(mesh.vertices) -print(mesh.vertices[0]) - -# don't forget this one, or you will leak! -release(scene) - -``` - -Another example to list the 'top nodes' in a -scene: - -```python - -from pyassimp import * -scene = load('hello.3ds') - -for c in scene.rootnode.children: - print(str(c)) - -release(scene) - -``` - -INSTALL -------- - -Install `pyassimp` by running: - -```console -$ python setup.py install -``` - -PyAssimp requires a assimp dynamic library (`DLL` on windows, -`.so` on linux, `.dynlib` on macOS) in order to work. The default search directories are: - - the current directory - - on linux additionally: `/usr/lib`, `/usr/local/lib`, - `/usr/lib/x86_64-linux-gnu` - -To build that library, refer to the Assimp master `INSTALL` -instructions. To look in more places, edit `./pyassimp/helper.py`. -There's an `additional_dirs` list waiting for your entries. diff --git a/thirdparty/assimp/port/PyAssimp/README.rst b/thirdparty/assimp/port/PyAssimp/README.rst deleted file mode 100644 index f909e2c..0000000 --- a/thirdparty/assimp/port/PyAssimp/README.rst +++ /dev/null @@ -1,96 +0,0 @@ -PyAssimp: Python bindings for libassimp -======================================= - -A simple Python wrapper for Assimp using ``ctypes`` to access the -library. Requires Python >= 2.6. - -Python 3 support is mostly here, but not well tested. - -Note that pyassimp is not complete. Many ASSIMP features are missing. - -USAGE ------ - -Complete example: 3D viewer -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -``pyassimp`` comes with a simple 3D viewer that shows how to load and -display a 3D model using a shader-based OpenGL pipeline. - -.. figure:: 3d_viewer_screenshot.png - :alt: Screenshot - - Screenshot - -To use it, from within ``/port/PyAssimp``: - -:: - - $ cd scripts - $ python ./3D-viewer - -You can use this code as starting point in your applications. - -Writing your own code -~~~~~~~~~~~~~~~~~~~~~ - -To get started with ``pyassimp``, examine the simpler ``sample.py`` -script in ``scripts/``, which illustrates the basic usage. All Assimp -data structures are wrapped using ``ctypes``. All the data+length fields -in Assimp's data structures (such as ``aiMesh::mNumVertices``, -``aiMesh::mVertices``) are replaced by simple python lists, so you can -call ``len()`` on them to get their respective size and access members -using ``[]``. - -For example, to load a file named ``hello.3ds`` and print the first -vertex of the first mesh, you would do (proper error handling -substituted by assertions ...): - -.. code:: python - - - from pyassimp import * - scene = load('hello.3ds') - - assert len(scene.meshes) - mesh = scene.meshes[0] - - assert len(mesh.vertices) - print(mesh.vertices[0]) - - # don't forget this one, or you will leak! - release(scene) - -Another example to list the 'top nodes' in a scene: - -.. code:: python - - - from pyassimp import * - scene = load('hello.3ds') - - for c in scene.rootnode.children: - print(str(c)) - - release(scene) - -INSTALL -------- - -Install ``pyassimp`` by running: - -:: - - $ python setup.py install - -PyAssimp requires a assimp dynamic library (``DLL`` on windows, ``.so`` -on linux, ``.dynlib`` on macOS) in order to work. The default search -directories are: - -- the current directory -- on linux additionally: ``/usr/lib``, ``/usr/local/lib``, - ``/usr/lib/x86_64-linux-gnu`` - -To build that library, refer to the Assimp master ``INSTALL`` -instructions. To look in more places, edit ``./pyassimp/helper.py``. -There's an ``additional_dirs`` list waiting for your entries. diff --git a/thirdparty/assimp/port/PyAssimp/gen/materialgen.py b/thirdparty/assimp/port/PyAssimp/gen/materialgen.py deleted file mode 100644 index d60bf4b..0000000 --- a/thirdparty/assimp/port/PyAssimp/gen/materialgen.py +++ /dev/null @@ -1,96 +0,0 @@ -#!/usr/bin/env python -# -*- Coding: UTF-8 -*- - -# --------------------------------------------------------------------------- -# Open Asset Import Library (ASSIMP) -# --------------------------------------------------------------------------- -# -# Copyright (c) 2006-2010, ASSIMP Development 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 Development 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. -# --------------------------------------------------------------------------- - -"""Update PyAssimp's texture type constants C/C++ headers. - -This script is meant to be executed in the source tree, directly from -port/PyAssimp/gen -""" - -import os -import re - -REenumTextureType = re.compile(r'' - r'enum\saiTextureType' # enum aiTextureType - r'[^{]*?\{' # { - r'(?P.*?)' # code - r'\};' # }; - , re.IGNORECASE + re.DOTALL + re.MULTILINE) - -# Replace comments -RErpcom = re.compile(r'' - r'\s*(/\*+\s|\*+/|\B\*\s?|///?!?)' # /** - r'(?P.*?)' # * line - , re.IGNORECASE + re.DOTALL) - -# Remove trailing commas -RErmtrailcom = re.compile(r',$', re.IGNORECASE + re.DOTALL) - -# Remove #ifdef __cplusplus -RErmifdef = re.compile(r'' - r'#ifndef SWIG' # #ifndef SWIG - r'(?P.*)' # code - r'#endif(\s*//\s*!?\s*SWIG)*' # #endif - , re.IGNORECASE + re.DOTALL) - -path = '../../../include/assimp' - -files = os.listdir (path) -enumText = '' -for fileName in files: - if fileName.endswith('.h'): - text = open(os.path.join(path, fileName)).read() - for enum in REenumTextureType.findall(text): - enumText = enum - -text = '' -for line in enumText.split('\n'): - line = line.lstrip().rstrip() - line = RErmtrailcom.sub('', line) - text += RErpcom.sub('# \g', line) + '\n' -text = RErmifdef.sub('', text) - -file = open('material.py', 'w') -file.write(text) -file.close() - -print("Generation done. You can now review the file 'material.py' and merge it.") diff --git a/thirdparty/assimp/port/PyAssimp/gen/structsgen.py b/thirdparty/assimp/port/PyAssimp/gen/structsgen.py deleted file mode 100644 index f2ee95e..0000000 --- a/thirdparty/assimp/port/PyAssimp/gen/structsgen.py +++ /dev/null @@ -1,290 +0,0 @@ -#!/usr/bin/env python -# -*- Coding: UTF-8 -*- - -# --------------------------------------------------------------------------- -# Open Asset Import Library (ASSIMP) -# --------------------------------------------------------------------------- -# -# Copyright (c) 2006-2010, ASSIMP Development 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 Development 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. -# --------------------------------------------------------------------------- - -"""Update PyAssimp's data structures to keep up with the -C/C++ headers. - -This script is meant to be executed in the source tree, directly from -port/PyAssimp/gen -""" - -import os -import re - -#==[regexps]================================================= - -# Clean desc -REdefine = re.compile(r'' - r'(?P)' # /** *desc */ - r'#\s*define\s(?P[^(\n]+?)\s(?P.+)$' # #define name value - , re.MULTILINE) - -# Get structs -REstructs = re.compile(r'' - #r'//\s?[\-]*\s(?P.*?)\*/\s' # /** *desc */ - #r'//\s?[\-]*(?P.*?)\*/(?:.*?)' # garbage - r'//\s?[\-]*\s(?P.*?)\*/\W*?' # /** *desc */ - r'struct\s(?:ASSIMP_API\s)?(?P[a-z][a-z0-9_]\w+\b)' # struct name - r'[^{]*?\{' # { - r'(?P.*?)' # code - r'\}\s*(PACK_STRUCT)?;' # }; - , re.IGNORECASE + re.DOTALL + re.MULTILINE) - -# Clean desc -REdesc = re.compile(r'' - r'^\s*?([*]|/\*\*)(?P.*?)' # * line - , re.IGNORECASE + re.DOTALL + re.MULTILINE) - -# Remove #ifdef __cplusplus -RErmifdef = re.compile(r'' - r'#ifdef __cplusplus' # #ifdef __cplusplus - r'(?P.*)' # code - r'#endif(\s*//\s*!?\s*__cplusplus)*' # #endif - , re.IGNORECASE + re.DOTALL) - -# Replace comments -RErpcom = re.compile(r'' - r'\s*(/\*+\s|\*+/|\B\*\s|///?!?)' # /** - r'(?P.*?)' # * line - , re.IGNORECASE + re.DOTALL) - -# Restructure -def GetType(type, prefix='c_'): - t = type - while t.endswith('*'): - t = t[:-1] - if t[:5] == 'const': - t = t[5:] - - # skip some types - if t in skiplist: - return None - - t = t.strip() - types = {'unsigned int':'uint', 'unsigned char':'ubyte',} - if t in types: - t = types[t] - t = prefix + t - while type.endswith('*'): - t = "POINTER(" + t + ")" - type = type[:-1] - return t - -def restructure( match ): - type = match.group("type") - if match.group("struct") == "": - type = GetType(type) - elif match.group("struct") == "C_ENUM ": - type = "c_uint" - else: - type = GetType(type[2:], '') - if type is None: - return '' - if match.group("index"): - type = type + "*" + match.group("index") - - result = "" - for name in match.group("name").split(','): - result += "(\"" + name.strip() + "\", "+ type + ")," - - return result - -RErestruc = re.compile(r'' - r'(?PC_STRUCT\s|C_ENUM\s|)' # [C_STRUCT] - r'(?P\w+\s?\w+?[*]*)\s' # type - #r'(?P\w+)' # name - r'(?P\w+|[a-z0-9_, ]+)' # name - r'(:?\[(?P\w+)\])?;' # []; (optional) - , re.DOTALL) -#==[template]================================================ -template = """ -class $NAME$(Structure): - \"\"\" -$DESCRIPTION$ - \"\"\" -$DEFINES$ - _fields_ = [ - $FIELDS$ - ] -""" - -templateSR = """ -class $NAME$(Structure): - \"\"\" -$DESCRIPTION$ - \"\"\" -$DEFINES$ - -$NAME$._fields_ = [ - $FIELDS$ - ] -""" - -skiplist = ("FileIO", "File", "locateFromAssimpHeap",'LogStream','MeshAnim','AnimMesh') - -#============================================================ -def Structify(fileName): - file = open(fileName, 'r') - text = file.read() - result = [] - - # Get defines. - defs = REdefine.findall(text) - # Create defines - defines = "\n" - for define in defs: - # Clean desc - desc = REdesc.sub('', define[0]) - # Replace comments - desc = RErpcom.sub('#\g', desc) - defines += desc - if len(define[2].strip()): - # skip non-integral defines, we can support them right now - try: - int(define[2],0) - except: - continue - defines += " "*4 + define[1] + " = " + define[2] + "\n" - - - # Get structs - rs = REstructs.finditer(text) - - fileName = os.path.basename(fileName) - print fileName - for r in rs: - name = r.group('name')[2:] - desc = r.group('desc') - - # Skip some structs - if name in skiplist: - continue - - text = r.group('code') - - # Clean desc - desc = REdesc.sub('', desc) - - desc = "See '"+ fileName +"' for details." #TODO - - # Remove #ifdef __cplusplus - text = RErmifdef.sub('', text) - - # Whether the struct contains more than just POD - primitive = text.find('C_STRUCT') == -1 - - # Restructure - text = RErestruc.sub(restructure, text) - # Replace comments - text = RErpcom.sub('# \g', text) - text = text.replace("),#", "),\n#") - text = text.replace("#", "\n#") - text = "".join([l for l in text.splitlines(True) if not l.strip().endswith("#")]) # remove empty comment lines - - # Whether it's selfreferencing: ex. struct Node { Node* parent; }; - selfreferencing = text.find('POINTER('+name+')') != -1 - - complex = name == "Scene" - - # Create description - description = "" - for line in desc.split('\n'): - description += " "*4 + line.strip() + "\n" - description = description.rstrip() - - # Create fields - fields = "" - for line in text.split('\n'): - fields += " "*12 + line.strip() + "\n" - fields = fields.strip() - - if selfreferencing: - templ = templateSR - else: - templ = template - - # Put it all together - text = templ.replace('$NAME$', name) - text = text.replace('$DESCRIPTION$', description) - text = text.replace('$FIELDS$', fields) - - if ((name.lower() == fileName.split('.')[0][2:].lower()) and (name != 'Material')) or name == "String": - text = text.replace('$DEFINES$', defines) - else: - text = text.replace('$DEFINES$', '') - - - result.append((primitive, selfreferencing, complex, text)) - - return result - -text = "#-*- coding: UTF-8 -*-\n\n" -text += "from ctypes import POINTER, c_int, c_uint, c_size_t, c_char, c_float, Structure, c_char_p, c_double, c_ubyte\n\n" - -structs1 = "" -structs2 = "" -structs3 = "" -structs4 = "" - -path = '../../../include/assimp' -files = os.listdir (path) -#files = ["aiScene.h", "aiTypes.h"] -for fileName in files: - if fileName.endswith('.h'): - for struct in Structify(os.path.join(path, fileName)): - primitive, sr, complex, struct = struct - if primitive: - structs1 += struct - elif sr: - structs2 += struct - elif complex: - structs4 += struct - else: - structs3 += struct - -text += structs1 + structs2 + structs3 + structs4 - -file = open('structs.py', 'w') -file.write(text) -file.close() - -print("Generation done. You can now review the file 'structs.py' and merge it.") diff --git a/thirdparty/assimp/port/PyAssimp/pyassimp/__init__.py b/thirdparty/assimp/port/PyAssimp/pyassimp/__init__.py deleted file mode 100644 index bb67a43..0000000 --- a/thirdparty/assimp/port/PyAssimp/pyassimp/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .core import * diff --git a/thirdparty/assimp/port/PyAssimp/pyassimp/core.py b/thirdparty/assimp/port/PyAssimp/pyassimp/core.py deleted file mode 100644 index c346e26..0000000 --- a/thirdparty/assimp/port/PyAssimp/pyassimp/core.py +++ /dev/null @@ -1,546 +0,0 @@ -""" -PyAssimp - -This is the main-module of PyAssimp. -""" - -import sys -if sys.version_info < (2,6): - raise RuntimeError('pyassimp: need python 2.6 or newer') - -# xrange was renamed range in Python 3 and the original range from Python 2 was removed. -# To keep compatibility with both Python 2 and 3, xrange is set to range for version 3.0 and up. -if sys.version_info >= (3,0): - xrange = range - - -try: import numpy -except ImportError: numpy = None -import logging -import ctypes -logger = logging.getLogger("pyassimp") -# attach default null handler to logger so it doesn't complain -# even if you don't attach another handler to logger -logger.addHandler(logging.NullHandler()) - -from . import structs -from . import helper -from . import postprocess -from .errors import AssimpError - -class AssimpLib(object): - """ - Assimp-Singleton - """ - load, load_mem, export, export_blob, release, dll = helper.search_library() -_assimp_lib = AssimpLib() - -def make_tuple(ai_obj, type = None): - res = None - - #notes: - # ai_obj._fields_ = [ ("attr", c_type), ... ] - # getattr(ai_obj, e[0]).__class__ == float - - if isinstance(ai_obj, structs.Matrix4x4): - if numpy: - res = numpy.array([getattr(ai_obj, e[0]) for e in ai_obj._fields_]).reshape((4,4)) - #import pdb;pdb.set_trace() - else: - res = [getattr(ai_obj, e[0]) for e in ai_obj._fields_] - res = [res[i:i+4] for i in xrange(0,16,4)] - elif isinstance(ai_obj, structs.Matrix3x3): - if numpy: - res = numpy.array([getattr(ai_obj, e[0]) for e in ai_obj._fields_]).reshape((3,3)) - else: - res = [getattr(ai_obj, e[0]) for e in ai_obj._fields_] - res = [res[i:i+3] for i in xrange(0,9,3)] - else: - if numpy: - res = numpy.array([getattr(ai_obj, e[0]) for e in ai_obj._fields_]) - else: - res = [getattr(ai_obj, e[0]) for e in ai_obj._fields_] - - return res - -# Returns unicode object for Python 2, and str object for Python 3. -def _convert_assimp_string(assimp_string): - if sys.version_info >= (3, 0): - return str(assimp_string.data, errors='ignore') - else: - return unicode(assimp_string.data, errors='ignore') - -# It is faster and more correct to have an init function for each assimp class -def _init_face(aiFace): - aiFace.indices = [aiFace.mIndices[i] for i in range(aiFace.mNumIndices)] -assimp_struct_inits = { structs.Face : _init_face } - -def call_init(obj, caller = None): - if helper.hasattr_silent(obj,'contents'): #pointer - _init(obj.contents, obj, caller) - else: - _init(obj,parent=caller) - -def _is_init_type(obj): - - if obj and helper.hasattr_silent(obj,'contents'): #pointer - return _is_init_type(obj[0]) - # null-pointer case that arises when we reach a mesh attribute - # like mBitangents which use mNumVertices rather than mNumBitangents - # so it breaks the 'is iterable' check. - # Basically: - # FIXME! - elif not bool(obj): - return False - tname = obj.__class__.__name__ - return not (tname[:2] == 'c_' or tname == 'Structure' \ - or tname == 'POINTER') and not isinstance(obj, (int, str, bytes)) - -def _init(self, target = None, parent = None): - """ - Custom initialize() for C structs, adds safely accessible member functionality. - - :param target: set the object which receive the added methods. Useful when manipulating - pointers, to skip the intermediate 'contents' deferencing. - """ - if not target: - target = self - - dirself = dir(self) - for m in dirself: - - if m.startswith("_"): - continue - - if m.startswith('mNum'): - if 'm' + m[4:] in dirself: - continue # will be processed later on - else: - name = m[1:].lower() - - obj = getattr(self, m) - setattr(target, name, obj) - continue - - if m == 'mName': - target.name = str(_convert_assimp_string(self.mName)) - target.__class__.__repr__ = lambda x: str(x.__class__) + "(" + getattr(x, 'name','') + ")" - target.__class__.__str__ = lambda x: getattr(x, 'name', '') - continue - - name = m[1:].lower() - - obj = getattr(self, m) - - # Create tuples - if isinstance(obj, structs.assimp_structs_as_tuple): - setattr(target, name, make_tuple(obj)) - logger.debug(str(self) + ": Added array " + str(getattr(target, name)) + " as self." + name.lower()) - continue - - if m.startswith('m'): - - if name == "parent": - setattr(target, name, parent) - logger.debug("Added a parent as self." + name) - continue - - if helper.hasattr_silent(self, 'mNum' + m[1:]): - - length = getattr(self, 'mNum' + m[1:]) - - # -> special case: properties are - # stored as a dict. - if m == 'mProperties': - setattr(target, name, _get_properties(obj, length)) - continue - - - if not length: # empty! - setattr(target, name, []) - logger.debug(str(self) + ": " + name + " is an empty list.") - continue - - - try: - if obj._type_ in structs.assimp_structs_as_tuple: - if numpy: - setattr(target, name, numpy.array([make_tuple(obj[i]) for i in range(length)], dtype=numpy.float32)) - - logger.debug(str(self) + ": Added an array of numpy arrays (type "+ str(type(obj)) + ") as self." + name) - else: - setattr(target, name, [make_tuple(obj[i]) for i in range(length)]) - - logger.debug(str(self) + ": Added a list of lists (type "+ str(type(obj)) + ") as self." + name) - - else: - setattr(target, name, [obj[i] for i in range(length)]) #TODO: maybe not necessary to recreate an array? - - logger.debug(str(self) + ": Added list of " + str(obj) + " " + name + " as self." + name + " (type: " + str(type(obj)) + ")") - - # initialize array elements - try: - init = assimp_struct_inits[type(obj[0])] - except KeyError: - if _is_init_type(obj[0]): - for e in getattr(target, name): - call_init(e, target) - else: - for e in getattr(target, name): - init(e) - - - except IndexError: - logger.error("in " + str(self) +" : mismatch between mNum" + name + " and the actual amount of data in m" + name + ". This may be due to version mismatch between libassimp and pyassimp. Quitting now.") - sys.exit(1) - - except ValueError as e: - - logger.error("In " + str(self) + "->" + name + ": " + str(e) + ". Quitting now.") - if "setting an array element with a sequence" in str(e): - logger.error("Note that pyassimp does not currently " - "support meshes with mixed triangles " - "and quads. Try to load your mesh with" - " a post-processing to triangulate your" - " faces.") - raise e - - - - else: # starts with 'm' but not iterable - setattr(target, name, obj) - logger.debug("Added " + name + " as self." + name + " (type: " + str(type(obj)) + ")") - - if _is_init_type(obj): - call_init(obj, target) - - if isinstance(self, structs.Mesh): - _finalize_mesh(self, target) - - if isinstance(self, structs.Texture): - _finalize_texture(self, target) - - if isinstance(self, structs.Metadata): - _finalize_metadata(self, target) - - - return self - - -def pythonize_assimp(type, obj, scene): - """ This method modify the Assimp data structures - to make them easier to work with in Python. - - Supported operations: - - MESH: replace a list of mesh IDs by reference to these meshes - - ADDTRANSFORMATION: add a reference to an object's transformation taken from their associated node. - - :param type: the type of modification to operate (cf above) - :param obj: the input object to modify - :param scene: a reference to the whole scene - """ - - if type == "MESH": - meshes = [] - for i in obj: - meshes.append(scene.meshes[i]) - return meshes - - if type == "ADDTRANSFORMATION": - def getnode(node, name): - if node.name == name: return node - for child in node.children: - n = getnode(child, name) - if n: return n - - node = getnode(scene.rootnode, obj.name) - if not node: - raise AssimpError("Object " + str(obj) + " has no associated node!") - setattr(obj, "transformation", node.transformation) - -def recur_pythonize(node, scene): - ''' - Recursively call pythonize_assimp on - nodes tree to apply several post-processing to - pythonize the assimp datastructures. - ''' - node.meshes = pythonize_assimp("MESH", node.meshes, scene) - for mesh in node.meshes: - mesh.material = scene.materials[mesh.materialindex] - for cam in scene.cameras: - pythonize_assimp("ADDTRANSFORMATION", cam, scene) - for c in node.children: - recur_pythonize(c, scene) - -def load(filename, - file_type = None, - processing = postprocess.aiProcess_Triangulate): - ''' - Load a model into a scene. On failure throws AssimpError. - - Arguments - --------- - filename: Either a filename or a file object to load model from. - If a file object is passed, file_type MUST be specified - Otherwise Assimp has no idea which importer to use. - This is named 'filename' so as to not break legacy code. - processing: assimp postprocessing parameters. Verbose keywords are imported - from postprocessing, and the parameters can be combined bitwise to - generate the final processing value. Note that the default value will - triangulate quad faces. Example of generating other possible values: - processing = (pyassimp.postprocess.aiProcess_Triangulate | - pyassimp.postprocess.aiProcess_OptimizeMeshes) - file_type: string of file extension, such as 'stl' - - Returns - --------- - Scene object with model data - ''' - - if hasattr(filename, 'read'): - # This is the case where a file object has been passed to load. - # It is calling the following function: - # const aiScene* aiImportFileFromMemory(const char* pBuffer, - # unsigned int pLength, - # unsigned int pFlags, - # const char* pHint) - if file_type is None: - raise AssimpError('File type must be specified when passing file objects!') - data = filename.read() - model = _assimp_lib.load_mem(data, - len(data), - processing, - file_type) - else: - # a filename string has been passed - model = _assimp_lib.load(filename.encode(sys.getfilesystemencoding()), processing) - - if not model: - raise AssimpError('Could not import file!') - scene = _init(model.contents) - recur_pythonize(scene.rootnode, scene) - return scene - -def export(scene, - filename, - file_type = None, - processing = postprocess.aiProcess_Triangulate): - ''' - Export a scene. On failure throws AssimpError. - - Arguments - --------- - scene: scene to export. - filename: Filename that the scene should be exported to. - file_type: string of file exporter to use. For example "collada". - processing: assimp postprocessing parameters. Verbose keywords are imported - from postprocessing, and the parameters can be combined bitwise to - generate the final processing value. Note that the default value will - triangulate quad faces. Example of generating other possible values: - processing = (pyassimp.postprocess.aiProcess_Triangulate | - pyassimp.postprocess.aiProcess_OptimizeMeshes) - - ''' - - exportStatus = _assimp_lib.export(ctypes.pointer(scene), file_type.encode("ascii"), filename.encode(sys.getfilesystemencoding()), processing) - - if exportStatus != 0: - raise AssimpError('Could not export scene!') - -def export_blob(scene, - file_type = None, - processing = postprocess.aiProcess_Triangulate): - ''' - Export a scene and return a blob in the correct format. On failure throws AssimpError. - - Arguments - --------- - scene: scene to export. - file_type: string of file exporter to use. For example "collada". - processing: assimp postprocessing parameters. Verbose keywords are imported - from postprocessing, and the parameters can be combined bitwise to - generate the final processing value. Note that the default value will - triangulate quad faces. Example of generating other possible values: - processing = (pyassimp.postprocess.aiProcess_Triangulate | - pyassimp.postprocess.aiProcess_OptimizeMeshes) - Returns - --------- - Pointer to structs.ExportDataBlob - ''' - exportBlobPtr = _assimp_lib.export_blob(ctypes.pointer(scene), file_type.encode("ascii"), processing) - - if exportBlobPtr == 0: - raise AssimpError('Could not export scene to blob!') - return exportBlobPtr - -def release(scene): - _assimp_lib.release(ctypes.pointer(scene)) - -def _finalize_texture(tex, target): - setattr(target, "achformathint", tex.achFormatHint) - if numpy: - data = numpy.array([make_tuple(getattr(tex, "pcData")[i]) for i in range(tex.mWidth * tex.mHeight)]) - else: - data = [make_tuple(getattr(tex, "pcData")[i]) for i in range(tex.mWidth * tex.mHeight)] - setattr(target, "data", data) - -def _finalize_mesh(mesh, target): - """ Building of meshes is a bit specific. - - We override here the various datasets that can - not be process as regular fields. - - For instance, the length of the normals array is - mNumVertices (no mNumNormals is available) - """ - nb_vertices = getattr(mesh, "mNumVertices") - - def fill(name): - mAttr = getattr(mesh, name) - if numpy: - if mAttr: - data = numpy.array([make_tuple(getattr(mesh, name)[i]) for i in range(nb_vertices)], dtype=numpy.float32) - setattr(target, name[1:].lower(), data) - else: - setattr(target, name[1:].lower(), numpy.array([], dtype="float32")) - else: - if mAttr: - data = [make_tuple(getattr(mesh, name)[i]) for i in range(nb_vertices)] - setattr(target, name[1:].lower(), data) - else: - setattr(target, name[1:].lower(), []) - - def fillarray(name): - mAttr = getattr(mesh, name) - - data = [] - for index, mSubAttr in enumerate(mAttr): - if mSubAttr: - data.append([make_tuple(getattr(mesh, name)[index][i]) for i in range(nb_vertices)]) - - if numpy: - setattr(target, name[1:].lower(), numpy.array(data, dtype=numpy.float32)) - else: - setattr(target, name[1:].lower(), data) - - fill("mNormals") - fill("mTangents") - fill("mBitangents") - - fillarray("mColors") - fillarray("mTextureCoords") - - # prepare faces - if numpy: - faces = numpy.array([f.indices for f in target.faces], dtype=numpy.int32) - else: - faces = [f.indices for f in target.faces] - setattr(target, 'faces', faces) - -def _init_metadata_entry(entry): - entry.type = entry.mType - if entry.type == structs.MetadataEntry.AI_BOOL: - entry.data = ctypes.cast(entry.mData, ctypes.POINTER(ctypes.c_bool)).contents.value - elif entry.type == structs.MetadataEntry.AI_INT32: - entry.data = ctypes.cast(entry.mData, ctypes.POINTER(ctypes.c_int32)).contents.value - elif entry.type == structs.MetadataEntry.AI_UINT64: - entry.data = ctypes.cast(entry.mData, ctypes.POINTER(ctypes.c_uint64)).contents.value - elif entry.type == structs.MetadataEntry.AI_FLOAT: - entry.data = ctypes.cast(entry.mData, ctypes.POINTER(ctypes.c_float)).contents.value - elif entry.type == structs.MetadataEntry.AI_DOUBLE: - entry.data = ctypes.cast(entry.mData, ctypes.POINTER(ctypes.c_double)).contents.value - elif entry.type == structs.MetadataEntry.AI_AISTRING: - assimp_string = ctypes.cast(entry.mData, ctypes.POINTER(structs.String)).contents - entry.data = _convert_assimp_string(assimp_string) - elif entry.type == structs.MetadataEntry.AI_AIVECTOR3D: - assimp_vector = ctypes.cast(entry.mData, ctypes.POINTER(structs.Vector3D)).contents - entry.data = make_tuple(assimp_vector) - - return entry - -def _finalize_metadata(metadata, target): - """ Building the metadata object is a bit specific. - - Firstly, there are two separate arrays: one with metadata keys and one - with metadata values, and there are no corresponding mNum* attributes, - so the C arrays are not converted to Python arrays using the generic - code in the _init function. - - Secondly, a metadata entry value has to be cast according to declared - metadata entry type. - """ - length = metadata.mNumProperties - setattr(target, 'keys', [str(_convert_assimp_string(metadata.mKeys[i])) for i in range(length)]) - setattr(target, 'values', [_init_metadata_entry(metadata.mValues[i]) for i in range(length)]) - -class PropertyGetter(dict): - def __getitem__(self, key): - semantic = 0 - if isinstance(key, tuple): - key, semantic = key - - return dict.__getitem__(self, (key, semantic)) - - def keys(self): - for k in dict.keys(self): - yield k[0] - - def __iter__(self): - return self.keys() - - def items(self): - for k, v in dict.items(self): - yield k[0], v - - -def _get_properties(properties, length): - """ - Convenience Function to get the material properties as a dict - and values in a python format. - """ - result = {} - #read all properties - for p in [properties[i] for i in range(length)]: - #the name - p = p.contents - key = str(_convert_assimp_string(p.mKey)) - key = (key.split('.')[1], p.mSemantic) - - #the data - if p.mType == 1: - arr = ctypes.cast(p.mData, - ctypes.POINTER(ctypes.c_float * int(p.mDataLength/ctypes.sizeof(ctypes.c_float))) - ).contents - value = [x for x in arr] - elif p.mType == 3: #string can't be an array - value = _convert_assimp_string(ctypes.cast(p.mData, ctypes.POINTER(structs.MaterialPropertyString)).contents) - - elif p.mType == 4: - arr = ctypes.cast(p.mData, - ctypes.POINTER(ctypes.c_int * int(p.mDataLength/ctypes.sizeof(ctypes.c_int))) - ).contents - value = [x for x in arr] - else: - value = p.mData[:p.mDataLength] - - if len(value) == 1: - [value] = value - - result[key] = value - - return PropertyGetter(result) - -def decompose_matrix(matrix): - if not isinstance(matrix, structs.Matrix4x4): - raise AssimpError("pyassimp.decompose_matrix failed: Not a Matrix4x4!") - - scaling = structs.Vector3D() - rotation = structs.Quaternion() - position = structs.Vector3D() - - _assimp_lib.dll.aiDecomposeMatrix(ctypes.pointer(matrix), - ctypes.byref(scaling), - ctypes.byref(rotation), - ctypes.byref(position)) - return scaling._init(), rotation._init(), position._init() - diff --git a/thirdparty/assimp/port/PyAssimp/pyassimp/errors.py b/thirdparty/assimp/port/PyAssimp/pyassimp/errors.py deleted file mode 100644 index 9d77686..0000000 --- a/thirdparty/assimp/port/PyAssimp/pyassimp/errors.py +++ /dev/null @@ -1,11 +0,0 @@ -#-*- coding: UTF-8 -*- - -""" -All possible errors. -""" - -class AssimpError(BaseException): - """ - If an internal error occurs. - """ - pass \ No newline at end of file diff --git a/thirdparty/assimp/port/PyAssimp/pyassimp/formats.py b/thirdparty/assimp/port/PyAssimp/pyassimp/formats.py deleted file mode 100644 index 5d454e5..0000000 --- a/thirdparty/assimp/port/PyAssimp/pyassimp/formats.py +++ /dev/null @@ -1,41 +0,0 @@ -FORMATS = ["CSM", - "LWS", - "B3D", - "COB", - "PLY", - "IFC", - "OFF", - "SMD", - "IRRMESH", - "3D", - "DAE", - "MDL", - "HMP", - "TER", - "WRL", - "XML", - "NFF", - "AC", - "OBJ", - "3DS", - "STL", - "IRR", - "Q3O", - "Q3D", - "MS3D", - "Q3S", - "ZGL", - "MD2", - "X", - "BLEND", - "XGL", - "MD5MESH", - "MAX", - "LXO", - "DXF", - "BVH", - "LWO", - "NDO"] - -def available_formats(): - return FORMATS diff --git a/thirdparty/assimp/port/PyAssimp/pyassimp/helper.py b/thirdparty/assimp/port/PyAssimp/pyassimp/helper.py deleted file mode 100644 index 5c1aca8..0000000 --- a/thirdparty/assimp/port/PyAssimp/pyassimp/helper.py +++ /dev/null @@ -1,281 +0,0 @@ -#-*- coding: UTF-8 -*- - -""" -Some fancy helper functions. -""" - -import os -import ctypes -import operator - -from distutils.sysconfig import get_python_lib -import re -import sys - -try: import numpy -except ImportError: numpy = None - -import logging;logger = logging.getLogger("pyassimp") - -from .errors import AssimpError - -additional_dirs, ext_whitelist = [],[] - -# populate search directories and lists of allowed file extensions -# depending on the platform we're running on. -if os.name=='posix': - additional_dirs.append('./') - additional_dirs.append('/usr/lib/') - additional_dirs.append('/usr/lib/x86_64-linux-gnu/') - additional_dirs.append('/usr/local/lib/') - - if 'LD_LIBRARY_PATH' in os.environ: - additional_dirs.extend([item for item in os.environ['LD_LIBRARY_PATH'].split(':') if item]) - - # check if running from anaconda. - if "conda" or "continuum" in sys.version.lower(): - cur_path = get_python_lib() - pattern = re.compile('.*\/lib\/') - conda_lib = pattern.match(cur_path).group() - logger.info("Adding Anaconda lib path:"+ conda_lib) - additional_dirs.append(conda_lib) - - # note - this won't catch libassimp.so.N.n, but - # currently there's always a symlink called - # libassimp.so in /usr/local/lib. - ext_whitelist.append('.so') - # libassimp.dylib in /usr/local/lib - ext_whitelist.append('.dylib') - -elif os.name=='nt': - ext_whitelist.append('.dll') - path_dirs = os.environ['PATH'].split(';') - additional_dirs.extend(path_dirs) - -def vec2tuple(x): - """ Converts a VECTOR3D to a Tuple """ - return (x.x, x.y, x.z) - -def transform(vector3, matrix4x4): - """ Apply a transformation matrix on a 3D vector. - - :param vector3: array with 3 elements - :param matrix4x4: 4x4 matrix - """ - if numpy: - return numpy.dot(matrix4x4, numpy.append(vector3, 1.)) - else: - m0,m1,m2,m3 = matrix4x4; x,y,z = vector3 - return [ - m0[0]*x + m0[1]*y + m0[2]*z + m0[3], - m1[0]*x + m1[1]*y + m1[2]*z + m1[3], - m2[0]*x + m2[1]*y + m2[2]*z + m2[3], - m3[0]*x + m3[1]*y + m3[2]*z + m3[3] - ] - -def _inv(matrix4x4): - m0,m1,m2,m3 = matrix4x4 - - det = m0[3]*m1[2]*m2[1]*m3[0] - m0[2]*m1[3]*m2[1]*m3[0] - \ - m0[3]*m1[1]*m2[2]*m3[0] + m0[1]*m1[3]*m2[2]*m3[0] + \ - m0[2]*m1[1]*m2[3]*m3[0] - m0[1]*m1[2]*m2[3]*m3[0] - \ - m0[3]*m1[2]*m2[0]*m3[1] + m0[2]*m1[3]*m2[0]*m3[1] + \ - m0[3]*m1[0]*m2[2]*m3[1] - m0[0]*m1[3]*m2[2]*m3[1] - \ - m0[2]*m1[0]*m2[3]*m3[1] + m0[0]*m1[2]*m2[3]*m3[1] + \ - m0[3]*m1[1]*m2[0]*m3[2] - m0[1]*m1[3]*m2[0]*m3[2] - \ - m0[3]*m1[0]*m2[1]*m3[2] + m0[0]*m1[3]*m2[1]*m3[2] + \ - m0[1]*m1[0]*m2[3]*m3[2] - m0[0]*m1[1]*m2[3]*m3[2] - \ - m0[2]*m1[1]*m2[0]*m3[3] + m0[1]*m1[2]*m2[0]*m3[3] + \ - m0[2]*m1[0]*m2[1]*m3[3] - m0[0]*m1[2]*m2[1]*m3[3] - \ - m0[1]*m1[0]*m2[2]*m3[3] + m0[0]*m1[1]*m2[2]*m3[3] - - return[[( m1[2]*m2[3]*m3[1] - m1[3]*m2[2]*m3[1] + m1[3]*m2[1]*m3[2] - m1[1]*m2[3]*m3[2] - m1[2]*m2[1]*m3[3] + m1[1]*m2[2]*m3[3]) /det, - ( m0[3]*m2[2]*m3[1] - m0[2]*m2[3]*m3[1] - m0[3]*m2[1]*m3[2] + m0[1]*m2[3]*m3[2] + m0[2]*m2[1]*m3[3] - m0[1]*m2[2]*m3[3]) /det, - ( m0[2]*m1[3]*m3[1] - m0[3]*m1[2]*m3[1] + m0[3]*m1[1]*m3[2] - m0[1]*m1[3]*m3[2] - m0[2]*m1[1]*m3[3] + m0[1]*m1[2]*m3[3]) /det, - ( m0[3]*m1[2]*m2[1] - m0[2]*m1[3]*m2[1] - m0[3]*m1[1]*m2[2] + m0[1]*m1[3]*m2[2] + m0[2]*m1[1]*m2[3] - m0[1]*m1[2]*m2[3]) /det], - [( m1[3]*m2[2]*m3[0] - m1[2]*m2[3]*m3[0] - m1[3]*m2[0]*m3[2] + m1[0]*m2[3]*m3[2] + m1[2]*m2[0]*m3[3] - m1[0]*m2[2]*m3[3]) /det, - ( m0[2]*m2[3]*m3[0] - m0[3]*m2[2]*m3[0] + m0[3]*m2[0]*m3[2] - m0[0]*m2[3]*m3[2] - m0[2]*m2[0]*m3[3] + m0[0]*m2[2]*m3[3]) /det, - ( m0[3]*m1[2]*m3[0] - m0[2]*m1[3]*m3[0] - m0[3]*m1[0]*m3[2] + m0[0]*m1[3]*m3[2] + m0[2]*m1[0]*m3[3] - m0[0]*m1[2]*m3[3]) /det, - ( m0[2]*m1[3]*m2[0] - m0[3]*m1[2]*m2[0] + m0[3]*m1[0]*m2[2] - m0[0]*m1[3]*m2[2] - m0[2]*m1[0]*m2[3] + m0[0]*m1[2]*m2[3]) /det], - [( m1[1]*m2[3]*m3[0] - m1[3]*m2[1]*m3[0] + m1[3]*m2[0]*m3[1] - m1[0]*m2[3]*m3[1] - m1[1]*m2[0]*m3[3] + m1[0]*m2[1]*m3[3]) /det, - ( m0[3]*m2[1]*m3[0] - m0[1]*m2[3]*m3[0] - m0[3]*m2[0]*m3[1] + m0[0]*m2[3]*m3[1] + m0[1]*m2[0]*m3[3] - m0[0]*m2[1]*m3[3]) /det, - ( m0[1]*m1[3]*m3[0] - m0[3]*m1[1]*m3[0] + m0[3]*m1[0]*m3[1] - m0[0]*m1[3]*m3[1] - m0[1]*m1[0]*m3[3] + m0[0]*m1[1]*m3[3]) /det, - ( m0[3]*m1[1]*m2[0] - m0[1]*m1[3]*m2[0] - m0[3]*m1[0]*m2[1] + m0[0]*m1[3]*m2[1] + m0[1]*m1[0]*m2[3] - m0[0]*m1[1]*m2[3]) /det], - [( m1[2]*m2[1]*m3[0] - m1[1]*m2[2]*m3[0] - m1[2]*m2[0]*m3[1] + m1[0]*m2[2]*m3[1] + m1[1]*m2[0]*m3[2] - m1[0]*m2[1]*m3[2]) /det, - ( m0[1]*m2[2]*m3[0] - m0[2]*m2[1]*m3[0] + m0[2]*m2[0]*m3[1] - m0[0]*m2[2]*m3[1] - m0[1]*m2[0]*m3[2] + m0[0]*m2[1]*m3[2]) /det, - ( m0[2]*m1[1]*m3[0] - m0[1]*m1[2]*m3[0] - m0[2]*m1[0]*m3[1] + m0[0]*m1[2]*m3[1] + m0[1]*m1[0]*m3[2] - m0[0]*m1[1]*m3[2]) /det, - ( m0[1]*m1[2]*m2[0] - m0[2]*m1[1]*m2[0] + m0[2]*m1[0]*m2[1] - m0[0]*m1[2]*m2[1] - m0[1]*m1[0]*m2[2] + m0[0]*m1[1]*m2[2]) /det]] - -def get_bounding_box(scene): - bb_min = [1e10, 1e10, 1e10] # x,y,z - bb_max = [-1e10, -1e10, -1e10] # x,y,z - inv = numpy.linalg.inv if numpy else _inv - return get_bounding_box_for_node(scene.rootnode, bb_min, bb_max, inv(scene.rootnode.transformation)) - -def get_bounding_box_for_node(node, bb_min, bb_max, transformation): - - if numpy: - transformation = numpy.dot(transformation, node.transformation) - else: - t0,t1,t2,t3 = transformation - T0,T1,T2,T3 = node.transformation - transformation = [ [ - t0[0]*T0[0] + t0[1]*T1[0] + t0[2]*T2[0] + t0[3]*T3[0], - t0[0]*T0[1] + t0[1]*T1[1] + t0[2]*T2[1] + t0[3]*T3[1], - t0[0]*T0[2] + t0[1]*T1[2] + t0[2]*T2[2] + t0[3]*T3[2], - t0[0]*T0[3] + t0[1]*T1[3] + t0[2]*T2[3] + t0[3]*T3[3] - ],[ - t1[0]*T0[0] + t1[1]*T1[0] + t1[2]*T2[0] + t1[3]*T3[0], - t1[0]*T0[1] + t1[1]*T1[1] + t1[2]*T2[1] + t1[3]*T3[1], - t1[0]*T0[2] + t1[1]*T1[2] + t1[2]*T2[2] + t1[3]*T3[2], - t1[0]*T0[3] + t1[1]*T1[3] + t1[2]*T2[3] + t1[3]*T3[3] - ],[ - t2[0]*T0[0] + t2[1]*T1[0] + t2[2]*T2[0] + t2[3]*T3[0], - t2[0]*T0[1] + t2[1]*T1[1] + t2[2]*T2[1] + t2[3]*T3[1], - t2[0]*T0[2] + t2[1]*T1[2] + t2[2]*T2[2] + t2[3]*T3[2], - t2[0]*T0[3] + t2[1]*T1[3] + t2[2]*T2[3] + t2[3]*T3[3] - ],[ - t3[0]*T0[0] + t3[1]*T1[0] + t3[2]*T2[0] + t3[3]*T3[0], - t3[0]*T0[1] + t3[1]*T1[1] + t3[2]*T2[1] + t3[3]*T3[1], - t3[0]*T0[2] + t3[1]*T1[2] + t3[2]*T2[2] + t3[3]*T3[2], - t3[0]*T0[3] + t3[1]*T1[3] + t3[2]*T2[3] + t3[3]*T3[3] - ] ] - - for mesh in node.meshes: - for v in mesh.vertices: - v = transform(v, transformation) - bb_min[0] = min(bb_min[0], v[0]) - bb_min[1] = min(bb_min[1], v[1]) - bb_min[2] = min(bb_min[2], v[2]) - bb_max[0] = max(bb_max[0], v[0]) - bb_max[1] = max(bb_max[1], v[1]) - bb_max[2] = max(bb_max[2], v[2]) - - - for child in node.children: - bb_min, bb_max = get_bounding_box_for_node(child, bb_min, bb_max, transformation) - - return bb_min, bb_max - -def try_load_functions(library_path, dll): - ''' - Try to bind to aiImportFile and aiReleaseImport - - Arguments - --------- - library_path: path to current lib - dll: ctypes handle to library - - Returns - --------- - If unsuccessful: - None - If successful: - Tuple containing (library_path, - load from filename function, - load from memory function, - export to filename function, - export to blob function, - release function, - ctypes handle to assimp library) - ''' - - try: - load = dll.aiImportFile - release = dll.aiReleaseImport - load_mem = dll.aiImportFileFromMemory - export = dll.aiExportScene - export2blob = dll.aiExportSceneToBlob - except AttributeError: - #OK, this is a library, but it doesn't have the functions we need - return None - - # library found! - from .structs import Scene, ExportDataBlob - load.restype = ctypes.POINTER(Scene) - load_mem.restype = ctypes.POINTER(Scene) - export2blob.restype = ctypes.POINTER(ExportDataBlob) - return (library_path, load, load_mem, export, export2blob, release, dll) - -def search_library(): - ''' - Loads the assimp library. - Throws exception AssimpError if no library_path is found - - Returns: tuple, (load from filename function, - load from memory function, - export to filename function, - export to blob function, - release function, - dll) - ''' - #this path - folder = os.path.dirname(__file__) - - # silence 'DLL not found' message boxes on win - try: - ctypes.windll.kernel32.SetErrorMode(0x8007) - except AttributeError: - pass - - candidates = [] - # test every file - for curfolder in [folder]+additional_dirs: - if os.path.isdir(curfolder): - for filename in os.listdir(curfolder): - # our minimum requirement for candidates is that - # they should contain 'assimp' somewhere in - # their name - if filename.lower().find('assimp')==-1 : - continue - is_out=1 - for et in ext_whitelist: - if et in filename.lower(): - is_out=0 - break - if is_out: - continue - - library_path = os.path.join(curfolder, filename) - logger.debug('Try ' + library_path) - try: - dll = ctypes.cdll.LoadLibrary(library_path) - except Exception as e: - logger.warning(str(e)) - # OK, this except is evil. But different OSs will throw different - # errors. So just ignore any errors. - continue - # see if the functions we need are in the dll - loaded = try_load_functions(library_path, dll) - if loaded: candidates.append(loaded) - - if not candidates: - # no library found - raise AssimpError("assimp library not found") - else: - # get the newest library_path - candidates = map(lambda x: (os.lstat(x[0])[-2], x), candidates) - res = max(candidates, key=operator.itemgetter(0))[1] - logger.debug('Using assimp library located at ' + res[0]) - - # XXX: if there are 1000 dll/so files containing 'assimp' - # in their name, do we have all of them in our address - # space now until gc kicks in? - - # XXX: take version postfix of the .so on linux? - return res[1:] - -def hasattr_silent(object, name): - """ - Calls hasttr() with the given parameters and preserves the legacy (pre-Python 3.2) - functionality of silently catching exceptions. - - Returns the result of hasatter() or False if an exception was raised. - """ - - try: - if not object: - return False - return hasattr(object, name) - except AttributeError: - return False diff --git a/thirdparty/assimp/port/PyAssimp/pyassimp/material.py b/thirdparty/assimp/port/PyAssimp/pyassimp/material.py deleted file mode 100644 index a36e50a..0000000 --- a/thirdparty/assimp/port/PyAssimp/pyassimp/material.py +++ /dev/null @@ -1,89 +0,0 @@ -# Dummy value. -# -# No texture, but the value to be used as 'texture semantic' -# (#aiMaterialProperty::mSemantic) for all material properties -# # not* related to textures. -# -aiTextureType_NONE = 0x0 - -# The texture is combined with the result of the diffuse -# lighting equation. -# -aiTextureType_DIFFUSE = 0x1 - -# The texture is combined with the result of the specular -# lighting equation. -# -aiTextureType_SPECULAR = 0x2 - -# The texture is combined with the result of the ambient -# lighting equation. -# -aiTextureType_AMBIENT = 0x3 - -# The texture is added to the result of the lighting -# calculation. It isn't influenced by incoming light. -# -aiTextureType_EMISSIVE = 0x4 - -# The texture is a height map. -# -# By convention, higher gray-scale values stand for -# higher elevations from the base height. -# -aiTextureType_HEIGHT = 0x5 - -# The texture is a (tangent space) normal-map. -# -# Again, there are several conventions for tangent-space -# normal maps. Assimp does (intentionally) not -# distinguish here. -# -aiTextureType_NORMALS = 0x6 - -# The texture defines the glossiness of the material. -# -# The glossiness is in fact the exponent of the specular -# (phong) lighting equation. Usually there is a conversion -# function defined to map the linear color values in the -# texture to a suitable exponent. Have fun. -# -aiTextureType_SHININESS = 0x7 - -# The texture defines per-pixel opacity. -# -# Usually 'white' means opaque and 'black' means -# 'transparency'. Or quite the opposite. Have fun. -# -aiTextureType_OPACITY = 0x8 - -# Displacement texture -# -# The exact purpose and format is application-dependent. -# Higher color values stand for higher vertex displacements. -# -aiTextureType_DISPLACEMENT = 0x9 - -# Lightmap texture (aka Ambient Occlusion) -# -# Both 'Lightmaps' and dedicated 'ambient occlusion maps' are -# covered by this material property. The texture contains a -# scaling value for the final color value of a pixel. Its -# intensity is not affected by incoming light. -# -aiTextureType_LIGHTMAP = 0xA - -# Reflection texture -# -# Contains the color of a perfect mirror reflection. -# Rarely used, almost never for real-time applications. -# -aiTextureType_REFLECTION = 0xB - -# Unknown texture -# -# A texture reference that does not match any of the definitions -# above is considered to be 'unknown'. It is still imported -# but is excluded from any further postprocessing. -# -aiTextureType_UNKNOWN = 0xC diff --git a/thirdparty/assimp/port/PyAssimp/pyassimp/postprocess.py b/thirdparty/assimp/port/PyAssimp/pyassimp/postprocess.py deleted file mode 100644 index 0c55d67..0000000 --- a/thirdparty/assimp/port/PyAssimp/pyassimp/postprocess.py +++ /dev/null @@ -1,530 +0,0 @@ -#
Calculates the tangents and bitangents for the imported meshes. -# -# Does nothing if a mesh does not have normals. You might want this post -# processing step to be executed if you plan to use tangent space calculations -# such as normal mapping applied to the meshes. There's a config setting, -# #AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE, which allows you to specify -# a maximum smoothing angle for the algorithm. However, usually you'll -# want to leave it at the default value. -# -aiProcess_CalcTangentSpace = 0x1 - -##
Identifies and joins identical vertex data sets within all -# imported meshes. -# -# After this step is run, each mesh contains unique vertices, -# so a vertex may be used by multiple faces. You usually want -# to use this post processing step. If your application deals with -# indexed geometry, this step is compulsory or you'll just waste rendering -# time. If this flag is not specified, no vertices are referenced by -# more than one face and no index buffer is required for rendering. -# -aiProcess_JoinIdenticalVertices = 0x2 - -##
Converts all the imported data to a left-handed coordinate space. -# -# By default the data is returned in a right-handed coordinate space (which -# OpenGL prefers). In this space, +X points to the right, -# +Z points towards the viewer, and +Y points upwards. In the DirectX -# coordinate space +X points to the right, +Y points upwards, and +Z points -# away from the viewer. -# -# You'll probably want to consider this flag if you use Direct3D for -# rendering. The #aiProcess_ConvertToLeftHanded flag supersedes this -# setting and bundles all conversions typically required for D3D-based -# applications. -# -aiProcess_MakeLeftHanded = 0x4 - -##
Triangulates all faces of all meshes. -# -# By default the imported mesh data might contain faces with more than 3 -# indices. For rendering you'll usually want all faces to be triangles. -# This post processing step splits up faces with more than 3 indices into -# triangles. Line and point primitives are #not# modified! If you want -# 'triangles only' with no other kinds of primitives, try the following -# solution: -#