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
4 changes: 1 addition & 3 deletions AssetEditor/Language_Cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"SettingsWindow.OnlyLoadLod0": "仅为参考 Mesh 加载 Lod0",
"SettingsWindow.GridSize": "网格大小",
"SettingsWindow.VertexSelectionColour": "顶点选择颜色",
"SettingsWindow.AudioModding": "音频 Mod",
"SettingsWindow.SaveButton": "保存",

"UpdaterWindow.Title": "更新器",
Expand Down Expand Up @@ -101,8 +100,6 @@
"SettingsWindow.VertexSelectionColourTooltip": "选中顶点的十六进制颜色(例如 #FF7800)",
"SettingsWindow.GameFiles": "游戏文件",
"SettingsWindow.GameDataPathHint": "浏览游戏数据位置,例如 \"C:\\SteamLibrary\\steamapps\\common\\Total War WARHAMMER III\\data\"",
"SettingsWindow.WwiseCLI": "Wwise CLI",
"SettingsWindow.WwiseCliPathHint": "例如 \"C:\\Program Files (x86)\\Audiokinetic\\Wwise2019.2.15.7667\\Authoring\\x64\\Release\\bin\\WwiseCLI.exe\"",

"MenuBar.File": "_文件",
"MenuBar.File.NewPack": "新建 Pack",
Expand Down Expand Up @@ -749,6 +746,7 @@
"MetadataEditor.NewEntryWindow.Title": "创建元数据条目",

"WaveformVisualiser.Play": "播放",
"WaveformVisualiser.Pause": "暂停",

"AudioProjectExplorer.DialogueEventFilters": "对话事件筛选",
"AudioProjectExplorer.Watermark.DialogueEventTypeFilter": "选择对话事件类型筛选",
Expand Down
4 changes: 1 addition & 3 deletions AssetEditor/Language_En.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"SettingsWindow.OnlyLoadLod0": "Only load Lod0 for reference meshes",
"SettingsWindow.GridSize": "Grid Size",
"SettingsWindow.VertexSelectionColour": "Vertex Selection Colour",
"SettingsWindow.AudioModding": "Audio Modding",
"SettingsWindow.SaveButton": "Save",

"UpdaterWindow.Title": "Updater",
Expand Down Expand Up @@ -101,8 +100,6 @@
"SettingsWindow.VertexSelectionColourTooltip": "Hex colour for selected vertices (e.g. #FF7800)",
"SettingsWindow.GameFiles": "Game Files",
"SettingsWindow.GameDataPathHint": "Browse for game data location e.g. \"C:\\SteamLibrary\\steamapps\\common\\Total War WARHAMMER III\\data\"",
"SettingsWindow.WwiseCLI": "Wwise CLI",
"SettingsWindow.WwiseCliPathHint": "e.g. \"C:\\Program Files (x86)\\Audiokinetic\\Wwise2019.2.15.7667\\Authoring\\x64\\Release\\bin\\WwiseCLI.exe\"",

"MenuBar.File": "_File",
"MenuBar.File.NewPack": "New Pack",
Expand Down Expand Up @@ -749,6 +746,7 @@
"MetadataEditor.NewEntryWindow.Title": "Create MetaData entry",

"WaveformVisualiser.Play": "Play",
"WaveformVisualiser.Pause": "Pause",

"AudioProjectExplorer.DialogueEventFilters": "Dialogue Event Filters",
"AudioProjectExplorer.Watermark.DialogueEventTypeFilter": "Select Dialogue Event Type Filter",
Expand Down
6 changes: 4 additions & 2 deletions AssetEditor/Language_Fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"SettingsWindow.OnlyLoadLod0": "Charger uniquement le Lod0 pour les maillages de référence",
"SettingsWindow.GridSize": "Taille de la grille",
"SettingsWindow.VertexSelectionColour": "Couleur de sélection des sommets",
"SettingsWindow.AudioModding": "Modding audio",
"SettingsWindow.SaveButton": "Enregistrer",

