Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Asset] Unified 3D asset importer (on behalf of Noa7/Noah7071) #2163

Merged
merged 88 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
ed0e939
BASE COMM
noa7 Jan 30, 2024
a3f044a
Updates on Shader and resource marshaling
noa7 Jan 30, 2024
8a3c13f
Update- cleanup
noa7 Jan 31, 2024
a679906
Updates- clean up
noa7 Jan 31, 2024
afe10c0
Updates
noa7 Jan 31, 2024
0a516fd
Updates as by Eidren & IXLLEGACYIXL on Github PR review
noa7707 Feb 1, 2024
6649b09
Update shader- remove commented test code
Noah7071 Feb 1, 2024
6ed75b6
Update: Clean up to effect class & shader
Noah7071 Feb 1, 2024
5db94d9
Scale Factor moved to Importer
Noah7071 Feb 1, 2024
c04c84d
Removed extra class Vec4
Noah7071 Feb 1, 2024
e66c0c8
Fix to update scale factor in impoter
Noah7071 Feb 1, 2024
36c3daf
Normal fix on blendshapes
Noah7071 Feb 7, 2024
06c130b
Normal fix
Noah7071 Feb 7, 2024
1751b13
IMPORTER CKECIIN
Noah7071 Feb 18, 2024
af97e33
Importer
Noah7071 Feb 20, 2024
b479aac
Incorporating Kryptos feedback on PR
Noah7071 Feb 20, 2024
f492fc5
Incorporating doprez feedback
Noah7071 Feb 20, 2024
52bb440
Updated .props to remove Assimp from Runtime refs
Noah7071 Feb 21, 2024
67fe225
Feedback from Jklawreszuk
Noah7071 Feb 21, 2024
396b3e3
Removed workspace file, Jklawreszuk
Noah7071 Feb 21, 2024
d8bed82
Feedback from IXLLEGACYIXL
Noah7071 Feb 21, 2024
7cbd671
Account for default scaling
Noah7071 Feb 21, 2024
3e63b07
Removed Assimp feedback Wolffy101
Noah7071 Feb 21, 2024
3374082
Multiple Animation
Noah7071 Feb 22, 2024
15b1791
Removed test leftover code
Noah7071 Feb 22, 2024
6a292b4
UI update to give option to(or not to) import animatioms
Noah7071 Feb 22, 2024
ba707a8
Feedback empty spaces @Kryptos
Noah7071 Feb 22, 2024
167112b
BlendShape+Importer
Noah7071 Mar 1, 2024
87cd7cd
PR Feedback
Noah7071 Mar 2, 2024
0de8d50
PR Feedback
Noah7071 Mar 2, 2024
0f9c79e
Blendshape
Noah7071 Mar 2, 2024
6c0d92a
Root check
Noah7071 Mar 7, 2024
0bcefd5
Feed back implementation
Noah7071 Mar 12, 2024
89f4da8
Feedback implementation @Eideren
Noah7071 Mar 12, 2024
828fe32
Feedback implementation @Eideren
Noah7071 Mar 12, 2024
d818cca
Feedback incorporated @Eideren
Noah7071 Mar 12, 2024
5f9687c
Animationscale @Eideren
Noah7071 Mar 12, 2024
03aca2a
Anim root data
Noah7071 Mar 13, 2024
8749776
Animation Update
Noah7071 Mar 29, 2024
c0d5251
Update aling the file to latest
Noah7071 Mar 29, 2024
b427dfb
logging feeback
Noah7071 Mar 29, 2024
0c959e6
Removed blendshape code of importer
Noah7071 Mar 29, 2024
25db355
Removed blendshape code
Noah7071 Mar 29, 2024
e2a0d18
Fix for pipe "|" character in name
Noah7071 Mar 30, 2024
4721401
Invalid chars replace to _
Noah7071 Mar 30, 2024
fb36cf4
Invalid char fix
Noah7071 Mar 30, 2024
10ceeb6
Handling invalid char
Noah7071 Mar 30, 2024
0b8fbbb
Remove data field contains blend shape
Noah7071 Mar 31, 2024
7ba5762
Reverting non impacted files
Noah7071 Mar 31, 2024
aa300ad
Line gap
Noah7071 Mar 31, 2024
aa2ed18
Rebase
Noah7071 Mar 31, 2024
03d4bf9
Fix of anim import node name invid chracaters
Noah7071 Mar 31, 2024
4873392
Optimize invalid char replace code
Noah7071 Mar 31, 2024
a368f11
Fix mesh bone to sksleton for invalid char
Noah7071 Mar 31, 2024
d8f718a
Fix Node naming
Noah7071 Apr 1, 2024
f5a5534
Revert "Fix Node naming"
Noah7071 Apr 1, 2024
887a7c7
Fix for animation only import
Noah7071 Apr 1, 2024
74c1ff1
Revert "Fix for animation only import"
Noah7071 Apr 1, 2024
eccc072
Fix to anim not loading
Noah7071 Apr 1, 2024
ec79e2e
Anim importer fix
Noah7071 Apr 1, 2024
13419c6
Naming issues
Noah7071 Apr 2, 2024
2cad466
Sword fix
Noah7071 Apr 2, 2024
dd2d7f8
debug code removal
Noah7071 Apr 2, 2024
c6a2e8b
Line break spacings
Noah7071 Apr 2, 2024
1a75711
Null check skeletonURL
Noah7071 Apr 2, 2024
871fe9e
Revert import UI Text
Noah7071 Apr 2, 2024
d3870ed
Casing
Noah7071 Apr 2, 2024
ead5eee
Duplicate line
Noah7071 Apr 2, 2024
b56c555
Duplicate line
Noah7071 Apr 2, 2024
82720dd
Removed Impoter.Assimp
Noah7071 Apr 2, 2024
9b54db5
Shift keys
Noah7071 Apr 2, 2024
1c1b85f
Removed namespace
Noah7071 Apr 2, 2024
4a78465
Mannaquin bones fix
Noah7071 Apr 2, 2024
cfe2466
Animation pivots
Noah7071 Apr 2, 2024
774d286
Anim fix
Noah7071 Apr 3, 2024
98095c8
Anim Importer Debone Fix
Noah7071 Apr 3, 2024
a68e883
spacing and comm code
Noah7071 Apr 3, 2024
23535bf
Hashset for list bone name
Noah7071 Apr 3, 2024
55e2d25
extra parameter
Noah7071 Apr 3, 2024
2128a92
UV coords fixed
Noah7071 Apr 3, 2024
b260e77
Spacings removaal
Noah7071 Apr 3, 2024
ef3ef1f
more spacing
Noah7071 Apr 3, 2024
dd4ba9f
spacing
Noah7071 Apr 3, 2024
e8209e3
Fix line ending for Directory.Packages.props
Eideren Apr 3, 2024
e86da5d
Fix spacing
Eideren Apr 3, 2024
5ad2373
Rollback analyzer change
Eideren Apr 3, 2024
20815cd
Fix spacing
Eideren Apr 3, 2024
5d7522c
Merge branch 'master' into Unified_ThreeD_Importer
Eideren Apr 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 16 additions & 29 deletions build/Stride.sln
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stride.Input.Tests.Windows"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stride.Core.Tests", "..\sources\core\Stride.Core.Tests\Stride.Core.Tests.csproj", "{5AA408BA-E766-453E-B661-E3D7EC46E2A6}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Stride.Importer.FBX", "..\sources\tools\Stride.Importer.FBX\Stride.Importer.FBX.vcxproj", "{0467D515-FD66-4B8A-A128-CB642C2ED03F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stride.Core.Shaders", "..\sources\shaders\Stride.Core.Shaders\Stride.Core.Shaders.csproj", "{F2D52EDB-BC17-4243-B06D-33CD20F87A7F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stride.Core.Presentation.Wpf", "..\sources\presentation\Stride.Core.Presentation.Wpf\Stride.Core.Presentation.Wpf.csproj", "{47AFCC2E-E9F0-47D6-9D75-9E646546A92B}"
Expand Down Expand Up @@ -312,8 +310,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "xunit.runner.stride", "..\s
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stride.Engine.NoAssets.Tests.Windows", "..\sources\engine\Stride.Engine.NoAssets.Tests\Stride.Engine.NoAssets.Tests.Windows.csproj", "{1C94168A-3C0D-4C6B-883B-91627D2EF3A1}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stride.Importer.Assimp", "..\sources\tools\Stride.Importer.Assimp\Stride.Importer.Assimp.csproj", "{967BA05D-4AC4-4848-AEFD-894EF2309E4D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stride.Importer.Common", "..\sources\tools\Stride.Importer.Common\Stride.Importer.Common.csproj", "{806AA078-6070-4BB6-B05B-6EE6B21B1CDE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stride.Core.CompilerServices", "..\sources\core\Stride.Core.CompilerServices\Stride.Core.CompilerServices.csproj", "{D62BBD65-AB1C-41C7-8EC3-88949993C71E}"
Expand All @@ -332,7 +328,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stride.NuGetResolver", "..\
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NuGetResolver", "NuGetResolver", "{158087CF-AF74-44E9-AA20-A6AEB1E398A9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Stride.Core.Presentation", "..\sources\presentation\Stride.Core.Presentation\Stride.Core.Presentation.csproj", "{0C63EF8B-26F9-4511-9FC5-7431DE9657D6}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stride.Core.Presentation", "..\sources\presentation\Stride.Core.Presentation\Stride.Core.Presentation.csproj", "{0C63EF8B-26F9-4511-9FC5-7431DE9657D6}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stride.Importer.3D", "..\sources\tools\Stride.Importer.3D\Stride.Importer.3D.csproj", "{66EFFDE4-24F0-4E57-9618-0F5577E20A1E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -405,16 +403,6 @@ Global
{5AA408BA-E766-453E-B661-E3D7EC46E2A6}.Release|Mixed Platforms.Build.0 = Debug|Any CPU
{5AA408BA-E766-453E-B661-E3D7EC46E2A6}.Release|Win32.ActiveCfg = Debug|Any CPU
{5AA408BA-E766-453E-B661-E3D7EC46E2A6}.Release|Win32.Build.0 = Debug|Any CPU
{0467D515-FD66-4B8A-A128-CB642C2ED03F}.Debug|Any CPU.ActiveCfg = Debug|Win32
{0467D515-FD66-4B8A-A128-CB642C2ED03F}.Debug|Mixed Platforms.ActiveCfg = Debug|x64
{0467D515-FD66-4B8A-A128-CB642C2ED03F}.Debug|Mixed Platforms.Build.0 = Debug|x64
{0467D515-FD66-4B8A-A128-CB642C2ED03F}.Debug|Win32.ActiveCfg = Debug|Win32
{0467D515-FD66-4B8A-A128-CB642C2ED03F}.Debug|Win32.Build.0 = Debug|Win32
{0467D515-FD66-4B8A-A128-CB642C2ED03F}.Release|Any CPU.ActiveCfg = Release|Win32
{0467D515-FD66-4B8A-A128-CB642C2ED03F}.Release|Mixed Platforms.ActiveCfg = Release|x64
{0467D515-FD66-4B8A-A128-CB642C2ED03F}.Release|Mixed Platforms.Build.0 = Release|x64
{0467D515-FD66-4B8A-A128-CB642C2ED03F}.Release|Win32.ActiveCfg = Release|Win32
{0467D515-FD66-4B8A-A128-CB642C2ED03F}.Release|Win32.Build.0 = Release|Win32
{F2D52EDB-BC17-4243-B06D-33CD20F87A7F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F2D52EDB-BC17-4243-B06D-33CD20F87A7F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F2D52EDB-BC17-4243-B06D-33CD20F87A7F}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -1385,18 +1373,6 @@ Global
{1C94168A-3C0D-4C6B-883B-91627D2EF3A1}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{1C94168A-3C0D-4C6B-883B-91627D2EF3A1}.Release|Win32.ActiveCfg = Release|Any CPU
{1C94168A-3C0D-4C6B-883B-91627D2EF3A1}.Release|Win32.Build.0 = Release|Any CPU
{967BA05D-4AC4-4848-AEFD-894EF2309E4D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{967BA05D-4AC4-4848-AEFD-894EF2309E4D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{967BA05D-4AC4-4848-AEFD-894EF2309E4D}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{967BA05D-4AC4-4848-AEFD-894EF2309E4D}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{967BA05D-4AC4-4848-AEFD-894EF2309E4D}.Debug|Win32.ActiveCfg = Debug|Any CPU
{967BA05D-4AC4-4848-AEFD-894EF2309E4D}.Debug|Win32.Build.0 = Debug|Any CPU
{967BA05D-4AC4-4848-AEFD-894EF2309E4D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{967BA05D-4AC4-4848-AEFD-894EF2309E4D}.Release|Any CPU.Build.0 = Release|Any CPU
{967BA05D-4AC4-4848-AEFD-894EF2309E4D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{967BA05D-4AC4-4848-AEFD-894EF2309E4D}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{967BA05D-4AC4-4848-AEFD-894EF2309E4D}.Release|Win32.ActiveCfg = Release|Any CPU
{967BA05D-4AC4-4848-AEFD-894EF2309E4D}.Release|Win32.Build.0 = Release|Any CPU
{806AA078-6070-4BB6-B05B-6EE6B21B1CDE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{806AA078-6070-4BB6-B05B-6EE6B21B1CDE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{806AA078-6070-4BB6-B05B-6EE6B21B1CDE}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -1493,6 +1469,18 @@ Global
{0C63EF8B-26F9-4511-9FC5-7431DE9657D6}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{0C63EF8B-26F9-4511-9FC5-7431DE9657D6}.Release|Win32.ActiveCfg = Release|Any CPU
{0C63EF8B-26F9-4511-9FC5-7431DE9657D6}.Release|Win32.Build.0 = Release|Any CPU
{66EFFDE4-24F0-4E57-9618-0F5577E20A1E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{66EFFDE4-24F0-4E57-9618-0F5577E20A1E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{66EFFDE4-24F0-4E57-9618-0F5577E20A1E}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{66EFFDE4-24F0-4E57-9618-0F5577E20A1E}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{66EFFDE4-24F0-4E57-9618-0F5577E20A1E}.Debug|Win32.ActiveCfg = Debug|Any CPU
{66EFFDE4-24F0-4E57-9618-0F5577E20A1E}.Debug|Win32.Build.0 = Debug|Any CPU
{66EFFDE4-24F0-4E57-9618-0F5577E20A1E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{66EFFDE4-24F0-4E57-9618-0F5577E20A1E}.Release|Any CPU.Build.0 = Release|Any CPU
{66EFFDE4-24F0-4E57-9618-0F5577E20A1E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{66EFFDE4-24F0-4E57-9618-0F5577E20A1E}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{66EFFDE4-24F0-4E57-9618-0F5577E20A1E}.Release|Win32.ActiveCfg = Release|Any CPU
{66EFFDE4-24F0-4E57-9618-0F5577E20A1E}.Release|Win32.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -1508,7 +1496,6 @@ Global
{A8F8D125-7A22-489F-99BC-9A02F545A17F} = {A7ED9F01-7D78-4381-90A6-D50E51C17250}
{01700344-CF44-482C-BEBC-60213B0F844C} = {A7ED9F01-7D78-4381-90A6-D50E51C17250}
{5AA408BA-E766-453E-B661-E3D7EC46E2A6} = {22ADD4CD-092E-4ADC-A21E-64CF42230152}
{0467D515-FD66-4B8A-A128-CB642C2ED03F} = {6F473FA6-4F8B-4FBA-AE33-EE5AF997D50C}
{F2D52EDB-BC17-4243-B06D-33CD20F87A7F} = {10D145AF-C8AE-428F-A80F-CA1B591D0DB2}
{47AFCC2E-E9F0-47D6-9D75-9E646546A92B} = {75A820AB-0F21-40F2-9448-5D7F495B97A0}
{C223FCD7-CDCC-4943-9E11-9C2CC8FA9FC4} = {52AE329E-B588-40D0-A578-8D0DB1BD83E5}
Expand Down Expand Up @@ -1608,7 +1595,6 @@ Global
{66BE41FC-FC52-48D0-9C04-BCE8CC393020} = {4C142567-C42B-40F5-B092-798882190209}
{D5B023BE-010F-44A8-ABF1-DB6F3BCEA392} = {1AE1AC60-5D2F-4CA7-AE20-888F44551185}
{1C94168A-3C0D-4C6B-883B-91627D2EF3A1} = {A7ED9F01-7D78-4381-90A6-D50E51C17250}
{967BA05D-4AC4-4848-AEFD-894EF2309E4D} = {6F473FA6-4F8B-4FBA-AE33-EE5AF997D50C}
{806AA078-6070-4BB6-B05B-6EE6B21B1CDE} = {6F473FA6-4F8B-4FBA-AE33-EE5AF997D50C}
{D62BBD65-AB1C-41C7-8EC3-88949993C71E} = {2E93E2B5-4500-4E47-9B65-E705218AB578}
{BACD76E5-35D0-4389-9BB9-8743AC4D89DE} = {22ADD4CD-092E-4ADC-A21E-64CF42230152}
Expand All @@ -1619,6 +1605,7 @@ Global
{02FD0BDE-4293-414F-97E6-69FF71105420} = {158087CF-AF74-44E9-AA20-A6AEB1E398A9}
{158087CF-AF74-44E9-AA20-A6AEB1E398A9} = {1AE1AC60-5D2F-4CA7-AE20-888F44551185}
{0C63EF8B-26F9-4511-9FC5-7431DE9657D6} = {75A820AB-0F21-40F2-9448-5D7F495B97A0}
{66EFFDE4-24F0-4E57-9618-0F5577E20A1E} = {6F473FA6-4F8B-4FBA-AE33-EE5AF997D50C}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {FF877973-604D-4EA7-B5F5-A129961F9EF2}
Expand Down
2 changes: 1 addition & 1 deletion sources/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,4 @@
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.7.0" PrivateAssets="all" />
<PackageVersion Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" />
</ItemGroup>
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ protected override async Task<bool> PrepareAssetCreation(AssetTemplateGeneratorP
if (files == null)
return true;

var showDeduplicateMaterialsCheckBox = files.Any(x => ImportAssimpCommand.IsSupportingExtensions(x.GetFileExtension()));
var showFbxDedupeNotSupportedWarning = showDeduplicateMaterialsCheckBox && files.Any(x => ImportFbxCommand.IsSupportingExtensions(x.GetFileExtension()));
var showDeduplicateMaterialsCheckBox = files.Any(x => ImportThreeDCommand.IsSupportingExtensions(x.GetFileExtension()));
// Load settings from the last time this template was used for this project
var profile = parameters.Package.UserSettings.Profile;
var window = new ModelAssetTemplateWindow
Expand All @@ -67,7 +66,7 @@ protected override async Task<bool> PrepareAssetCreation(AssetTemplateGeneratorP
{
ImportMaterials = ModelFromFileTemplateSettings.ImportMaterials.GetValue(profile, true),
ShowDeduplicateMaterialsCheckBox = showDeduplicateMaterialsCheckBox,
ShowFbxDedupeNotSupportedWarning = showFbxDedupeNotSupportedWarning,
ShowFbxDedupeNotSupportedWarning = false,
DeduplicateMaterials = ModelFromFileTemplateSettings.DeduplicateMaterials.GetValue(profile, true),
ImportTextures = ModelFromFileTemplateSettings.ImportTextures.GetValue(profile, true),
ImportSkeleton = ModelFromFileTemplateSettings.ImportSkeleton.GetValue(profile, true)
Expand Down
1 change: 1 addition & 0 deletions sources/editor/Stride.GameStudio/Stride.GameStudio.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AssimpNet" />
Eideren marked this conversation as resolved.
Show resolved Hide resolved
<PackageReference Include="ServiceWire" />
<PackageReference Include="SharpDX" />
<PackageReference Include="Stride.Metrics" />
Expand Down
50 changes: 0 additions & 50 deletions sources/engine/Stride.Assets.Models/FbxAssetImporter.cs

This file was deleted.

67 changes: 0 additions & 67 deletions sources/engine/Stride.Assets.Models/ImportFbxCommand.cs

This file was deleted.

6 changes: 2 additions & 4 deletions sources/engine/Stride.Assets.Models/ImportModelCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,8 @@ public abstract partial class ImportModelCommand : SingleFileImportCommand

public static ImportModelCommand Create(string extension)
{
if (ImportFbxCommand.IsSupportingExtensions(extension))
return new ImportFbxCommand();
if (ImportAssimpCommand.IsSupportingExtensions(extension))
return new ImportAssimpCommand();
if (ImportThreeDCommand.IsSupportingExtensions(extension))
return new ImportThreeDCommand();

return null;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// Copyright (c) .NET Foundation and Contributors (https://dotnetfoundation.org/ & https://stride3d.net) and Silicon Studio Corp. (https://www.siliconstudio.co.jp)
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.


using System;
using System.Collections.Generic;
using System.ComponentModel;
Expand All @@ -15,9 +17,9 @@
namespace Stride.Assets.Models
{
[Description("Import Assimp")]
public class ImportAssimpCommand : ImportModelCommand
public class ImportThreeDCommand : ImportModelCommand
{
private static string[] supportedExtensions = AssimpAssetImporter.FileExtensions.Split(';');
private static string[] supportedExtensions = ThreeDAssetImporter.FileExtensions.Split(';');

/// <inheritdoc/>
public override string Title { get { string title = "Import Assimp "; try { title += Path.GetFileName(SourcePath) ?? "[File]"; } catch { title += "[INVALID PATH]"; } return title; } }
Expand All @@ -32,9 +34,10 @@ public static bool IsSupportingExtensions(string ext)
return supportedExtensions.Any(supExt => supExt.Equals(extToLower));
}

private Stride.Importer.Assimp.MeshConverter CreateMeshConverter(ICommandContext commandContext)

private Stride.Importer.ThreeD.MeshConverter CreateMeshConverter(ICommandContext commandContext)
{
return new Stride.Importer.Assimp.MeshConverter(commandContext.Logger)
return new Stride.Importer.ThreeD.MeshConverter(commandContext.Logger)
{
AllowUnsignedBlendIndices = this.AllowUnsignedBlendIndices,
};
Expand Down Expand Up @@ -73,3 +76,4 @@ public override string ToString()
}
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@
</Compile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\tools\Stride.Importer.Assimp\Stride.Importer.Assimp.csproj" />
<ProjectReference Include="..\..\tools\Stride.Importer.Common\Stride.Importer.Common.csproj" />
<ProjectReference Include="..\..\tools\Stride.Importer.FBX\Stride.Importer.FBX.vcxproj" PrivateAssets="All" />
<ProjectReference Include="..\..\tools\Stride.Importer.3D\Stride.Importer.3D.csproj" />
<ProjectReference Include="..\Stride.Assets\Stride.Assets.csproj" />
</ItemGroup>
<ItemGroup>
Expand All @@ -32,16 +31,12 @@
<ItemGroup>
<!-- Needed by .NET Core runtime to be able to load C++/CLI assemblies -->
<BuildOutputInPackage Include="$(OutputPath)ijwhost.dll" Condition="Exists('$(OutputPath)ijwhost.dll')" />
<BuildOutputInPackage Include="$(OutputPath)Stride.Importer.Assimp.dll" />
<BuildOutputInPackage Include="$(OutputPath)Stride.Importer.FBX.dll" />
<BuildOutputInPackage Include="$(OutputPath)Stride.Importer.FBX.ssdeps" />
<BuildOutputInPackage Include="$(OutputPath)Stride.Importer.Common.dll" />
<BuildOutputInPackage Include="$(OutputPath)Stride.Importer.Common.dll" />
Eideren marked this conversation as resolved.
Show resolved Hide resolved
</ItemGroup>
</Target>

<Target Name="_StrideIncludeNativeLibs">
<ItemGroup>
<TfmSpecificPackageFile Include="$(OutputPath)runtimes\win-x64\native\libfbxsdk.dll" PackagePath="runtimes\win-x64\native\libfbxsdk.dll" />
</ItemGroup>
</Target>
</Project>
Loading