Files
UnrealEngineUWP/Engine/Source/Editor/AnimGraph/Classes/AnimGraphNode_BoneDrivenController.h
Michael Noland 2d953ade9f Animation: Improved bone driven controllers
- One driver value can now drive multiple components
- How a component is driven is now configurable (add to input, replace, add to ref pose and replace)
- The range limit is now defined on the input (before the multiplier is applied) rather than the output (existing ranges are fixed up on load)
- New details customization to make working with the node easier
- Individual scale components can now be a driver or one of the driven components, rather than just the max component of scale
- The node title now displays the driving equation (e.g., driven.rotation.z = -0.5 * driver.rotation.x)

Animation: Added a custom version for AnimGraph/AnimGraphRuntime usage

Upgrade Note: The exact behavior of the original node was not preserved, but there are now more configuration options, so please revisit any uses of bone driven controllers in your animation blueprints

[CL 2606968 by Michael Noland in Main branch]
2015-06-30 22:25:56 -04:00

56 lines
2.1 KiB
C++

// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
#pragma once
class IDetailCategoryBuilder;
class IPropertyHandle;
#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:
// 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 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;
static void AddTripletPropertyRow(const FText& Name, const FText& Tooltip, IDetailCategoryBuilder& Category, TSharedRef<IPropertyHandle> PropertyHandle, const FName XPropertyName, const FName YPropertyName, const FName ZPropertyName);
static FText ComponentTypeToText(EComponentType::Type Component);
};