Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions AssetEditor/AssetEditor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<ProjectReference Include="..\Editors\SkeletonEditor\Editor.VisualSkeletonEditor\Editor.VisualSkeletonEditor.csproj" />
<ProjectReference Include="..\Editors\TextureEditor\Editors.TextureEditor.csproj" />
<ProjectReference Include="..\Editors\TwuiEditor\Editor.Twui\Editors.Twui.csproj" />
<ProjectReference Include="..\Editors\BmdEditor\Editors.BmdEditor.csproj" />
<ProjectReference Include="..\GameWorld\GameWorldCore\GameWorld.Core\GameWorld.Core.csproj" />
<ProjectReference Include="..\Shared\EmbeddedResources\Shared.EmbeddedResources.csproj" />
<ProjectReference Include="..\Shared\SharedUI\Shared.Ui\Shared.Ui.csproj" />
Expand Down
1 change: 1 addition & 0 deletions AssetEditor/Services/DependencyInjectionConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public DependencyInjectionConfig(bool loadResources = true)
new Editors.AnimatioReTarget.DependencyInjectionContainer(),
new Editors.Twui.DependencyInjectionContainer(),
new Editors.Ipc.DependencyInjectionContainer(),
new Editors.BmdEditor.DependencyInjectionContainer(),

// Host application
new DependencyInjectionContainer(),
Expand Down
2 changes: 2 additions & 0 deletions AssetEditor/ViewModels/MenuBarViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using Editors.AnimationFragmentEditor.AnimationPack.Commands;
using Editors.Reports.Animation;
using Editors.Reports.Audio;
using Editors.Reports.Bmd;
using Editors.Reports.DeepSearch;
using Editors.Reports.Files;
using Editors.Reports.Geometry;
Expand Down Expand Up @@ -88,6 +89,7 @@ [RelayCommand] private void CreateNewPackFile()
[RelayCommand] private void SaveActivePack() => _uiCommandFactory.Create<SavePackFileContainerCommand>().Execute();
[RelayCommand] private void OpenWh2AnimpackUpdater() => new AnimPackUpdaterService(_packfileService).Process();
[RelayCommand] private void GenerateRmv2Report() => _uiCommandFactory.Create<Rmv2ReportCommand>().Execute();
[RelayCommand] private void GenerateBmdReport() => _uiCommandFactory.Create<BmdReportCommand>().Execute();
[RelayCommand] private void GenerateMetaDataReport() => _uiCommandFactory.Create<GenerateMetaDataReportCommand>().Execute();
[RelayCommand] private void GenerateFileListReport() => _uiCommandFactory.Create<FileListReportCommand>().Execute();
[RelayCommand] private void GenerateMetaDataJsonsReport() => _uiCommandFactory.Create<GenerateMetaJsonDataReportCommand>().Execute();
Expand Down
1 change: 1 addition & 0 deletions AssetEditor/Views/MenuBarView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@

<MenuItem Header="{loc:Loc MenuBar.Reports}" BorderThickness="1.5" WindowChrome.IsHitTestVisibleInChrome="True">
<MenuItem Header="{loc:Loc MenuBar.Reports.Rmv2}" Command="{Binding MenuBar.GenerateRmv2ReportCommand}"/>
<MenuItem Header="{loc:Loc MenuBar.Reports.Bmd}" Command="{Binding MenuBar.GenerateBmdReportCommand}"/>
<MenuItem Header="{loc:Loc MenuBar.Reports.MetaData}" Command="{Binding MenuBar.GenerateMetaDataReportCommand}"/>
<MenuItem Header="{loc:Loc MenuBar.Reports.FileList}" Command="{Binding MenuBar.GenerateFileListReportCommand}"/>
<MenuItem Header="{loc:Loc MenuBar.Reports.MetaJsons}" Command="{Binding MenuBar.GenerateMetaDataJsonsReportCommand}"/>
Expand Down
51 changes: 51 additions & 0 deletions Editors/BmdEditor/DependencyInjectionContainer.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
using Editors.BmdEditor.ViewModels;
using Editors.BmdEditor.Views;
using Editors.BmdEditor.Services;
using Microsoft.Extensions.DependencyInjection;
using Shared.Core.DependencyInjection;
using Shared.Core.DevConfig;
using Shared.Core.ToolCreation;
using Shared.Core.ErrorHandling;
using Shared.Core.Services;
using Shared.Core.Events;
using GameWorld.Core.Services;
using GameWorld.Core.Components.Rendering;
using GameWorld.Core.Rendering.Materials;
using GameWorld.Core.Rendering.Geometry;
using GameWorld.Core.WpfWindow;
using GameWorld.Core.Components.Selection;

namespace Editors.BmdEditor
{
public class DependencyInjectionContainer : DependencyContainer
{
public override void Register(IServiceCollection serviceCollection)
{
// Views
serviceCollection.AddTransient<BmdEditorView>();
serviceCollection.AddTransient<BmdSceneView>();
serviceCollection.AddTransient<Bmd3DSceneViewer>();

// ViewModels
serviceCollection.AddScoped<BmdEditorViewModel>();
serviceCollection.AddScoped<BmdSceneViewModel>();
serviceCollection.AddScoped<IEditorInterface, BmdEditorViewModel>();

// Services
serviceCollection.AddScoped<BmdSceneCreator>();
serviceCollection.AddScoped<SelectionManager>();
serviceCollection.AddScoped<BmdElementLoader>();

RegisterAllAsInterface<IDeveloperConfiguration>(serviceCollection, ServiceLifetime.Transient);
}

public override void RegisterTools(IEditorDatabase editorDatabase)
{
EditorInfoBuilder
.Create<BmdEditorViewModel, BmdEditorView>(EditorEnums.BMD_Editor)
.AddExtention(".bmd", EditorPriorites.Default)
//.AddExtention(".bin", EditorPriorites.Default) // TODO: Re-enable when BMD parser is complete
.Build(editorDatabase);
}
}
}
15 changes: 15 additions & 0 deletions Editors/BmdEditor/Editors.BmdEditor.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0-windows</TargetFramework>
<UseWPF>true</UseWPF>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\GameWorld\GameWorldCore\GameWorld.Core\GameWorld.Core.csproj" />
<ProjectReference Include="..\..\Shared\SharedCore\Shared.Core\Shared.Core.csproj" />
<ProjectReference Include="..\..\Shared\GameFiles\Shared.GameFormats.csproj" />
<ProjectReference Include="..\..\Shared\SharedUI\Shared.Ui\Shared.Ui.csproj" />
</ItemGroup>

</Project>
Loading
Loading