소스 검색

- Bugfix: handling of XFile vertex colors is more forgiving now
- Bugfix: XFileImporter filters empty animation sets now.
- updated VC9 project files


git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@239 67173fc5-114c-0410-ac8e-9d2fd5bffc1f

ulfjorensen 17 년 전
부모
커밋
342ea0188a
3개의 변경된 파일145개의 추가작업 그리고 103개의 파일을 삭제
  1. 4 0
      code/XFileImporter.cpp
  2. 7 1
      code/XFileParser.cpp
  3. 134 102
      workspaces/vc9_ATMNotUpToDate/assimp.vcproj

+ 4 - 0
code/XFileImporter.cpp

@@ -410,6 +410,10 @@ void XFileImporter::CreateAnimations( aiScene* pScene, const XFile::Scene* pData
 	for( unsigned int a = 0; a < pData->mAnims.size(); a++)
 	{
 		const XFile::Animation* anim = pData->mAnims[a];
+    // some exporters mock me with empty animation tags.
+    if( anim->mAnims.size() == 0)
+      continue;
+
 		// create a new animation to hold the data
 		aiAnimation* nanim = new aiAnimation;
 		newAnims.push_back( nanim);

+ 7 - 1
code/XFileParser.cpp

@@ -466,7 +466,13 @@ void XFileParser::ParseDataObjectMeshVertexColors( Mesh* pMesh)
 			ThrowException( "Vertex color index out of bounds");
 
 		colors[index] = ReadRGBA();
-		CheckForSeparator();
+    // HACK: (thom) Maxon Cinema XPort plugin puts a third separator here. Ignore gracefully
+    if( !mIsBinaryFormat)
+    {
+      FindNextNoneWhiteSpace();
+      if( *P == ';')
+        P++;
+    }
 	}
 
 	CheckForClosingBrace();

+ 134 - 102
workspaces/vc9_ATMNotUpToDate/assimp.vcproj

@@ -83,10 +83,11 @@
 			/>
 		</Configuration>
 		<Configuration
-			Name="Debug|x64"
+			Name="Release|Win32"
 			OutputDirectory="./../../lib/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			ConfigurationType="4"
+			WholeProgramOptimization="0"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
@@ -102,19 +103,21 @@
 			/>
 			<Tool
 				Name="VCMIDLTool"
-				TargetEnvironment="3"
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				Optimization="0"
+				InlineFunctionExpansion="2"
+				EnableIntrinsicFunctions="true"
+				FavorSizeOrSpeed="1"
 				AdditionalIncludeDirectories=""
-				PreprocessorDefinitions="DEBUG, _SCL_SECURE_NO_WARNINGS, _CRT_SECURE_NO_WARNINGS,WIN32"
-				BasicRuntimeChecks="3"
-				SmallerTypeCheck="true"
-				RuntimeLibrary="1"
-				EnableFunctionLevelLinking="true"
+				PreprocessorDefinitions="NDEBUG;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;WIN32"
+				StringPooling="true"
+				BufferSecurityCheck="false"
+				EnableEnhancedInstructionSet="2"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="AssimpPCH.h"
 				WarningLevel="3"
-				DebugInformationFormat="3"
+				Detect64BitPortabilityProblems="false"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -145,10 +148,10 @@
 			/>
 		</Configuration>
 		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="./../../lib/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
+			Name="Release_DLL|Win32"
+			OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
-			ConfigurationType="4"
+			ConfigurationType="2"
 			WholeProgramOptimization="0"
 			>
 			<Tool
@@ -172,8 +175,9 @@
 				EnableIntrinsicFunctions="true"
 				FavorSizeOrSpeed="1"
 				AdditionalIncludeDirectories=""
-				PreprocessorDefinitions="NDEBUG;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;WIN32"
+				PreprocessorDefinitions="NDEBUG;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;WIN32;ASSIMP_BUILD_DLL_EXPORT"
 				StringPooling="true"
+				RuntimeLibrary="2"
 				BufferSecurityCheck="false"
 				EnableEnhancedInstructionSet="2"
 				UsePrecompiledHeader="2"
@@ -191,11 +195,18 @@
 				Name="VCPreLinkEventTool"
 			/>
 			<Tool
-				Name="VCLibrarianTool"
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)\Assimp32.dll"
+				RandomizedBaseAddress="1"
+				DataExecutionPrevention="0"
+				ImportLibrary="$(SolutionDir)..\..\lib\$(ProjectName)_$(ConfigurationName)_$(PlatformName)\assimp.lib"
 			/>
 			<Tool
 				Name="VCALinkTool"
 			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
 			<Tool
 				Name="VCXDCMakeTool"
 			/>
