Files
UnrealEngineUWP/Engine/Source/Editor/AnimGraph/Classes/AnimGraphNode_BoneDrivenController.h
Michael Noland 6a27c42041 Animation: Various improvements to the bone driven controller
- Added support for using a curve to map from input range to output range
- Added compilation warnings when a bone or component still needs to be selected
- Added a customization to hide the range/multipler when using a curve, and gated editing of the range based on bUseRange
- Minor optimization to evaluation speed
- Reorganized the properties into logical groups (Source/Driver, Mapping, Destination/Driven)

[CL 2591125 by Michael Noland in Main branch]
2015-06-17 18:54:05 -04:00

50 lines
1.8 KiB
C++

// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "AnimGraphNode_SkeletalControlBase.h"
#include "BoneControllers/AnimNode_BoneDrivenController.h"
#include "EdGraph/EdGraphNodeUtils.h" // for FNodeTitleTextTable
#include "AnimGraphNode_BoneDrivenController.generated.h"
/**
* This is the 'source version' of a bone driven controller, which maps part of the state from one bone to another (e.g., 2 * source.x -> target.z)
*/
UCLASS()
class ANIMGRAPH_API UAnimGraphNode_BoneDrivenController : public UAnimGraphNode_SkeletalControlBase
{
GENERATED_UCLASS_BODY()
UPROPERTY(EditAnywhere, Category = Settings)
FAnimNode_BoneDrivenController Node;
public:
// UEdGraphNode interface
virtual FText GetNodeTitle(ENodeTitleType::Type TitleType) const override;
virtual FText GetTooltipText() const override;
// End of UEdGraphNode interface
// UAnimGraphNode_Base interface
virtual void ValidateAnimNodeDuringCompilation(USkeleton* ForSkeleton, FCompilerResultsLog& MessageLog) override;
virtual void CustomizeDetails(IDetailLayoutBuilder& DetailBuilder) override;
// End of UAnimGraphNode_Base interface
// UAnimGraphNode_SkeletalControlBase interface
virtual void Draw(FPrimitiveDrawInterface* PDI, USkeletalMeshComponent* SkelMeshComp) const override;
// End of UAnimGraphNode_SkeletalControlBase interface
protected:
// UAnimGraphNode_SkeletalControlBase protected interface
virtual FText GetControllerDescription() const override;
// End of UAnimGraphNode_SkeletalControlBase protected interface
// Should non-curve mapping values be shown (multipler, range)?
EVisibility AreNonCurveMappingValuesVisible() const;
private:
/** Constructing FText strings can be costly, so we cache the node's title */
FNodeTitleTextTable CachedNodeTitles;
};