Network total reforge. Team-List and Race-Data handled
This commit is contained in:
29
Source/DTFluxAssetsEditor/DTFluxAssetsEditor.Build.cs
Normal file
29
Source/DTFluxAssetsEditor/DTFluxAssetsEditor.Build.cs
Normal file
@ -0,0 +1,29 @@
|
||||
using UnrealBuildTool;
|
||||
|
||||
public class DTFluxAssetsEditor : ModuleRules
|
||||
{
|
||||
public DTFluxAssetsEditor(ReadOnlyTargetRules Target) : base(Target)
|
||||
{
|
||||
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
|
||||
|
||||
PublicDependencyModuleNames.AddRange(
|
||||
new string[]
|
||||
{
|
||||
"Core",
|
||||
}
|
||||
);
|
||||
|
||||
PrivateDependencyModuleNames.AddRange(
|
||||
new string[]
|
||||
{
|
||||
"CoreUObject",
|
||||
"Engine",
|
||||
"Slate",
|
||||
"AssetTools",
|
||||
"SlateCore",
|
||||
"UnrealEd",
|
||||
"DTFluxCore",
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,35 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
|
||||
#include "DTFluxAssetModelTypeActions.h"
|
||||
|
||||
#include "Assets/DTFluxModelAsset.h"
|
||||
|
||||
|
||||
|
||||
|
||||
void FDTFluxAssetModelTypeActions::OpenAssetEditor(const TArray<UObject*>& InObjects,
|
||||
TSharedPtr<IToolkitHost> EditWithinLevelEditor)
|
||||
{
|
||||
FAssetTypeActions_Base::OpenAssetEditor(InObjects, EditWithinLevelEditor);
|
||||
}
|
||||
|
||||
UClass* FDTFluxAssetModelTypeActions::GetSupportedClass() const
|
||||
{
|
||||
return UDTFluxModelAsset::StaticClass();
|
||||
}
|
||||
|
||||
FText FDTFluxAssetModelTypeActions::GetName() const
|
||||
{
|
||||
return INVTEXT("DTFluxModelAsset");
|
||||
}
|
||||
|
||||
FColor FDTFluxAssetModelTypeActions::GetTypeColor() const
|
||||
{
|
||||
return FColor(231, 81, 67);
|
||||
}
|
||||
|
||||
uint32 FDTFluxAssetModelTypeActions::GetCategories()
|
||||
{
|
||||
return Category;
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
#include "DTFluxAssetsEditorModule.h"
|
||||
#include "IAssetTools.h"
|
||||
#include "DTFluxAssetModelTypeActions.h"
|
||||
#include "IAssetTools.h"
|
||||
#include "AssetToolsModule.h"
|
||||
|
||||
#define LOCTEXT_NAMESPACE "FDTFluxAssetsEditorModule"
|
||||
|
||||
|
||||
DTFLUXASSETSEDITOR_API DEFINE_LOG_CATEGORY(logDTFluxAssetEditor)
|
||||
void FDTFluxAssetsEditorModule::StartupModule()
|
||||
{
|
||||
IAssetTools& AssetToolsModule = FModuleManager::GetModuleChecked<FAssetToolsModule>("AssetTools").Get();
|
||||
EAssetTypeCategories::Type Category = AssetToolsModule.RegisterAdvancedAssetCategory("DTFlux", INVTEXT("DTFlux"));
|
||||
DTFluxAssetModelActions = MakeShareable(new FDTFluxAssetModelTypeActions(Category));
|
||||
AssetToolsModule.RegisterAssetTypeActions(DTFluxAssetModelActions.ToSharedRef());
|
||||
}
|
||||
|
||||
void FDTFluxAssetsEditorModule::ShutdownModule()
|
||||
{
|
||||
if(DTFluxAssetModelActions.IsValid() && FModuleManager::Get().IsModuleLoaded("AssetTools"))
|
||||
{
|
||||
IAssetTools& AssetToolsModule = FModuleManager::GetModuleChecked<FAssetToolsModule>("AssetTools").Get();
|
||||
AssetToolsModule.UnregisterAssetTypeActions(DTFluxAssetModelActions.ToSharedRef());
|
||||
}
|
||||
}
|
||||
|
||||
#undef LOCTEXT_NAMESPACE
|
||||
|
||||
IMPLEMENT_MODULE(FDTFluxAssetsEditorModule, DTFluxAssetsEditor)
|
||||
@ -0,0 +1,27 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
|
||||
#include "DTFluxModelAssetFactory.h"
|
||||
|
||||
#include "DTFluxAssetsEditorModule.h"
|
||||
#include "Assets/DTFluxModelAsset.h"
|
||||
|
||||
|
||||
|
||||
UDTFluxModelAssetFactory::UDTFluxModelAssetFactory(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer)
|
||||
{
|
||||
SupportedClass = UDTFluxModelAsset::StaticClass();
|
||||
bCreateNew = true;
|
||||
}
|
||||
|
||||
// bool UDTFluxModelAssetFactory::CanCreateNew() const
|
||||
// {
|
||||
// return true;
|
||||
// }
|
||||
|
||||
UObject* UDTFluxModelAssetFactory::FactoryCreateNew(UClass* InClass, UObject* InParent, FName InName,
|
||||
EObjectFlags Flags, UObject* Context, FFeedbackContext* Warn)
|
||||
{
|
||||
UE_LOG(logDTFluxAssetEditor, Warning, TEXT("InParent Name %s"), InParent != nullptr ? *InParent->GetName() : TEXT("Parent is null !!!"))
|
||||
return NewObject<UDTFluxModelAsset>(InParent, InClass, InName, Flags, Context);
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "AssetTypeActions_Base.h"
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class FDTFluxAssetModelTypeActions : public FAssetTypeActions_Base
|
||||
{
|
||||
public:
|
||||
FDTFluxAssetModelTypeActions(EAssetTypeCategories::Type InCategory): Category(InCategory){};
|
||||
public:
|
||||
virtual UClass* GetSupportedClass() const override;
|
||||
virtual FText GetName() const override;
|
||||
virtual FColor GetTypeColor() const override;
|
||||
virtual uint32 GetCategories() override;
|
||||
virtual void OpenAssetEditor(const TArray<UObject*>& InObjects, TSharedPtr<IToolkitHost> EditWithinLevelEditor = TSharedPtr<IToolkitHost>()) override;
|
||||
|
||||
private:
|
||||
EAssetTypeCategories::Type Category;
|
||||
};
|
||||
29
Source/DTFluxAssetsEditor/Public/DTFluxAssetsEditorModule.h
Normal file
29
Source/DTFluxAssetsEditor/Public/DTFluxAssetsEditorModule.h
Normal file
@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "Modules/ModuleManager.h"
|
||||
|
||||
|
||||
/**
|
||||
* @module DTFluxAssetsEditorModule
|
||||
* @details DTFlux Project is a framework to integrate all kind of events data from
|
||||
* multiple API (stopwatch servers, etc...) or manually to unreal motion design platform
|
||||
* to create live audiovisual shows.
|
||||
* @brief This module provides all editor and ui tools.
|
||||
* @license See LICENSE.TXT at the of DTFluxAPI plugin folder or at
|
||||
* @see https://github.com/A2MSystemes/DTFluxAPI/blob/main/LICENSE
|
||||
* @author Ange-Marie MAURIN
|
||||
*/
|
||||
|
||||
class FDTFluxAssetModelTypeActions;
|
||||
DTFLUXASSETSEDITOR_API DECLARE_LOG_CATEGORY_EXTERN(logDTFluxAssetEditor, Log, All);
|
||||
|
||||
class FDTFluxAssetsEditorModule : public IModuleInterface
|
||||
{
|
||||
public:
|
||||
virtual void StartupModule() override;
|
||||
virtual void ShutdownModule() override;
|
||||
|
||||
private:
|
||||
TSharedPtr<FDTFluxAssetModelTypeActions> DTFluxAssetModelActions;
|
||||
};
|
||||
19
Source/DTFluxAssetsEditor/Public/DTFluxModelAssetFactory.h
Normal file
19
Source/DTFluxAssetsEditor/Public/DTFluxModelAssetFactory.h
Normal file
@ -0,0 +1,19 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "DTFluxModelAssetFactory.generated.h"
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UCLASS()
|
||||
class DTFLUXASSETSEDITOR_API UDTFluxModelAssetFactory : public UFactory
|
||||
{
|
||||
GENERATED_BODY()
|
||||
public:
|
||||
UDTFluxModelAssetFactory(const FObjectInitializer& ObjectInitializer);
|
||||
|
||||
virtual UObject* FactoryCreateNew(UClass* InClass, UObject* InParent, FName InName, EObjectFlags Flags, UObject* Context, FFeedbackContext* Warn) override;
|
||||
};
|
||||
Reference in New Issue
Block a user