@@ -205,16 +216,19 @@
 			<Tool
 				Name="VCFxCopTool"
 			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
 			<Tool
 				Name="VCPostBuildEventTool"
+				CommandLine=""
 			/>
 		</Configuration>
 		<Configuration
-			Name="Release|x64"
-			OutputDirectory="./../../lib/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
+			Name="Debug_DLL|Win32"
+			OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
-			ConfigurationType="4"
-			WholeProgramOptimization="0"
+			ConfigurationType="2"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
@@ -230,22 +244,21 @@
 			/>
 			<Tool
 				Name="VCMIDLTool"
-				TargetEnvironment="3"
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="2"
-				EnableIntrinsicFunctions="true"
-				FavorSizeOrSpeed="1"
+				Optimization="0"
 				AdditionalIncludeDirectories=""
-				PreprocessorDefinitions="NDEBUG, _SCL_SECURE_NO_WARNINGS, _CRT_SECURE_NO_WARNINGS,WIN32"
-				StringPooling="true"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableEnhancedInstructionSet="0"
+				PreprocessorDefinitions="DEBUG;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;WIN32;ASSIMP_BUILD_DLL_EXPORT"
+				BasicRuntimeChecks="3"
+				SmallerTypeCheck="true"
+				RuntimeLibrary="3"
+				EnableFunctionLevelLinking="true"
 				UsePrecompiledHeader="2"
 				PrecompiledHeaderThrough="AssimpPCH.h"
 				WarningLevel="3"
+				Detect64BitPortabilityProblems="false"
+				DebugInformationFormat="4"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -257,11 +270,18 @@
 				Name="VCPreLinkEventTool"
 			/>
 			<Tool
-				Name="VCLibrarianTool"
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)\Assimp32d.dll"
+				RandomizedBaseAddress="1"
+				DataExecutionPrevention="0"
+				ImportLibrary="$(SolutionDir)..\..\lib\$(ProjectName)_$(ConfigurationName)_$(PlatformName)\assimp.lib"
 			/>
 			<Tool
 				Name="VCALinkTool"
 			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
 			<Tool
 				Name="VCXDCMakeTool"
 			/>
@@ -271,16 +291,19 @@
 			<Tool
 				Name="VCFxCopTool"
 			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
 			<Tool
 				Name="VCPostBuildEventTool"
+				CommandLine="copy &quot;$(OutDir)\$(TargetFileName)&quot; &quot;$(SolutionDir)..\..\bin\unittest_$(ConfigurationName)_$(PlatformName)&quot;"
 			/>
 		</Configuration>
 		<Configuration
-			Name="Release_DLL|Win32"
-			OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
+			Name="Debug|x64"
+			OutputDirectory="./../../lib/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
-			ConfigurationType="2"
-			WholeProgramOptimization="0"
+			ConfigurationType="4"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
@@ -296,22 +319,19 @@
 			/>
 			<Tool
 				Name="VCMIDLTool"
+				TargetEnvironment="3"
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				InlineFunctionExpansion="2"
-				EnableIntrinsicFunctions="true"
-				FavorSizeOrSpeed="1"
+				Optimization="0"
 				AdditionalIncludeDirectories=""
-				PreprocessorDefinitions="NDEBUG;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;WIN32;ASSIMP_BUILD_DLL_EXPORT"
-				StringPooling="true"
-				RuntimeLibrary="2"
-				BufferSecurityCheck="false"
-				EnableEnhancedInstructionSet="2"
-				UsePrecompiledHeader="2"
-				PrecompiledHeaderThrough="AssimpPCH.h"
+				PreprocessorDefinitions="DEBUG, _SCL_SECURE_NO_WARNINGS, _CRT_SECURE_NO_WARNINGS,WIN32"
+				BasicRuntimeChecks="3"
+				SmallerTypeCheck="true"
+				RuntimeLibrary="1"
+				EnableFunctionLevelLinking="true"
 				WarningLevel="3"
-				Detect64BitPortabilityProblems="false"
+				DebugInformationFormat="3"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -323,18 +343,11 @@
 				Name="VCPreLinkEventTool"
 			/>
 			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)\Assimp32.dll"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(SolutionDir)..\..\lib\$(ProjectName)_$(ConfigurationName)_$(PlatformName)\assimp.lib"
+				Name="VCLibrarianTool"
 			/>
 			<Tool
 				Name="VCALinkTool"
 			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
 			<Tool
 				Name="VCXDCMakeTool"
 			/>
