Browse Source

Updated nuget packages.
Improved compatibility with .VRM files.

Vicente Penades 5 years ago
parent
commit
2d071e2a84

+ 1 - 1
build/SharpGLTF.CodeGen/SharpGLTF.CodeGen.csproj

@@ -8,7 +8,7 @@
 
   <ItemGroup>
     <PackageReference Include="LibGit2Sharp" Version="0.26.2" />    
-    <PackageReference Include="NJsonSchema.CodeGeneration.CSharp" Version="10.1.15" />
+    <PackageReference Include="NJsonSchema.CodeGeneration.CSharp" Version="10.1.16" />
   </ItemGroup>
 
 </Project>

+ 1 - 1
src/SharpGLTF.Core/Schema2/gltf.ExtensionsFactory.cs

@@ -129,7 +129,7 @@ namespace SharpGLTF.Schema2
         internal IEnumerable<string> RetrieveUsedExtensions()
         {
             // retrieve ALL the property based objects of the whole model.
-            var allObjects = GetLogicalChildrenFlattened();
+            var allObjects = new[] { this }.Concat(GetLogicalChildrenFlattened());
 
             // check all the extensions used by each object
             var used = new HashSet<string>();

+ 1 - 1
src/SharpGLTF.Core/SharpGLTF.Core.csproj

@@ -27,7 +27,7 @@
   </ItemGroup>  
   
   <ItemGroup>
-    <PackageReference Include="System.Text.Json" Version="4.7.1" />
+    <PackageReference Include="System.Text.Json" Version="4.7.2" />
   </ItemGroup>
 
   <ItemGroup>

+ 2 - 2
tests/SharpGLTF.DownloadTestFiles/ExampleFiles.cs

@@ -34,8 +34,8 @@ namespace SharpGLTF
             var dstPath = System.IO.Path.Combine(_WorkingDirectory, "GeneratedReferenceModels", "v_0_6_1.zip");
             _GeneratedModelsDir = DownloadUtils.DownloadFile("https://github.com/KhronosGroup/glTF-Asset-Generator/releases/download/v0.6.1/GeneratedAssets-0.6.1.zip", dstPath);
 
-            dstPath = System.IO.Path.Combine(_UniVRMModelsDir, "AliciaSolid_vrm-0.40.vrm");
-            DownloadUtils.DownloadFile("https://github.com/vrm-c/UniVRMTest/raw/master/Models/Alicia_vrm-0.40/AliciaSolid_vrm-0.40.vrm", dstPath);
+            dstPath = System.IO.Path.Combine(_UniVRMModelsDir, "AliciaSolid_vrm-0.51.vrm");
+            DownloadUtils.DownloadFile("https://github.com/vrm-c/UniVRM/raw/master/Tests/Models/Alicia_vrm-0.51/AliciaSolid_vrm-0.51.vrm", dstPath);
 
             Console.WriteLine("Checking out test files... It might take a while, please, wait...");
 

+ 1 - 1
tests/SharpGLTF.NUnit/TestFiles.cs

@@ -225,7 +225,7 @@ namespace SharpGLTF
         {
             _Check();
 
-            return System.IO.Path.Combine(_UniVRMModelsDir, "AliciaSolid_vrm-0.40.vrm");
+            return System.IO.Path.Combine(_UniVRMModelsDir, "AliciaSolid_vrm-0.51.vrm");
         }
 
         private static IReadOnlyList<string> GetModelPathsInDirectory(params string[] paths)

+ 3 - 1
tests/SharpGLTF.Tests/Schema2/LoadAndSave/LoadSpecialModelsTest.cs

@@ -93,7 +93,7 @@ namespace SharpGLTF.Schema2.LoadAndSave
             }
         }
 
-        // [Test]
+        [Test]
         public void LoadUniVRM()
         {
             TestContext.CurrentContext.AttachShowDirLink();
@@ -103,6 +103,8 @@ namespace SharpGLTF.Schema2.LoadAndSave
             var model = ModelRoot.Load(path);
             Assert.NotNull(model);
 
+            var flattenExtensions = model.RetrieveUsedExtensions().ToArray();
+
             model.AttachToCurrentTest("AliceModel.glb");
         }