"UpdaterWindow.Title": "Mise à jour",
Expand All @@ -36,5 +35,8 @@
"PackFileCache.InvalidReason.Corrupted": "Cache for {0} is corrupted and will be rebuilt.",
"PackFileCache.BuildingCache": "Building pack file cache for {0}. This may take some time, please wait...",
"PackFileCache.BuildingCache.Title": "Building Cache",
"PackFileCache.Description": "The cache allows faster startup times and reduces memory usage by storing pre-processed game file data on disk."
"PackFileCache.Description": "The cache allows faster startup times and reduces memory usage by storing pre-processed game file data on disk.",

"WaveformVisualiser.Play": "Lecture",
"WaveformVisualiser.Pause": "Pause"
}
13 changes: 0 additions & 13 deletions AssetEditor/ViewModels/SettingsViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ partial class SettingsViewModel : ObservableObject
[ObservableProperty] private GameTypeEnum _currentGame;
[ObservableProperty] private bool _loadCaPacksByDefault;
[ObservableProperty] private bool _showCAWemFiles;
[ObservableProperty] private string _wwisePath;
[ObservableProperty] private bool _onlyLoadLod0ForReferenceMeshes;
[ObservableProperty] private CameraControlMode _selectedCameraMode;

Expand Down Expand Up @@ -73,7 +72,6 @@ public SettingsViewModel(ApplicationSettingsService settingsService, Localizatio
Path = _settingsService.CurrentSettings.GameDirectories.FirstOrDefault(x => x.Game == game.Type)?.Path
});
}
WwisePath = _settingsService.CurrentSettings.WwisePath;
}


Expand All @@ -95,22 +93,11 @@ private void Save()

foreach (var item in GameDirectores)
_settingsService.CurrentSettings.GameDirectories.Add(new ApplicationSettings.GamePathPair(item.GameType, item.Path));
_settingsService.CurrentSettings.WwisePath = WwisePath;

_localizationManager.LoadLanguage(SelectedLanguage);
_settingsService.Save();
MessageBox.Show("Please restart the tool after updating settings!");
}

[RelayCommand]
private void Browse()
{
var dialog = new OpenFileDialog();
dialog.Filter = "Executable files (*.exe)|*.exe";
dialog.Multiselect = false;
if (dialog.ShowDialog() == DialogResult.OK)
WwisePath = dialog.FileName;
}
}

class GamePathItem : NotifyPropertyChangedImpl
Expand Down
23 changes: 0 additions & 23 deletions AssetEditor/Views/Settings/SettingsView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>

<Grid Grid.Row="0">
Expand Down Expand Up @@ -166,26 +164,5 @@
</ItemsControl>
</Grid>

<Grid Grid.Row="3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200"/>
<ColumnDefinition Width="605"/>
<ColumnDefinition Width="40"/>
</Grid.ColumnDefinitions>

<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>

<TextBlock Grid.Row="0" Text="{loc:Loc SettingsWindow.AudioModding}" Margin="5, 5, 0, 0" FontSize="15"/>
<Separator Grid.Row="1" Grid.ColumnSpan="3" Height="1" Margin="5, 5, 10, 10"/>