@@ -344,19 +357,15 @@
 			<Tool
 				Name="VCFxCopTool"
 			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				CommandLine=""
 			/>
 		</Configuration>
 		<Configuration
-			Name="Release_DLL|x64"
-			OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
+			Name="Release|x64"
+			OutputDirectory="./../../lib/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
-			ConfigurationType="2"
+			ConfigurationType="4"
 			WholeProgramOptimization="0"
 			>
 			<Tool
@@ -381,11 +390,13 @@
 				EnableIntrinsicFunctions="true"
 				FavorSizeOrSpeed="1"
 				AdditionalIncludeDirectories=""
-				PreprocessorDefinitions="NDEBUG;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;WIN32;ASSIMP_BUILD_DLL_EXPORT"
+				PreprocessorDefinitions="NDEBUG, _SCL_SECURE_NO_WARNINGS, _CRT_SECURE_NO_WARNINGS,WIN32"
 				StringPooling="true"
-				RuntimeLibrary="2"
+				RuntimeLibrary="0"
 				BufferSecurityCheck="false"
 				EnableEnhancedInstructionSet="0"
+				UsePrecompiledHeader="2"
+				PrecompiledHeaderThrough="AssimpPCH.h"
 				WarningLevel="3"
 			/>
 			<Tool
@@ -398,19 +409,11 @@
 				Name="VCPreLinkEventTool"
 			/>
 			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)\Assimp64.dll"
-				RandomizedBaseAddress="1"
-				DataExecutionPrevention="0"
-				ImportLibrary="$(SolutionDir)..\..\lib\$(ProjectName)_$(ConfigurationName)_$(PlatformName)\assimp.lib"
-				TargetMachine="17"
+				Name="VCLibrarianTool"
 			/>
 			<Tool
 				Name="VCALinkTool"
 			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
 			<Tool
 				Name="VCXDCMakeTool"
 			/>
@@ -420,19 +423,16 @@
 			<Tool
 				Name="VCFxCopTool"
 			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
 			<Tool
 				Name="VCPostBuildEventTool"
-				CommandLine="copy &quot;$(OutDir)\$(TargetFileName)&quot; &quot;$(SolutionDir)..\..\bin\unittest_$(ConfigurationName)_$(PlatformName)&quot;"
 			/>
 		</Configuration>
 		<Configuration
-			Name="Debug_DLL|Win32"
+			Name="Release_DLL|x64"
 			OutputDirectory="./../../bin/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			IntermediateDirectory="./../../obj/$(ProjectName)_$(ConfigurationName)_$(PlatformName)"
 			ConfigurationType="2"
+			WholeProgramOptimization="0"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
@@ -448,21 +448,20 @@
 			/>
 			<Tool
 				Name="VCMIDLTool"
+				TargetEnvironment="3"
 			/>
 			<Tool
 				Name="VCCLCompilerTool"
-				Optimization="0"
+				InlineFunctionExpansion="2"
+				EnableIntrinsicFunctions="true"
+				FavorSizeOrSpeed="1"
 				AdditionalIncludeDirectories=""
-				PreprocessorDefinitions="DEBUG;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;WIN32;ASSIMP_BUILD_DLL_EXPORT"
-				BasicRuntimeChecks="3"
-				SmallerTypeCheck="true"
-				RuntimeLibrary="3"
-				EnableFunctionLevelLinking="true"
-				UsePrecompiledHeader="2"
-				PrecompiledHeaderThrough="AssimpPCH.h"
+				PreprocessorDefinitions="NDEBUG;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;WIN32;ASSIMP_BUILD_DLL_EXPORT"
+				StringPooling="true"
+				RuntimeLibrary="2"
+				BufferSecurityCheck="false"
+				EnableEnhancedInstructionSet="0"
 				WarningLevel="3"
-				Detect64BitPortabilityProblems="false"
-				DebugInformationFormat="4"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -475,10 +474,11 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				OutputFile="$(OutDir)\Assimp32d.dll"
+				OutputFile="$(OutDir)\Assimp64.dll"
 				RandomizedBaseAddress="1"
 				DataExecutionPrevention="0"
 				ImportLibrary="$(SolutionDir)..\..\lib\$(ProjectName)_$(ConfigurationName)_$(PlatformName)\assimp.lib"
+				TargetMachine="17"
 			/>
 			<Tool
 				Name="VCALinkTool"
@@ -935,7 +935,7 @@
 						/>
 					</FileConfiguration>
 					<FileConfiguration
