Can't use UAnimBlueprint for dynamic animations changes in 4.5.1

So in the previous versions I was able to use the following to replace animation bps for my characters during run time based on an input string. But now in 4.5.1 I have to include the Animations\AnimBlurprint.h for the engine to find the object. But When this happens I get two errors. I’m not sure what changed or if there is more that i need to include to resolve this. Maybe there is a new module?

Code:

/***********************************************************************************************************
//Creates the Skelmesh and Animation BP from the reference links
/***********************************************************************************************************/
void AAI_Character::SetupSkelAndAnima()
{
	USkeletalMesh* skelObject = LoadSkelMeshFromPath(*SHAPE);//load the object as per tutorial below or use static load object directly, or use ObjectFinder.

	if (skelObject && Mesh)
	{
		Mesh->SetSkeletalMesh(skelObject);
	}
	
	UAnimBlueprint* AnimObject = LoadAnimBPFromPath(*ANIMATION);//load the object as per tutorial below or use static load object directly, or use ObjectFinder.

	if (AnimObject && Mesh)
	{
		Mesh->SetAnimInstanceClass(AnimObject->GetAnimBlueprintGeneratedClass());
	}/**/
}

Errors:

1> AI_NPC_Controller.cpp
1>C:\Program Files\Epic Games\4.5\Engine\Source\Runtime\Engine\Classes\Animation/AnimBlueprint.h(56): error C2504: ‘UBlueprint’ : base class undefined
1>C:\Program Files\Epic Games\4.5\Engine\Source\Runtime\Engine\Classes\Animation/AnimBlueprint.h(75): error C3668: ‘UAnimBlueprint::GetBlueprintClass’ : method with override specifier ‘override’ did not override any base class methods
1>C:\Program Files\Epic Games\4.5\Engine\Source\Runtime\Engine\Classes\Animation/AnimBlueprint.h(88): error C3668: ‘UAnimBlueprint::SupportedByDefaultBlueprintFactory’ : method with override specifier ‘override’ did not override any base class methods
1>C:\Program Files\Epic Games\4.5\Engine\Source\Runtime\Engine\Classes\Animation/AnimBlueprint.h(119): error C3668: ‘UAnimBlueprint::PostLoad’ : method with override specifier ‘override’ did not override any base class methods
1>C:\Program Files\Epic Games\4.5\Engine\Source\Runtime\Engine\Classes\Animation/AnimBlueprint.h(56): error C2504: ‘UBlueprint’ : base class undefined
1>C:\Program Files\Epic Games\4.5\Engine\Source\Runtime\Engine\Classes\Animation/AnimBlueprint.h(75): error C3668: ‘UAnimBlueprint::GetBlueprintClass’ : method with override specifier ‘override’ did not override any base class methods
1>C:\Program Files\Epic Games\4.5\Engine\Source\Runtime\Engine\Classes\Animation/AnimBlueprint.h(88): error C3668: ‘UAnimBlueprint::SupportedByDefaultBlueprintFactory’ : method with override specifier ‘override’ did not override any base class methods
1>C:\Program Files\Epic Games\4.5\Engine\Source\Runtime\Engine\Classes\Animation/AnimBlueprint.h(119): error C3668: ‘UAnimBlueprint::PostLoad’ : method with override specifier ‘override’ did not override any base class methods
1> AI_Monster_Controller.cpp
1> AI_Monster.cpp
1>C:\Program Files\Epic Games\4.5\Engine\Source\Runtime\Engine\Classes\Animation/AnimBlueprint.h(56): error C2504: ‘UBlueprint’ : base class undefined
1>C:\Program Files\Epic Games\4.5\Engine\Source\Runtime\Engine\Classes\Animation/AnimBlueprint.h(75): error C3668: ‘UAnimBlueprint::GetBlueprintClass’ : method with override specifier ‘override’ did not override any base class methods
1>C:\Program Files\Epic Games\4.5\Engine\Source\Runtime\Engine\Classes\Animation/AnimBlueprint.h(88): error C3668: ‘UAnimBlueprint::SupportedByDefaultBlueprintFactory’ : method with override specifier ‘override’ did not override any base class methods
1>C:\Program Files\Epic Games\4.5\Engine\Source\Runtime\Engine\Classes\Animation/AnimBlueprint.h(119): error C3668: ‘UAnimBlueprint::PostLoad’ : method with override specifier ‘override’ did not override any base class methods
1> AI_NPC_Character.cpp
1> AI_PartyMemeber.cpp
1> RPG_Party.cpp
1> AI_Character.cpp
1>C:\Program Files\Epic Games\4.5\Engine\Source\Runtime\Engine\Classes\Animation/AnimBlueprint.h(56): error C2504: ‘UBlueprint’ : base class undefined
1>C:\Program Files\Epic Games\4.5\Engine\Source\Runtime\Engine\Classes\Animation/AnimBlueprint.h(75): error C3668: ‘UAnimBlueprint::GetBlueprintClass’ : method with override specifier ‘override’ did not override any base class methods
1>C:\Program Files\Epic Games\4.5\Engine\Source\Runtime\Engine\Classes\Animation/AnimBlueprint.h(88): error C3668: ‘UAnimBlueprint::SupportedByDefaultBlueprintFactory’ : method with override specifier ‘override’ did not override any base class methods
1>C:\Program Files\Epic Games\4.5\Engine\Source\Runtime\Engine\Classes\Animation/AnimBlueprint.h(119): error C3668: ‘UAnimBlueprint::PostLoad’ : method with override specifier ‘override’ did not override any base class methods
1>C:\Program Files\Epic Games\4.5\Engine\Source\Runtime\Engine\Classes\Animation/AnimBlueprint.h(56): error C2504: ‘UBlueprint’ : base class undefined
1>C:\Program Files\Epic Games\4.5\Engine\Source\Runtime\Engine\Classes\Animation/AnimBlueprint.h(75): error C3668: ‘UAnimBlueprint::GetBlueprintClass’ : method with override specifier ‘override’ did not override any base class methods
1>C:\Program Files\Epic Games\4.5\Engine\Source\Runtime\Engine\Classes\Animation/AnimBlueprint.h(88): error C3668: ‘UAnimBlueprint::SupportedByDefaultBlueprintFactory’ : method with override specifier ‘override’ did not override any base class methods
1>C:\Program Files\Epic Games\4.5\Engine\Source\Runtime\Engine\Classes\Animation/AnimBlueprint.h(119): error C3668: ‘UAnimBlueprint::PostLoad’ : method with override specifier ‘override’ did not override any base class methods

