Cant get Custom Anim Graph nodes Working 4.2

Dear Friends at Epic,

I need help getting my custom animation node class to compile! Thanks!

In 4.1.1, just having AnimGraph as a private dependency module was sufficient!

PrivateDependencyModuleNames.AddRange(new string[] { "InputCore", "HTTP", "AnimGraph", "BlueprintGraph" , "UnrealEd", "Slate", "SlateCore" });

But now I must also include

#include "AnimGraphClasses.h"

otherwise UAnimGraphNode_Base is not found.

But when I do that I get these errors that are not related to my game code

1>E:/VictoryUE4/UnrealEngine-4.2/Engine/Source/Editor/AnimGraph/Classes/AnimationConduitGraphSchema.h(10): error C2504: 'UEdGraphSchema_K2' : base class undefined
1>E:/VictoryUE4/UnrealEngine-4.2/Engine/Source/Editor/AnimGraph/Classes/AnimationConduitGraphSchema.h(14): error C3668: 'UAnimationConduitGraphSchema::CreateDefaultNodesForGraph' : method with override specifier 'override' did not override any base class methods
1>E:/VictoryUE4/UnrealEngine-4.2/Engine/Source/Editor/AnimGraph/Classes/AnimationConduitGraphSchema.h(15): error C3668: 'UAnimationConduitGraphSchema::CanDuplicateGraph' : method with override specifier 'override' did not override any base class methods
1>E:/VictoryUE4/UnrealEngine-4.2/Engine/Source/Editor/AnimGraph/Classes/AnimationConduitGraphSchema.h(16): error C3668: 'UAnimationConduitGraphSchema::GetGraphDisplayInformation' : method with override specifier 'override' did not override any base class methods
1>E:/VictoryUE4/UnrealEngine-4.2/Engine/Source/Editor/AnimGraph/Classes/AnimGraphNode_BlendListByEnum.h(9): error C2504: 'INodeDependingOnEnumInterface' : base class undefined
1>E:/VictoryUE4/UnrealEngine-4.2/Engine/Source/Editor/AnimGraph/Classes/AnimGraphNode_BlendListByEnum.h(47): error C3668: 'UAnimGraphNode_BlendListByEnum::GetEnum' : method with override specifier 'override' did not override any base class methods
1>E:/VictoryUE4/UnrealEngine-4.2/Engine/Source/Editor/AnimGraph/Classes/AnimGraphNode_BlendListByEnum.h(48): error C3668: 'UAnimGraphNode_BlendListByEnum::ShouldBeReconstructedAfterEnumChanged' : method with override specifier 'override' did not override any base class methods

#My .h

// Copyright 1998-2013 Epic Games, Inc. All Rights Reserved.

#pragma once

#include "AnimGraphClasses.h"  //only had to be added in 4.2
#include "AnimGraphDefinitions.h"
#include "Kismet2/BlueprintEditorUtils.h"

#include "AnimNode_VictoryTurnInPlace.h"

#include "AnimGraphNode_VictoryTurnInPlace.generated.h"

//Whole point of this is to be wrapper for node struct
//		so it depends on it, and that node must compile first
//		for type to be recognized

UCLASS(MinimalAPI)
class UAnimGraphNode_VictoryTurnInPlace : public UAnimGraphNode_Base
{
	GENERATED_UCLASS_BODY()

	UPROPERTY(EditAnywhere, Category=Settings)
	FAnimNode_VictoryTurnInPlace Node;

public:
	// UEdGraphNode interface
	virtual FString GetNodeNativeTitle(ENodeTitleType::Type TitleType) const OVERRIDE;
	virtual FLinearColor GetNodeTitleColor() const OVERRIDE;
	virtual FString GetNodeCategory() const OVERRIDE;
	// End of UEdGraphNode interface

protected:
	// UAnimGraphNode_SkeletalControlBase interface
	virtual FString GetControllerDescription() const;
	// End of UAnimGraphNode_SkeletalControlBase interface
};

Rama

#Solution

just include

#include "AnimGraphNode_Base.h"

but still

why would including all the animation classes lead to these errors?

Hi Rama, thanks for this solution. With the 4.3 release, I get this error message as soon as I add “AnimGraph” as a dependency:

1>  Parsing headers for GameEditor
1>LogCompile : error : Duplicate class name: UK2Node_BaseAsyncTask also exists in file /Script/OnlineBlueprintSupport
1>C:/Program Files/Unreal Engine/4.3/Engine/Source/Editor/OnlineBlueprintSupport/Classes/K2Node_LatentOnlineCall.h(8): error : Superclass K2Node_BaseAsyncTask of class K2Node_LatentOnlineCall not found
1>C:/Program Files/Unreal Engine/4.3/Engine/Source/Editor/OnlineBlueprintSupport/Classes/K2Node_LeaderboardFlush.h(7): error : Superclass K2Node_BaseAsyncTask of class K2Node_LeaderboardFlush not found
1>C:/Program Files/Unreal Engine/4.3/Engine/Source/Editor/OnlineBlueprintSupport/Classes/K2Node_LeaderboardQuery.h(7): error : Superclass K2Node_BaseAsyncTask of class K2Node_LeaderboardQuery not found
1>C:/Program Files/Unreal Engine/4.3/Engine/Source/Editor/BlueprintGraph/Classes/K2Node_AIMoveTo.h(9): error : Superclass K2Node_BaseAsyncTask of class K2Node_AIMoveTo not found

Do you have any idea why ? Did you get your custom anim nodes to work on 4.3 ?

Hi there!

I am busy working on another project, but I did do a test for you

if you JUST include AnimGraph as dependency I at least did not get any errors

if you try not including AnimGraphClasses does it work?

other than that, you can also try adding individual classes off of Animation

one of which is

Animation/SkeletalMeshComponent.h

for example

I am surmising that including AnimGraphClasses is not the intended workflow in 4.3, so maybe try including individual classes from Animation/ClassyouWantToInclude

Let me know if you figure this out!

And if this doesn’t get you going I will do more thorough test, so let me know

:slight_smile:

Rama