-						Name="Release|x64"
+						Name="Release_DLL|Win32"
 						>
 						<Tool
 							Name="VCCLCompilerTool"
@@ -943,7 +943,7 @@
 						/>
 					</FileConfiguration>
 					<FileConfiguration
-						Name="Release_DLL|Win32"
+						Name="Debug_DLL|Win32"
 						>
 						<Tool
 							Name="VCCLCompilerTool"
@@ -951,7 +951,7 @@
 						/>
 					</FileConfiguration>
 					<FileConfiguration
-						Name="Debug_DLL|Win32"
+						Name="Release|x64"
 						>
 						<Tool
 							Name="VCCLCompilerTool"
@@ -1407,6 +1407,38 @@
 						>
 					</File>
 				</Filter>
+				<Filter
+					Name="B3D"
+					>
+					<File
+						RelativePath="..\..\code\B3DImporter.cpp"
+						>
+					</File>
+					<File
+						RelativePath="..\..\code\B3DImporter.h"
+						>
+					</File>
+				</Filter>
+				<Filter
+					Name="Collada"
+					>
+					<File
+						RelativePath="..\..\code\ColladaLoader.cpp"
+						>
+					</File>
+					<File
+						RelativePath="..\..\code\ColladaLoader.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\code\ColladaParser.cpp"
+						>
+					</File>
+					<File
+						RelativePath="..\..\code\ColladaParser.h"
+						>
+					</File>
+				</Filter>
 			</Filter>
 			<Filter
 				Name="PostProcess"
@@ -1589,15 +1621,16 @@
 						/>
 					</FileConfiguration>
 					<FileConfiguration
-						Name="Release|x64"
+						Name="Release_DLL|Win32"
 						>
 						<Tool
 							Name="VCCLCompilerTool"
 							UsePrecompiledHeader="1"
+							PrecompiledHeaderThrough="AssimpPCH.h"
 						/>
 					</FileConfiguration>
 					<FileConfiguration
-						Name="Release_DLL|Win32"
+						Name="Debug_DLL|Win32"
 						>
 						<Tool
 							Name="VCCLCompilerTool"
@@ -1606,12 +1639,11 @@
 						/>
 					</FileConfiguration>
 					<FileConfiguration
-						Name="Debug_DLL|Win32"
+						Name="Release|x64"
 						>
 						<Tool
 							Name="VCCLCompilerTool"
 							UsePrecompiledHeader="1"
-							PrecompiledHeaderThrough="AssimpPCH.h"
 						/>
 					</FileConfiguration>
 				</File>
@@ -1657,15 +1689,17 @@
 						/>
 					</FileConfiguration>
 					<FileConfiguration
-						Name="Debug|x64"
+						Name="Release|Win32"
 						>
 						<Tool
 							Name="VCCLCompilerTool"
+							BasicRuntimeChecks="0"
+							SmallerTypeCheck="false"
 							UsePrecompiledHeader="0"
 						/>
 					</FileConfiguration>
 					<FileConfiguration
-						Name="Release|Win32"
+						Name="Release_DLL|Win32"
 						>
 						<Tool
 							Name="VCCLCompilerTool"
@@ -1675,25 +1709,25 @@
 						/>
 					</FileConfiguration>
 					<FileConfiguration
-						Name="Release|x64"
+						Name="Debug_DLL|Win32"
 						>
 						<Tool
 							Name="VCCLCompilerTool"
+							BasicRuntimeChecks="0"
+							SmallerTypeCheck="false"
 							UsePrecompiledHeader="0"
 						/>
 					</FileConfiguration>
 					<FileConfiguration
-						Name="Release_DLL|Win32"
+						Name="Debug|x64"
 						>
 						<Tool
 							Name="VCCLCompilerTool"
-							BasicRuntimeChecks="0"
-							SmallerTypeCheck="false"
 							UsePrecompiledHeader="0"
 						/>
 					</FileConfiguration>
 					<FileConfiguration
-						Name="Release_DLL|x64"
+						Name="Release|x64"
 						>
 						<Tool
 							Name="VCCLCompilerTool"
@@ -1701,12 +1735,10 @@
 						/>
 					</FileConfiguration>
 					<FileConfiguration
-						Name="Debug_DLL|Win32"
+						Name="Release_DLL|x64"
 						>
 						<Tool
 							Name="VCCLCompilerTool"
-							BasicRuntimeChecks="0"
-							SmallerTypeCheck="false"
 							UsePrecompiledHeader="0"
 						/>
 					</FileConfiguration>