Custom AnimGraphNode SrcNode->Pins.Num() != DstNode->Pins.Num()

So I created a custom animgraphnode with a parent of AnimGraphNode_SkeletalControlBase. I essentially copied and pasted AnimGraphNode_TwoBoneIK, but removed all functionality within it’s member functions.

Possible of note, I created the animgraphnode and animnode classes by right clicking->add item within VS for all .h and .cpp.

Compiles fine, can add node to the graph, but on compile the ensure in edgraphutilities.cpp:241 fails, which unfortunately has a comment stating no known instances of the ensure failing is known.

Have deleted intermediate of project and engine, cleaned and rebuilt both solutions.

Error:

Ensure condition failed: SrcNode->Pins.Num() == DstNode->Pins.Num() 

[File:E:\4.21.2\UnrealEngine\Engine\Source\Editor\UnrealEd\Private\EdGraphUtilities.cpp] [Line: 241]

I’ll include the headers of both classes, and cpp if requested.

AnimGraphNode_UniversalIK.h:

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

#pragma once

#include "CoreMinimal.h"
#include "UObject/ObjectMacros.h"
#include "Engine/TargetPoint.h"
#include "EdGraph/EdGraphNodeUtils.h"
#include "AnimGraphNode_SkeletalControlBase.h"
#include "BoneControllers/AnimNode_TwoBoneIK.h"
#include "AnimGraphNode_TwoBoneIK.generated.h"

// actor class used for bone selector
#define ABoneSelectActor ATargetPoint

class FTwoBoneIKDelegate;
class IDetailLayoutBuilder;

UCLASS(MinimalAPI)
class UAnimGraphNode_TwoBoneIK : public UAnimGraphNode_SkeletalControlBase
{
	GENERATED_UCLASS_BODY()

	UPROPERTY(EditAnywhere, Category=Settings)
	FAnimNode_TwoBoneIK Node;

	/** Enable drawing of the debug information of the node */
	UPROPERTY(EditAnywhere, Category=Debug)
	bool bEnableDebugDraw;

	// just for refreshing UIs when bone space was changed
	static TSharedPtr<class FTwoBoneIKDelegate> TwoBoneIKDelegate;

public:
	// UObject interface
	virtual void Serialize(FArchive& Ar) override;
	// End of UObject interface

	// UEdGraphNode interface
	virtual FText GetNodeTitle(ENodeTitleType::Type TitleType) const override;
	virtual FText GetTooltipText() const override;
	// End of UEdGraphNode interface

	// UAnimGraphNode_Base interface
	virtual void CustomizeDetails(class IDetailLayoutBuilder& DetailBuilder) override;
	virtual FEditorModeID GetEditorMode() const;
	virtual void CopyNodeDataToPreviewNode(FAnimNode_Base* InPreviewNode) override;
	virtual void CopyPinDefaultsToNodeData(UEdGraphPin* InPin) override;
	// End of UAnimGraphNode_Base interface

	// UAnimGraphNode_SkeletalControlBase interface
	virtual const FAnimNode_SkeletalControlBase* GetNode() const override { return &Node; }
	// End of UAnimGraphNode_SkeletalControlBase interface

	IDetailLayoutBuilder* DetailLayout;

protected:
	// UAnimGraphNode_SkeletalControlBase interface
	virtual void Draw(FPrimitiveDrawInterface* PDI, USkeletalMeshComponent* SkelMeshComp) const override;
	virtual FText GetControllerDescription() const override;
	// End of UAnimGraphNode_SkeletalControlBase interface

private:
	/** Constructing FText strings can be costly, so we cache the node's title */
	FNodeTitleTextTable CachedNodeTitles;
};

AnimNode_UniversalIK.h

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

#pragma once

#include "CoreMinimal.h"
#include "UObject/ObjectMacros.h"
#include "BoneContainer.h"
#include "BonePose.h"
#include "BoneControllers/AnimNode_SkeletalControlBase.h"
#include "BoneControllers/AnimNode_TwoBoneIK.h"
#include "CommonAnimTypes.h"
#include "AnimNode_UniversalIK.generated.h"

USTRUCT()
struct ANIMGRAPHRUNTIME_API FAnimNode_UniversalIK : public FAnimNode_SkeletalControlBase
{
	GENERATED_USTRUCT_BODY()

	/** Base Pose - This Can Be Entire Anim Graph Up To This Point, or Any Combination of Other Nodes*/
//	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Links)
//	FPoseLink BasePose;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Universal IK", meta = (NeverAsPin))
	TArray<FAnimNode_TwoBoneIK> HeadNodes;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Universal IK", meta = (NeverAsPin))
	TArray<FAnimNode_TwoBoneIK> RightArmNodes;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Universal IK", meta = (NeverAsPin))
	TArray<FAnimNode_TwoBoneIK> LeftArmNodes;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Universal IK", meta = (NeverAsPin))
	TArray<FAnimNode_TwoBoneIK> RightLegNodes;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Universal IK", meta = (NeverAsPin))
	TArray<FAnimNode_TwoBoneIK> LeftLegNodes;

public:

	virtual void Initialize_AnyThread(const FAnimationInitializeContext& Context) override;
	virtual void CacheBones_AnyThread(const FAnimationCacheBonesContext& Context)  override;
	virtual void EvaluateSkeletalControl_AnyThread(FComponentSpacePoseContext& Output, TArray<FBoneTransform>& OutBoneTransforms) override;
	virtual bool IsValidToEvaluate(const USkeleton* Skeleton, const FBoneContainer& RequiredBones) override;
	virtual void InitializeBoneReferences(const FBoneContainer& RequiredBones) override;


// Constructor 
public:

	FAnimNode_UniversalIK();

protected:
	bool WorldIsGame;
	AActor* OwningActor;

private:

	void InitTwoBoneIK(FAnimNode_TwoBoneIK& Node, struct FUniversalIKChain& Chain);
};

you almost certainly deleted a bp node that was inside a comment.
the comment contains a ref to the node and now cant find it.
cut and re-pasting your comments should fix this

Hm, it’s been a long time since I looked over the code. I put it on hold to work on other things.
However, I’m not sure how you mean by blueprint. I don’t recall there being a blueprint for these nodes, only c++ classes.
Thanks for the idea though, it did lead me to notice I had commented out FPoseLink BasePose, which may have caused an issue. When I have time to look back over this I’ll update this with my findings.

the error is from EdGraphUtilities, hence my presumption its in your blueprints.