<TextBlock Grid.Row="2" Grid.Column="0" Text="{loc:Loc SettingsWindow.WwiseCLI}" Margin="5, 0, 0, 0"/>
<TextBox Grid.Row="2" Grid.Column="1" Style="{StaticResource HintedTextBox}" Text="{Binding WwisePath}"
Tag="{loc:Loc SettingsWindow.WwiseCliPathHint}" IsReadOnly="True" Margin="0, 0, 5, 5" Padding="2.5, 0, 0, 0"/>
<Button Grid.Row="2" Grid.Column="2" Content="..." Command="{Binding BrowseCommand}" Margin="0, 0, 10, 5"/>
</Grid>
</Grid>
</UserControl>
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using Editors.Audio.Shared.AudioProject.Models;
using Editors.Audio.Shared.GameInformation.Warhammer3;
using Editors.Audio.Shared.Storage;
using Editors.Audio.Shared.Wwise;
using Shared.GameFormats.Wwise;
using Shared.Core.PackFiles;
using Shared.GameFormats.Wwise.Hirc;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
xmlns:AudioProjectEditor="clr-namespace:Editors.Audio.AudioEditor.Presentation.AudioProjectEditor"
xmlns:Settings="clr-namespace:Editors.Audio.AudioEditor.Presentation.Settings"
xmlns:AudioProjectViewer="clr-namespace:Editors.Audio.AudioEditor.Presentation.AudioProjectViewer"
xmlns:WaveformVisualiser="clr-namespace:Editors.Audio.AudioEditor.Presentation.WaveformVisualiser"
xmlns:WaveformVisualiser="clr-namespace:Editors.Audio.WaveformVisualiser.Presentation"
xmlns:loc="clr-namespace:Shared.Ui.Common;assembly=Shared.Ui"
d:DataContext="{d:DesignInstance Type=Local:AudioEditorViewModel}"
mc:Ignorable="d"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using Editors.Audio.AudioEditor.Presentation.AudioProjectExplorer;
using Editors.Audio.AudioEditor.Presentation.AudioProjectViewer;
using Editors.Audio.AudioEditor.Presentation.Settings;
using Editors.Audio.AudioEditor.Presentation.WaveformVisualiser;
using Editors.Audio.WaveformVisualiser.Presentation;

