Managed to do it.
You need a Factory:
UCLASS(hidecategories = Object)
class HYBRIDMIDDLEWARE_API UTimecodeProviderBlackMagicFactoryNew
: public UFactory
{
GENERATED_BODY()
public:
/**
- Creates and initializes a new instance.
*/
UTimecodeProviderBlackMagicFactoryNew(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{
SupportedClass = UBlackmagicTimecodeProviderFixed::StaticClass();
bCreateNew = true;
bEditAfterNew = false;
}
//~ UFactory Interface
virtual UObject* FactoryCreateNew(UClass* InClass, UObject* InParent, FName InName, EObjectFlags Flags, UObject* Context, FFeedbackContext* Warn) override
{
return NewObject(InParent, InClass, InName, Flags);
}
};
A action class:
class HYBRIDMIDDLEWARE_API FTimecodeProviderBlackMagicActions
: public FAssetTypeActions_Base
{
public:
/**
- Creates and initializes a new instance.
*/
FTimecodeProviderBlackMagicActions()
{}
public:
//~ FAssetTypeActions_Base overrides
virtual uint32 GetCategories() override
{
return EAssetTypeCategories::Media;
}
virtual FText GetName() const override
{
return NSLOCTEXT(“AssetTypeActions”, “AssetTypeActions_BlackmagicTimecodeProvider”, “Blackmagic Timecode Provider”);
}
virtual UClass* GetSupportedClass() const override
{
return UBlackmagicTimecodeProviderFixed::StaticClass();
}
virtual FColor GetTypeColor() const override
{
return FColor::White;
}
};
And register the actions:
class FHybridMiddlewareModule :
public IModuleInterface
{
public:
//~ IModuleInterface interface
virtual void StartupModule() override
{
RegisterAssetTools();
}
virtual void ShutdownModule() override
{
UnregisterAssetTools();
}
virtual bool SupportsDynamicReloading() override
{
return true;
}
protected:
void RegisterAssetTools()
{
IAssetTools& AssetTools = FModuleManager::LoadModuleChecked(“AssetTools”).Get();
RegisterAssetTypeAction(AssetTools, MakeShareable(new FTimecodeProviderBlackMagicActions()));
}
void RegisterAssetTypeAction(IAssetTools& AssetTools, TSharedRef Action)
{
AssetTools.RegisterAssetTypeActions(Action);
RegisteredAssetTypeActions.Add(Action);
}
void UnregisterAssetTools()
{
FAssetToolsModule* AssetToolsModule = FModuleManager::GetModulePtr(“AssetTools”);
if (AssetToolsModule != nullptr)
{
IAssetTools& AssetTools = AssetToolsModule->Get();
for (auto Action : RegisteredAssetTypeActions)
{
AssetTools.UnregisterAssetTypeActions(Action);
}
}
}
private:
TArray<TSharedRef> RegisteredAssetTypeActions;
};
This helped to figure it out: Adding New Asset Types to UE4 | gmpreussner
Note: When you declare your own class as UCLASS(Blueprintable), you can still inherit from it in Blueprint. Though, inheriting will create a “Class”. Only the Asset created via the Actions and the Factory will be “Data”
Note2: It did not help with the TimecodeProvider, as the “Data” can’t be set in the settings…