Custom Anim Blueprint Strange things happen here

Hi Guys,

I’ve started recently trying to implement anim blueprints. I actually have a base template working and I’m now going to delve more into the details, but there are strange errors that occur if I change some things… and actually make the code more similar to the actual engine code… Which well I thought would be the best implementation… Do you guys happen to know why this happens?

  • When overriding the toolTipText, category and others of the UAnimGraphNode_Base, if I use LOCTEXT_NAMESPACE and respective LOCKTEXT, the node won’t appear in the anim graph. I can search but nothing appears. The moment I remove this and use the other code to generate the FText, the issue is solved. But using the LOCTEXT_NAMESPACE is the way to go in the source code of UE… :confused:

  • If I try to use UCLASS(MinimalAPI) it breaks everything and shows a lot of errors… Shouldn’t this work directly?

  • UAnimGraphNode_Base constantly gives the warning of incomplete type is not allowed.

I leave my code below… maybe these are a lot of questions and I’m taking too much of your time… :S But any help to any of these topics would be more than welcome!

Thank you so much!

.h

#pragma once
#include "Editor//AnimGraph//Classes//AnimGraphNode_Base.h"
#include "MyClassAnimNode.h"
#include "MyClassBehavNode.generated.h"
UCLASS()
class MYPROJECT_API UMyClassBehavNode : public UAnimGraphNode_Base {

	GENERATED_UCLASS_BODY()

	UPROPERTY(EditAnywhere, Category = Settings)
	FMyClassAnimNode Node;

public:
	virtual FText GetNodeTitle(ENodeTitleType::Type TitleType) const override;
	virtual FLinearColor GetNodeTitleColor() const override;
	virtual FText GetTooltipText() const override;
	virtual FString GetNodeCategory() const override;

};

.cpp

#include "MyProject.h"

#include "Editor//AnimGraph//Private//AnimGraphPrivatePCH.h"
#include "Editor//GraphEditor//Public//GraphEditorActions.h"
#include "Editor//UnrealEd//Public//ScopedTransaction.h"

#include "MyClassBehavNode.h"

//#define LOCTEXT_NAMESPACE "A3Nodes"

UMyClassBehavNode::UMyClassBehavNode(const FObjectInitializer& ObjectInitializer)
	: Super(ObjectInitializer)
{
}

FText UMyClassBehavNode::GetNodeTitle(ENodeTitleType::Type TitleType) const
{
	//return LOCTEXT("Stuffs", "Stuffs 2");
	return FText::FromString(FString("Import Stuffs"));
}

FString UMyClassBehavNode::GetNodeCategory() const
{
	return TEXT("Tools");
}

FLinearColor UMyClassBehavNode::GetNodeTitleColor() const
{
	return FLinearColor(0.27f, 0.51f, 0.71f);
}

FText UMyClassBehavNode::GetTooltipText() const
{
	//return LOCTEXT("Stuffs", "Stuffs 2");
	return FText::FromString(FString("Import Stuffs"));
}
//#undef LOCTEXT_NAMESPACE