namespace Editors.Audio.AudioEditor.Presentation
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
using Editors.Audio.AudioEditor.Presentation.AudioProjectExplorer;
using Editors.Audio.AudioEditor.Presentation.AudioProjectViewer;
using Editors.Audio.AudioEditor.Presentation.Settings;
using Editors.Audio.AudioEditor.Presentation.WaveformVisualiser;
using Editors.Audio.WaveformVisualiser.Presentation;
using Editors.Audio.Shared.AudioProject.Compiler;
using Shared.Core.Events;
using Shared.Core.ToolCreation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
using Editors.Audio.AudioEditor.Core;
using Editors.Audio.AudioEditor.Events.AudioFilesExplorer;
using Editors.Audio.AudioEditor.Events.AudioProjectExplorer;
using Editors.Audio.AudioEditor.Events.WaveformVisualiser;
using Editors.Audio.WaveformVisualiser.Events;
using Editors.Audio.AudioEditor.Presentation.Shared.Models;
using Shared.Core.Events;
using Shared.Core.Events.Global;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
using Editors.Audio.AudioEditor.Presentation.Shared.Models;
using Editors.Audio.AudioEditor.Presentation.Shared.Table;
using Editors.Audio.Shared.AudioProject.Models;
using Editors.Audio.Shared.GameInformation.Warhammer3;
using Editors.Audio.Shared.Storage;
using Serilog;
using Shared.Core.ErrorHandling;
Expand Down Expand Up @@ -223,13 +224,8 @@ private void SetEventNameFromAudioFile(List<AudioFile> audioFiles, bool addToExi

private void SetMovieFilePath(string movieFilePath)
{
var relativePath = Path.GetRelativePath("movies", movieFilePath);
var withoutExtension = Path.ChangeExtension(relativePath, null);
var slashesToUnderscores = withoutExtension.Replace("\\", "_");
var eventName = $"Play_Movie_{slashesToUnderscores}";

var row = Table.Rows[0];
row[TableInformation.ActionEventColumnName] = eventName;
row[TableInformation.ActionEventColumnName] = Wh3ActionEventInformation.GetMovieActionEventName(movieFilePath);
}

public void OnEditorAddRowButtonEnablementUpdateRequested(EditorAddRowButtonEnablementUpdateRequestedEvent e) => SetAddRowButtonEnablement();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
using Editors.Audio.AudioEditor.Events.AudioProjectExplorer;
using Editors.Audio.AudioEditor.Events.AudioProjectViewer.Table;
using Editors.Audio.AudioEditor.Events.Settings.Shortcuts;
using Editors.Audio.AudioEditor.Events.WaveformVisualiser;
using Editors.Audio.WaveformVisualiser.Events;
using Editors.Audio.AudioEditor.Presentation.Shared.Models;
using Editors.Audio.AudioEditor.Presentation.Shared.Table;
using Editors.Audio.Shared.AudioProject.Compiler;
Expand Down

This file was deleted.

36 changes: 22 additions & 14 deletions Editors/Audio/AudioExplorer/AudioExplorerView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
xmlns:Behaviors="clr-namespace:Shared.Ui.Common.Behaviors;assembly=Shared.Ui"
xmlns:ValueConverters="clr-namespace:Editors.Audio.Shared.UI.ValueConverters"
xmlns:AudioExplorer="clr-namespace:Editors.Audio.AudioExplorer"
xmlns:WaveformVisualiser="clr-namespace:Editors.Audio.WaveformVisualiser.Presentation"
xmlns:loc="clr-namespace:Shared.Ui.Common;assembly=Shared.Ui"
d:DataContext="{d:DesignInstance Type=AudioExplorer:AudioExplorerViewModel}"
mc:Ignorable="d"
Expand Down Expand Up @@ -56,10 +57,12 @@
Height="Auto"/>
<RowDefinition
Height="Auto"/>
<RowDefinition
Height="*"/>
<RowDefinition
Height="Auto"/>
<RowDefinition
Height="*"/>
Height="161"/>
</Grid.RowDefinitions>

<Grid
Expand Down Expand Up @@ -176,34 +179,25 @@
</Grid>
</Expander>

<Button
Grid.Row="4"
Margin="5, 5, 5, 5"
Content="{loc:Loc AudioExplorer.PlayAudio}"
Height="25"
Command="{Binding PlayAudioCommand}"
IsEnabled="{Binding IsPlayAudioButtonEnabled, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"/>

<Border
Grid.Row="5"
Grid.Row="4"
Height="5"
Background="{DynamicResource App.Border}"/>

<Label
Grid.Row="6"
Grid.Row="5"
Margin="0, 0, 0, 0"
Content="{loc:Loc AudioExplorer.WwiseHierarchyGraph}"/>

<TreeView
Grid.Row="7"
Grid.Row="6"
Margin="0, 2, 0, 0"
Padding="0, 5, 0, 0"
BorderBrush="{DynamicResource App.Border}"
ItemsSource="{Binding TreeList, UpdateSourceTrigger=PropertyChanged}"
VirtualizingPanel.IsVirtualizing="True"
VirtualizingPanel.VirtualizationMode="Recycling"
VirtualizingPanel.IsVirtualizingWhenGrouping="True"
PreviewMouseDoubleClick="OnNodeDoubleClick">
VirtualizingPanel.IsVirtualizingWhenGrouping="True">

<TreeView.ItemContainerStyle>
<Style
Expand Down Expand Up @@ -339,6 +333,20 @@
</HierarchicalDataTemplate>
</TreeView.ItemTemplate>
</TreeView>

<GridSplitter
Grid.Row="7"
Height="5"
Background="{DynamicResource App.Border}"
VerticalAlignment="Center"
HorizontalAlignment="Stretch"
ResizeBehavior="PreviousAndNext"
ResizeDirection="Rows"/>

<WaveformVisualiser:WaveformVisualiserView
Grid.Row="8"
DataContext="{Binding WaveformVisualiserViewModel}"/>

</Grid>

<GridSplitter
Expand Down
5 changes: 0 additions & 5 deletions Editors/Audio/AudioExplorer/AudioExplorerView.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
using System.Windows.Controls;
using System.Windows.Input;

namespace Editors.Audio.AudioExplorer
{
public partial class AudioExplorerView : UserControl
{
public AudioExplorerViewModel ViewModel => DataContext as AudioExplorerViewModel;

public AudioExplorerView()
{
InitializeComponent();
}

private void OnNodeDoubleClick(object sender, MouseButtonEventArgs e) => ViewModel.PlayAudio();
}
}
Loading
Loading