newly updated FMODStudio plugin for UE5.3 migration
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2023.
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2024.
|
||||
|
||||
#include "AssetTypeActions_FMODEvent.h"
|
||||
#include "AssetTypeActions_Base.h"
|
||||
@ -7,9 +7,9 @@
|
||||
#include "FMODUtils.h"
|
||||
#include "FMODStudioModule.h"
|
||||
#include "FMODStudioEditorModule.h"
|
||||
#include "UnrealEd/Public/Editor.h"
|
||||
#include "Editor.h"
|
||||
#include "Framework/MultiBox/MultiBoxBuilder.h"
|
||||
#include "EditorStyle/Public/EditorStyleSet.h"
|
||||
#include "Editor/EditorStyle/Public/EditorStyleSet.h"
|
||||
|
||||
#define LOCTEXT_NAMESPACE "AssetTypeActions"
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2023.
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2024.
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2023.
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2024.
|
||||
|
||||
#include "FMODAmbientSoundActorFactory.h"
|
||||
#include "FMODStudioEditorPrivatePCH.h"
|
||||
#include "FMODAmbientSound.h"
|
||||
#include "FMODEvent.h"
|
||||
#include "AssetRegistry/Public/AssetData.h"
|
||||
#include "AssetRegistry/AssetData.h"
|
||||
#include "Editor/EditorEngine.h"
|
||||
|
||||
UFMODAmbientSoundActorFactory::UFMODAmbientSoundActorFactory(const FObjectInitializer &ObjectInitializer)
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2023.
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2024.
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -209,8 +209,6 @@ void FFMODAssetBuilder::BuildAssets(const UFMODSettings& InSettings, const FStri
|
||||
}
|
||||
}
|
||||
|
||||
const FString BankExtensions[] = { TEXT(".assets"), TEXT(".streams"), TEXT(".bank")};
|
||||
|
||||
void FFMODAssetBuilder::BuildBankLookup(const FString &AssetName, const FString &PackagePath, const UFMODSettings &InSettings,
|
||||
TArray<UObject*>& AssetsToSave)
|
||||
{
|
||||
@ -245,56 +243,29 @@ void FFMODAssetBuilder::BuildBankLookup(const FString &AssetName, const FString
|
||||
return;
|
||||
}
|
||||
|
||||
TMap<FString, FString> BankGuids;
|
||||
TArray<FString> LocalizedEntriesVisited;
|
||||
|
||||
for (FString BankPath : BankPaths)
|
||||
{
|
||||
FMOD::Studio::Bank* Bank;
|
||||
FMOD_RESULT result = StudioSystem->loadBankFile(TCHAR_TO_UTF8(*BankPath), FMOD_STUDIO_LOAD_BANK_NORMAL, &Bank);
|
||||
FMOD_GUID BankID;
|
||||
|
||||
FMOD_RESULT result = StudioSystem->loadBankFile(TCHAR_TO_UTF8(*BankPath), FMOD_STUDIO_LOAD_BANK_NORMAL, &Bank);
|
||||
if (result == FMOD_OK)
|
||||
{
|
||||
result = Bank->getID(&BankID);
|
||||
Bank->unload();
|
||||
}
|
||||
|
||||
if (result == FMOD_OK)
|
||||
{
|
||||
FString GUID = FMODUtils::ConvertGuid(BankID).ToString(EGuidFormats::DigitsWithHyphensInBraces);
|
||||
|
||||
FString* otherBankPath = BankGuids.Find(GUID);
|
||||
if (otherBankPath != nullptr)
|
||||
{
|
||||
bool foundLocale = false;
|
||||
for (const FFMODProjectLocale& Locale : InSettings.Locales)
|
||||
{
|
||||
if (Locale.bDefault && BankPath.EndsWith(FString("_") + Locale.LocaleCode + FString(".bank")))
|
||||
{
|
||||
foundLocale = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!foundLocale)
|
||||
{
|
||||
UE_LOG(LogFMOD, Warning, TEXT("Ignoring bank %s as another bank with the same GUID is already being used.\n"
|
||||
"Bank %s does not match any locales in the FMOD Studio plugin settings."), *BankPath, *BankPath);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
BankGuids.Add(GUID, BankPath);
|
||||
}
|
||||
else
|
||||
if (result != FMOD_OK)
|
||||
{
|
||||
UE_LOG(LogFMOD, Error, TEXT("Failed to add bank %s to lookup."), *BankPath);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
FString GUID = FMODUtils::ConvertGuid(BankID).ToString(EGuidFormats::DigitsWithHyphensInBraces);
|
||||
FName OuterRowName(*GUID);
|
||||
|
||||
for (TPair<FString,FString> GUIDPath : BankGuids)
|
||||
{
|
||||
FName OuterRowName(*GUIDPath.Key);
|
||||
FFMODLocalizedBankTable* Row = BankLookup->DataTable->FindRow<FFMODLocalizedBankTable>(OuterRowName, nullptr, false);
|
||||
|
||||
if (Row)
|
||||
{
|
||||
StaleBanks.RemoveSingle(OuterRowName);
|
||||
@ -302,33 +273,48 @@ void FFMODAssetBuilder::BuildBankLookup(const FString &AssetName, const FString
|
||||
else
|
||||
{
|
||||
FFMODLocalizedBankTable NewRow{};
|
||||
NewRow.Banks = NewObject<UDataTable>(BankLookup->DataTable, *GUIDPath.Key, RF_NoFlags);
|
||||
NewRow.Banks = NewObject<UDataTable>(BankLookup->DataTable, *BankPath, RF_NoFlags);
|
||||
NewRow.Banks->RowStruct = FFMODLocalizedBankRow::StaticStruct();
|
||||
BankLookup->DataTable->AddRow(OuterRowName, NewRow);
|
||||
Row = BankLookup->DataTable->FindRow<FFMODLocalizedBankTable>(OuterRowName, nullptr, false);
|
||||
bModified = true;
|
||||
}
|
||||
|
||||
FString CurFilename = FPaths::GetCleanFilename(GUIDPath.Value);
|
||||
FString FilenamePart = CurFilename;
|
||||
|
||||
for (const FString& extension : BankExtensions)
|
||||
{
|
||||
FilenamePart.ReplaceInline(*extension, TEXT(""));
|
||||
}
|
||||
|
||||
FString InnerRowName("<NON-LOCALIZED>");
|
||||
// Set InnerRowName to either "<NON-LOCALIZED>" or a locale code based on the BankPath e.g. "JP"
|
||||
FName InnerRowName("<NON-LOCALIZED>");
|
||||
for (const FFMODProjectLocale& Locale : InSettings.Locales)
|
||||
{
|
||||
if (FilenamePart.EndsWith(FString("_") + Locale.LocaleCode))
|
||||
// Remove all expected extensions from end of filename before checking for locale code.
|
||||
// Note, we may encounter multiple extensions e.g. "Dialogue.assets.bank"
|
||||
const FString BankExtensions[] = { TEXT(".assets"), TEXT(".streams"), TEXT(".strings") };
|
||||
FString Filename = FPaths::GetCleanFilename(BankPath);
|
||||
Filename.RemoveFromEnd(TEXT(".bank"));
|
||||
for (const FString& extension : BankExtensions)
|
||||
{
|
||||
InnerRowName = Locale.LocaleCode;
|
||||
Filename.RemoveFromEnd(extension);
|
||||
}
|
||||
|
||||
if (Filename.EndsWith(FString("_") + Locale.LocaleCode))
|
||||
{
|
||||
InnerRowName = FName(*Locale.LocaleCode);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
FFMODLocalizedBankRow* InnerRow = Row->Banks->FindRow<FFMODLocalizedBankRow>(FName(*InnerRowName), nullptr, false);
|
||||
FString RelativeBankPath = GUIDPath.Value.RightChop(InSettings.GetFullBankPath().Len() + 1);
|
||||
// See if we've visited this OuterRowName + InnerRowName already and skip it if so. This is mainly to
|
||||
// avoid setting "<NON-LOCALIZED>" multiple times (and causing BankLookup to be modified) when no
|
||||
// locales are set up in Unreal.
|
||||
FString LocalizedEntryKey = OuterRowName.ToString() + InnerRowName.ToString();
|
||||
if (LocalizedEntriesVisited.Find(LocalizedEntryKey) != INDEX_NONE)
|
||||
{
|
||||
UE_LOG(LogFMOD, Warning, TEXT("Ignoring bank %s as another bank with the same GUID is already being used.\n"
|
||||
"Bank %s does not match any locales in the FMOD Studio plugin settings."), *BankPath, *BankPath);
|
||||
continue;
|
||||
}
|
||||
LocalizedEntriesVisited.Add(LocalizedEntryKey);
|
||||
|
||||
FFMODLocalizedBankRow* InnerRow = Row->Banks->FindRow<FFMODLocalizedBankRow>(InnerRowName, nullptr, false);
|
||||
FString RelativeBankPath = BankPath.RightChop(InSettings.GetFullBankPath().Len() + 1);
|
||||
|
||||
if (InnerRow)
|
||||
{
|
||||
@ -342,10 +328,12 @@ void FFMODAssetBuilder::BuildBankLookup(const FString &AssetName, const FString
|
||||
{
|
||||
FFMODLocalizedBankRow NewRow{};
|
||||
NewRow.Path = RelativeBankPath;
|
||||
Row->Banks->AddRow(FName(*InnerRowName), NewRow);
|
||||
Row->Banks->AddRow(InnerRowName, NewRow);
|
||||
bModified = true;
|
||||
}
|
||||
|
||||
FString CurFilename = FPaths::GetCleanFilename(BankPath);
|
||||
|
||||
if (CurFilename == InSettings.GetMasterBankFilename() && BankLookup->MasterBankPath != RelativeBankPath)
|
||||
{
|
||||
BankLookup->MasterBankPath = RelativeBankPath;
|
||||
@ -376,15 +364,54 @@ void FFMODAssetBuilder::BuildBankLookup(const FString &AssetName, const FString
|
||||
bModified = true;
|
||||
}
|
||||
|
||||
// Remove stale localized bank entries from lookup
|
||||
for (auto& outer : BankLookup->DataTable->GetRowMap())
|
||||
{
|
||||
FName outerrowname = outer.Key;
|
||||
FFMODLocalizedBankTable* outerrow = reinterpret_cast<FFMODLocalizedBankTable*>(outer.Value);
|
||||
TArray<FName> RowsToRemove;
|
||||
for (auto& inner : outerrow->Banks->GetRowMap())
|
||||
{
|
||||
FName innerrowname = inner.Key;
|
||||
FFMODLocalizedBankRow* innerrow = reinterpret_cast<FFMODLocalizedBankRow*>(inner.Value);
|
||||
FString LocalizedEntryKey = outerrowname.ToString() + innerrowname.ToString();
|
||||
if (LocalizedEntriesVisited.Find(LocalizedEntryKey) == INDEX_NONE)
|
||||
{
|
||||
RowsToRemove.Add(innerrowname);
|
||||
}
|
||||
}
|
||||
for (auto& rowname : RowsToRemove)
|
||||
{
|
||||
outerrow->Banks->RemoveRow(rowname);
|
||||
bModified = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (bCreated)
|
||||
{
|
||||
UE_LOG(LogFMOD, Log, TEXT("BankLookup created.\n"));
|
||||
FAssetRegistryModule::AssetCreated(BankLookup);
|
||||
}
|
||||
|
||||
if (bCreated || bModified)
|
||||
{
|
||||
UE_LOG(LogFMOD, Log, TEXT("BankLookup modified.\n"));
|
||||
AssetsToSave.Add(BankLookup);
|
||||
}
|
||||
|
||||
UE_LOG(LogFMOD, Log, TEXT("===== BankLookup =====\n"));
|
||||
for (auto& outer : BankLookup->DataTable->GetRowMap())
|
||||
{
|
||||
FName outerrowname = outer.Key;
|
||||
FFMODLocalizedBankTable* outerrow = reinterpret_cast<FFMODLocalizedBankTable*>(outer.Value);
|
||||
UE_LOG(LogFMOD, Log, TEXT("GUID: %s\n"), *(outerrowname.ToString()));
|
||||
for (auto& inner : outerrow->Banks->GetRowMap())
|
||||
{
|
||||
FName innerrowname = inner.Key;
|
||||
FFMODLocalizedBankRow* innerrow = reinterpret_cast<FFMODLocalizedBankRow*>(inner.Value);
|
||||
UE_LOG(LogFMOD, Log, TEXT(" Locale: %s Path: %s\n"), *(innerrowname.ToString()), *innerrow->Path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FString FFMODAssetBuilder::GetAssetClassName(UClass* AssetClass)
|
||||
@ -501,7 +528,7 @@ UFMODAsset *FFMODAssetBuilder::CreateAsset(const AssetCreateInfo& CreateInfo, TA
|
||||
}
|
||||
else
|
||||
{
|
||||
SanitizedPackagePath = ObjectTools::SanitizeInvalidChars(PackagePath, INVALID_OBJECTPATH_CHARACTERS);
|
||||
SanitizedPackagePath = ObjectTools::SanitizeInvalidChars(PackagePath, INVALID_LONGPACKAGE_CHARACTERS);
|
||||
UE_LOG(LogFMOD, Log, TEXT("'%s' cannot be used as a UE4 asset path. %s. Using '%s' instead."), *PackagePath, *OutReason.ToString(),
|
||||
*SanitizedPackagePath);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2023.
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2024.
|
||||
|
||||
#include "FMODAudioComponentDetails.h"
|
||||
#include "Subsystems/AssetEditorSubsystem.h"
|
||||
@ -6,10 +6,10 @@
|
||||
#include "FMODStudioModule.h"
|
||||
#include "FMODEvent.h"
|
||||
#include "fmod_studio.hpp"
|
||||
#include "UnrealEd/Public/Editor.h"
|
||||
#include "Editor.h"
|
||||
#include "Widgets/Input/SButton.h"
|
||||
#include "PropertyEditor/Public/DetailLayoutBuilder.h"
|
||||
#include "PropertyEditor/Public/DetailCategoryBuilder.h"
|
||||
#include "Editor/PropertyEditor/Public/DetailLayoutBuilder.h"
|
||||
#include "Editor/PropertyEditor/Public/DetailCategoryBuilder.h"
|
||||
|
||||
#define LOCTEXT_NAMESPACE "FMODStudio"
|
||||
|
||||
|
@ -1,10 +1,12 @@
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2023.
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2024.
|
||||
|
||||
#pragma once
|
||||
|
||||
//#include "PropertyEditing.h"
|
||||
#include "PropertyCustomizationHelpers.h"
|
||||
#include "PropertyEditor/Public/IDetailCustomization.h"
|
||||
#include "IDetailCustomization.h"
|
||||
|
||||
class IDetailLayoutBuilder;
|
||||
|
||||
class FFMODAudioComponentDetails : public IDetailCustomization
|
||||
{
|
||||
|
@ -1,12 +1,12 @@
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2023.
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2024.
|
||||
|
||||
#include "FMODAudioComponentVisualizer.h"
|
||||
#include "FMODAudioComponent.h"
|
||||
#include "FMODUtils.h"
|
||||
#include "FMODEvent.h"
|
||||
#include "fmod_studio.hpp"
|
||||
#include "Engine/Public/SceneView.h"
|
||||
#include "Engine/Public/SceneManagement.h"
|
||||
#include "SceneView.h"
|
||||
#include "SceneManagement.h"
|
||||
|
||||
void FFMODAudioComponentVisualizer::DrawVisualization(const UActorComponent *Component, const FSceneView *View, FPrimitiveDrawInterface *PDI)
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2023.
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2024.
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2023.
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2024.
|
||||
|
||||
#include "FMODBankUpdateNotifier.h"
|
||||
#include "FMODSettings.h"
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2023.
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2024.
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2023.
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2024.
|
||||
|
||||
#include "FMODEventEditor.h"
|
||||
#include "FMODEvent.h"
|
||||
@ -8,7 +8,7 @@
|
||||
#include "SFMODEventEditorPanel.h"
|
||||
#include "Widgets/Docking/SDockTab.h"
|
||||
#include "fmod_studio.hpp"
|
||||
#include "UnrealEd/Public/Editor.h"
|
||||
#include "Editor.h"
|
||||
|
||||
#define LOCTEXT_NAMESPACE "FMODEventEditor"
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2023.
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2024.
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -36,11 +36,21 @@ int32 UFMODGenerateAssetsCommandlet::Main(const FString& CommandLine)
|
||||
// Rebuild switch
|
||||
if (Switches.Contains(RebuildSwitch))
|
||||
{
|
||||
FString FolderToDelete;
|
||||
IPlatformFile& FileManager = FPlatformFileManager::Get().GetPlatformFile();
|
||||
|
||||
/*
|
||||
Combine the ProjectContentDir + ContentBrowserPrefix to make a filesystem path
|
||||
to where the FMOD generated assets directories live e.g.
|
||||
../../../../UnrealProjects/MyProject/Content/FMOD
|
||||
Should work for non-default values of ContentBrowserPrefix e.g. /Game/foo/bar/baz/
|
||||
*/
|
||||
FString folderPath = Settings.ContentBrowserPrefix.TrimChar('/'); // /Game/FMOD/ -> Game/FMOD
|
||||
folderPath.Split(TEXT("/"), 0, &folderPath); // Game/FMOD -> FMOD
|
||||
folderPath = FPaths::ProjectContentDir() + folderPath + "/"; // FMOD -> ../../../../UnrealProjects/MyProject/Content/FMOD/
|
||||
|
||||
for (FString folder : Settings.GeneratedFolders)
|
||||
{
|
||||
FolderToDelete = FPaths::ProjectContentDir() + Settings.ContentBrowserPrefix + folder;
|
||||
FString FolderToDelete = folderPath + folder;
|
||||
bool removed = FileManager.DeleteDirectoryRecursively(*FolderToDelete);
|
||||
if (!removed)
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2023.
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2024.
|
||||
|
||||
#include "FMODSettingsCustomization.h"
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2023.
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2024.
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2023.
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2024.
|
||||
|
||||
#include "FMODStudioEditorModule.h"
|
||||
#include "FMODStudioModule.h"
|
||||
@ -20,31 +20,32 @@
|
||||
#include "Sequencer/FMODEventParameterTrackEditor.h"
|
||||
#include "AssetTypeActions_FMODEvent.h"
|
||||
|
||||
#include "Framework/Application/SlateApplication.h"
|
||||
#include "AssetRegistry/AssetRegistryModule.h"
|
||||
#include "UnrealEd/Public/AssetSelection.h"
|
||||
#include "Slate/Public/Framework/Notifications/NotificationManager.h"
|
||||
#include "Slate/Public/Widgets/Notifications/SNotificationList.h"
|
||||
#include "AssetSelection.h"
|
||||
#include "Framework/Notifications/NotificationManager.h"
|
||||
#include "Widgets/Notifications/SNotificationList.h"
|
||||
#include "Developer/Settings/Public/ISettingsModule.h"
|
||||
#include "Developer/Settings/Public/ISettingsSection.h"
|
||||
#include "UnrealEd/Public/Editor.h"
|
||||
#include "Editor.h"
|
||||
#include "Slate/SceneViewport.h"
|
||||
#include "LevelEditor/Public/LevelEditor.h"
|
||||
#include "Sockets/Public/SocketSubsystem.h"
|
||||
#include "Sockets/Public/Sockets.h"
|
||||
#include "Sockets/Public/IPAddress.h"
|
||||
#include "UnrealEd/Public/FileHelpers.h"
|
||||
#include "Sequencer/Public/ISequencerModule.h"
|
||||
#include "Sequencer/Public/SequencerChannelInterface.h"
|
||||
#include "MovieSceneTools/Public/ClipboardTypes.h"
|
||||
#include "Engine/Public/DebugRenderSceneProxy.h"
|
||||
#include "Engine/Classes/Debug/DebugDrawService.h"
|
||||
#include "Editor/LevelEditor/Public/LevelEditor.h"
|
||||
#include "SocketSubsystem.h"
|
||||
#include "Sockets.h"
|
||||
#include "IPAddress.h"
|
||||
#include "FileHelpers.h"
|
||||
#include "ISequencerModule.h"
|
||||
#include "SequencerChannelInterface.h"
|
||||
#include "ClipboardTypes.h"
|
||||
#include "DebugRenderSceneProxy.h"
|
||||
#include "Debug/DebugDrawService.h"
|
||||
#include "Settings/ProjectPackagingSettings.h"
|
||||
#include "UnrealEdGlobals.h"
|
||||
#include "UnrealEd/Public/LevelEditorViewport.h"
|
||||
#include "LevelEditorViewport.h"
|
||||
#include "ActorFactories/ActorFactory.h"
|
||||
#include "Engine/Canvas.h"
|
||||
#include "Editor/UnrealEdEngine.h"
|
||||
#include "Slate/Public/Framework/MultiBox/MultiBoxBuilder.h"
|
||||
#include "Framework/MultiBox/MultiBoxBuilder.h"
|
||||
#include "Misc/MessageDialog.h"
|
||||
#include "HAL/FileManager.h"
|
||||
#include "Interfaces/IMainFrameModule.h"
|
||||
@ -333,7 +334,7 @@ void FFMODStudioEditorModule::OnPostEngineInit()
|
||||
{
|
||||
RegisterHelpMenuEntries();
|
||||
MainMenuExtender = MakeShareable(new FExtender);
|
||||
MainMenuExtender->AddMenuExtension("FileLoadAndSave", EExtensionHook::After, NULL,
|
||||
MainMenuExtender->AddMenuExtension("FileOpen", EExtensionHook::After, NULL,
|
||||
FMenuExtensionDelegate::CreateRaw(this, &FFMODStudioEditorModule::AddFileMenuExtension));
|
||||
LevelEditor->GetMenuExtensibilityManager()->AddExtender(MainMenuExtender);
|
||||
}
|
||||
@ -388,8 +389,6 @@ void FFMODStudioEditorModule::ProcessBanks()
|
||||
BankUpdateNotifier.SetFilePath(Settings.GetFullBankPath());
|
||||
|
||||
BankUpdateNotifier.EnableUpdate(true);
|
||||
|
||||
IFMODStudioModule::Get().RefreshSettings();
|
||||
}
|
||||
}
|
||||
|
||||
@ -791,9 +790,12 @@ void FFMODStudioEditorModule::ValidateFMOD()
|
||||
if (FMessageDialog::Open(EAppMsgType::YesNo, Message) == EAppReturnType::Yes)
|
||||
{
|
||||
Settings.Locales = StudioLocales;
|
||||
Settings.Locales[0].bDefault = true;
|
||||
if (Settings.Locales.Num() > 0)
|
||||
{
|
||||
Settings.Locales[0].bDefault = true;
|
||||
}
|
||||
SettingsSection->Save();
|
||||
IFMODStudioModule::Get().RefreshSettings();
|
||||
IFMODStudioModule::Get().ReloadBanks();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1109,6 +1111,7 @@ void FFMODStudioEditorModule::BeginPIE(bool simulating)
|
||||
|
||||
void FFMODStudioEditorModule::EndPIE(bool simulating)
|
||||
{
|
||||
IFMODStudioModule::Get().PreEndPIE();
|
||||
UE_LOG(LogFMOD, Verbose, TEXT("FFMODStudioEditorModule EndPIE: %d"), simulating);
|
||||
bSimulating = false;
|
||||
bIsInPIE = false;
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2023.
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2024.
|
||||
#pragma once
|
||||
|
||||
#include "Runtime/Engine/Classes/Components/SceneComponent.h"
|
||||
|
@ -1,8 +1,8 @@
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2023.
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2024.
|
||||
|
||||
#include "FMODStudioStyle.h"
|
||||
#include "Styling/SlateStyleRegistry.h"
|
||||
#include "EditorStyle/Public/Interfaces/IEditorStyleModule.h"
|
||||
#include "Editor/EditorStyle/Public/Interfaces/IEditorStyleModule.h"
|
||||
#include "Modules/ModuleManager.h"
|
||||
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2023.
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2024.
|
||||
|
||||
#pragma once
|
||||
#include "SlateCore/Public/Styling/SlateStyle.h"
|
||||
#include "EditorStyle/Public/EditorStyleSet.h"
|
||||
#include "Styling/SlateStyle.h"
|
||||
#include "EditorStyleSet.h"
|
||||
|
||||
class FFMODStudioStyle
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2023.
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2024.
|
||||
|
||||
#include "SFMODEventEditorPanel.h"
|
||||
#include "FMODStudioModule.h"
|
||||
@ -6,7 +6,7 @@
|
||||
#include "Input/Reply.h"
|
||||
#include "Widgets/Input/SNumericEntryBox.h"
|
||||
#include "Widgets/Layout/SExpandableArea.h"
|
||||
#include "EditorStyle/Public/EditorStyleSet.h"
|
||||
#include "Editor/EditorStyle/Public/EditorStyleSet.h"
|
||||
#include "Widgets/Input/SButton.h"
|
||||
#include "Widgets/Layout/SScrollBox.h"
|
||||
#include "fmod_studio.hpp"
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2023.
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2024.
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2023.
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2024.
|
||||
|
||||
#include "Sequencer/FMODChannelEditors.h"
|
||||
#include "ISequencerChannelInterface.h"
|
||||
@ -7,7 +7,7 @@
|
||||
#include "MovieSceneTimeHelpers.h"
|
||||
#include "MovieSceneToolHelpers.h"
|
||||
#include "ScopedTransaction.h"
|
||||
#include "EditorWidgets/Public/SEnumCombo.h"
|
||||
#include "Editor/EditorWidgets/Public/SEnumCombo.h"
|
||||
#include "EditorStyleSet.h"
|
||||
#include "Channels/MovieSceneChannelTraits.h"
|
||||
|
||||
|
@ -1,16 +1,17 @@
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2023.
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2024.
|
||||
|
||||
#include "FMODEventControlTrackEditor.h"
|
||||
#include "FMODAmbientSound.h"
|
||||
#include "Sequencer/FMODEventControlSection.h"
|
||||
#include "Sequencer/FMODEventControlTrack.h"
|
||||
#include "AnimatedRange.h"
|
||||
#include "Rendering/DrawElements.h"
|
||||
#include "Framework/MultiBox/MultiBoxBuilder.h"
|
||||
#include "Curves/IntegralCurve.h"
|
||||
#include "SequencerSectionPainter.h"
|
||||
#include "EditorStyleSet.h"
|
||||
#include "Editor/UnrealEdEngine.h"
|
||||
#include "Sequencer/FMODEventControlSection.h"
|
||||
#include "Sequencer/FMODEventControlTrack.h"
|
||||
#include "ISectionLayoutBuilder.h"
|
||||
#include "FMODAmbientSound.h"
|
||||
#include "CommonMovieSceneTools.h"
|
||||
#include "Channels/MovieSceneChannelProxy.h"
|
||||
#include "Channels/MovieSceneChannelEditorData.h"
|
||||
@ -103,13 +104,13 @@ int32 FFMODEventControlSection::OnPaintSection(FSequencerSectionPainter &InPaint
|
||||
float XSize = TimeToPixelConverter.SecondsToPixel(DrawRange.GetUpperBoundValue()) - XOffset;
|
||||
FSlateDrawElement::MakeBox(InPainter.DrawElements, InPainter.LayerId,
|
||||
InPainter.SectionGeometry.ToPaintGeometry(
|
||||
FVector2D(XOffset, (InPainter.SectionGeometry.GetLocalSize().Y - SequencerSectionConstants::KeySize.Y) / 2),
|
||||
FVector2D(XSize, SequencerSectionConstants::KeySize.Y)),
|
||||
FVector2D(XSize, SequencerSectionConstants::KeySize.Y),
|
||||
FSlateLayoutTransform(1.0f, FVector2D(XOffset, (InPainter.SectionGeometry.GetLocalSize().Y - SequencerSectionConstants::KeySize.Y) / 2))),
|
||||
FAppStyle::GetBrush("Sequencer.Section.Background"), DrawEffects);
|
||||
FSlateDrawElement::MakeBox(InPainter.DrawElements, InPainter.LayerId,
|
||||
InPainter.SectionGeometry.ToPaintGeometry(
|
||||
FVector2D(XOffset, (InPainter.SectionGeometry.GetLocalSize().Y - SequencerSectionConstants::KeySize.Y) / 2),
|
||||
FVector2D(XSize, SequencerSectionConstants::KeySize.Y)),
|
||||
FVector2D(XSize, SequencerSectionConstants::KeySize.Y),
|
||||
FSlateLayoutTransform(1.0f, FVector2D(XOffset, (InPainter.SectionGeometry.GetLocalSize().Y - SequencerSectionConstants::KeySize.Y) / 2))),
|
||||
FAppStyle::GetBrush("Sequencer.Section.BackgroundTint"), DrawEffects, TrackColor);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2023.
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2024.
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2023.
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2024.
|
||||
|
||||
#include "FMODEventParameterTrackEditor.h"
|
||||
#include "FMODAmbientSound.h"
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2023.
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2024.
|
||||
|
||||
#include "FMODParameterSection.h"
|
||||
#include "ISectionLayoutBuilder.h"
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2023.
|
||||
// Copyright (c), Firelight Technologies Pty, Ltd. 2012-2024.
|
||||
|
||||
#pragma once
|
||||
|
||||
|
Reference in New Issue
Block a user