are you including the right header file? and are you sure the project’s dependencies are correct

I used the same header as if I were to make an instance of the class. Using the engines Add code to project feature.

As foe the dependencies they are default. This is a newly generated project.

Update: You cant even even extend animation blueprint with the add code to project. If you do this and try to compile afterward you get the same compile error. So can you no longer do anything with AnimBlueprint anymore?

Process to replicate:

Go to add code to project.
Select AnimBlueprint.
Give it a name.
Go to your project by hitting yes.
Recompile.

1>C:\Program Files\Epic Games\4.5\Engine\Source\Runtime\Engine\Classes\Animation/AnimBlueprint.h(56): error C2504: 'UBlueprint' : base class undefined
1>C:\Program Files\Epic Games\4.5\Engine\Source\Runtime\Engine\Classes\Animation/AnimBlueprint.h(75): error C3668: 'UAnimBlueprint::GetBlueprintClass' : method with override specifier 'override' did not override any base class methods
1>C:\Program Files\Epic Games\4.5\Engine\Source\Runtime\Engine\Classes\Animation/AnimBlueprint.h(88): error C3668: 'UAnimBlueprint::SupportedByDefaultBlueprintFactory' : method with override specifier 'override' did not override any base class methods
1>C:\Program Files\Epic Games\4.5\Engine\Source\Runtime\Engine\Classes\Animation/AnimBlueprint.h(119): error C3668: 'UAnimBlueprint::PostLoad' : method with override specifier 'override' did not override any base class methods
1>  -------- End Detailed Actions Stats -----------------------------------------------------------

Can an admin update my Title to be something like: AnimBluprint.h not working in c++ in 4.5.1? or something?

Update: For now if you are extending or using the UAnimBlueprint in your project and you update your project to 4.5.1 it works correctly. Not until you create a new project does this fail to work. From what I see using UAnimBluptin as a variable or extending it as a class gives errors in a fresh 4.5.1 build. This may also be true for the sound cue object as this was another variable type that would not work from a fresh project in 4.5.1.

Sorry i haven’t replied yet. i have just added a c++ class derived from the UAnimBlueprint class. you can see a screenshot here: Screenshot - b111ef017cdaaabb187377be2fb60450 - Gyazo

Also i have used c++ to work with animation blueprints in the past so i would assume you are missing some sort of dependency

This is what I get from a fresh project and I use add code to project and select UAnimBlueprint. Except it does not compile. What Dependancy could I be missing when its generated from the system? I am not using GIT FYI. This is from a fresh install of unreal engine and adding the 4.5.1 engine.

Fixed in 4.6.1 and higher