Files
UnrealEngineUWP/Engine/Source/Runtime/AnimGraphRuntime/Public/BoneControllers/AnimNode_BoneDrivenController.h
Marc Audy 4c41590c3d Copying //UE4/Dev-Framework to Dev-Main (//UE4/Dev-Main) @ 2879625
#lockdown Nick.Penwarden

==========================
MAJOR FEATURES + CHANGES
==========================
Change 2821607 on 2016/01/08 by Mieszko.Zielinski

	Added a way to limit amount of information logged by vlog by discarding logs from classes from outside of class whitelist #UE4

	This feature was followed by refactoring of functions taking FVisualLogEntry pointers to use references instead.

	#rb Lukasz.Furman

Change 2828384 on 2016/01/14 by Mieszko.Zielinski

	Back out of visual log refactor done as part of CL#2821607 #UE4

Change 2869215 on 2016/02/16 by Marc.Audy

	Store a WorldSettings pointer on ULevel instead of requiring it be index 0 in the Actors array. However, we will still generally attempt to keep it at index 0 for consistency with previous behavior
	#rb Bruce.Nesbit
	#jira UE-26417

Change 2869404 on 2016/02/16 by Ori.Cohen

	Improve UI for default collision. It now uses a single drop down and sets the appropriate flags under the hood.

	#rb Lina.Halper

Change 2870062 on 2016/02/17 by Jurre.deBaare

	Name parameter driven by bone controller
	#JIRA UE-25997
	#rb Thomas.Sarkanen

Change 2870280 on 2016/02/17 by Mieszko.Zielinski

	Vis log category handling fixes #UE4

	Also, a minor cleanup

	#rb Lukasz.Furman

Change 2871729 on 2016/02/18 by James.Golding

	UE-26663 Fix 'LOD For Collision' display name
	#rb thomas.sarkanen

Change 2871730 on 2016/02/18 by James.Golding

	UE-26580 Make ECollisionEnabled a BlueprintType
	UE-25373 Add a MakeHitResult node
	#rb thomas.sarkanen

Change 2871732 on 2016/02/18 by James.Golding

	UE-24397 Add 'test' option to async query API, and use it in places that made sense. Also removed deprecated (4.8) functions from API.
	#rb ori.cohen

Change 2872022 on 2016/02/18 by Lukasz.Furman

	gameplay debugger refactor
	#ue4

Change 2872082 on 2016/02/18 by Lukasz.Furman

	enabled old gameplay debugger as default one for now
	it will be deprecated with next version after testing in game projects
	#ue4

Change 2872390 on 2016/02/18 by Aaron.McLeran

	OR-15041 (CPU) Hitches due to audio decompression on Windows

	1) Moving ogg-vorbis file info parsing into a worker thread
	 - stat dumphitches now shows the vorbis stuff totally gone

	2) Moving async decoding tasks to be retrieved and started from OnBufferEnd callback

	#rb marc.audy

Change 2872418 on 2016/02/18 by Mieszko.Zielinski

	Fixed EQS debugger not storing data properly when subsequent Option is the one that produces result #UE4

	#rb Lukasz.Furman

Change 2872446 on 2016/02/18 by Aaron.McLeran

	Using cached value of ActualVolume in GetVolumeWeightedPriority

Change 2872770 on 2016/02/18 by Aaron.McLeran

	QAGame testing content for audio testing.

	Going to create a folder with specific sub-system testing maps for audio

Change 2873733 on 2016/02/19 by Jurre.deBaare

	- HLOD generated assets are now saved into a separate package instead of inside of the level asset
	#rb Ori.Cohen

Change 2873828 on 2016/02/19 by Ori.Cohen

	Distributions that bake out no longer load in cooked build.

	#JIRA UE-27126
	#rb Olaf.Piesche, Nick.Penwarden

Change 2874623 on 2016/02/19 by Aaron.McLeran

	UE-27131 Support for changing sound class volumes dynamically

	- new BP function to override a sound mix sound class adjuster
	- cleanup of AudioDevice.h and AudioDevice.cpp
	   - removing unnecessarily forward declares on various types
	   - removing unnecessary spaces and (void) params, etc

Change 2874922 on 2016/02/20 by Mieszko.Zielinski

	Fixed EQS tests being compiled out from Shipping and Test with WITH_DEV_AUTOMATION_TESTS macro #UE4

	#jira OR-15292
	#rb none

Change 2875838 on 2016/02/22 by Benn.Gallagher

[CL 2880055 by Marc Audy in Main branch]
2016-02-24 14:23:53 -05:00

178 lines
6.4 KiB
C++

// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "AnimNode_SkeletalControlBase.h"
#include "AnimNode_BoneDrivenController.generated.h"
// Evaluation of the bone transforms relies on the size and ordering of this
// enum, if this needs to change make sure EvaluateBoneTransforms is updated.
// The transform component (attribute) to read from
UENUM()
namespace EComponentType
{
enum Type
{
None = 0,
TranslationX,
TranslationY,
TranslationZ,
RotationX,
RotationY,
RotationZ,
Scale UMETA(DisplayName="Scale (largest component)"),
ScaleX,
ScaleY,
ScaleZ
};
}
// The type of modification to make to the destination component(s)
UENUM()
enum class EDrivenBoneModificationMode : uint8
{
// Add the driven value to the input component value(s)
AddToInput,
// Replace the input component value(s) with the driven value
ReplaceComponent,
// Add the driven value to the reference pose value
AddToRefPose
};
// Type of destination value to drive
UENUM()
enum class EDrivenDestinationMode : uint8
{
Bone,
MorphTarget,
MaterialParameter
};
/**
* This is the runtime version of a bone driven controller, which maps part of the state from one bone to another (e.g., 2 * source.x -> target.z)
*/
USTRUCT()
struct ANIMGRAPHRUNTIME_API FAnimNode_BoneDrivenController : public FAnimNode_SkeletalControlBase
{
GENERATED_USTRUCT_BODY()
// Bone to use as controller input
UPROPERTY(EditAnywhere, Category="Source (driver)")
FBoneReference SourceBone;
// Transform component to use as input
UPROPERTY(EditAnywhere, Category="Source (driver)")
TEnumAsByte<EComponentType::Type> SourceComponent;
/** Curve used to map from the source attribute to the driven attributes if present (otherwise the Multiplier will be used) */
UPROPERTY(EditAnywhere, Category=Mapping)
UCurveFloat* DrivingCurve;
// Multiplier to apply to the input value (Note: Ignored when a curve is used)
UPROPERTY(EditAnywhere, Category=Mapping)
float Multiplier;
// Whether or not to clamp the driver value and remap it before scaling it
UPROPERTY(EditAnywhere, Category=Mapping, meta=(DisplayName="Remap Source"))
bool bUseRange;
// Minimum limit of the input value (mapped to RemappedMin, only used when limiting the source range)
UPROPERTY(EditAnywhere, Category=Mapping, meta=(EditCondition=bUseRange, DisplayName="Source Range Min"))
float RangeMin;
// Maximum limit of the input value (mapped to RemappedMax, only used when limiting the source range)
UPROPERTY(EditAnywhere, Category=Mapping, meta=(EditCondition=bUseRange, DisplayName="Source Range Max"))
float RangeMax;
// Minimum value to apply to the destination (remapped from the input range)
UPROPERTY(EditAnywhere, Category=Mapping, meta=(EditCondition=bUseRange, DisplayName="Mapped Range Min"))
float RemappedMin;
// Maximum value to apply to the destination (remapped from the input range)
UPROPERTY(EditAnywhere, Category = Mapping, meta = (EditCondition = bUseRange, DisplayName="Mapped Range Max"))
float RemappedMax;
// Type of destination to drive, currently either bone or morph target
UPROPERTY(EditAnywhere, Category = "Destination (driven)")
EDrivenDestinationMode DestinationMode;
/** Name of Morph Target to drive using the source attribute */
UPROPERTY(EditAnywhere, Category = "Destination (driven)")
FName ParameterName;
// Bone to drive using controller input
UPROPERTY(EditAnywhere, Category="Destination (driven)")
FBoneReference TargetBone;
private:
UPROPERTY()
TEnumAsByte<EComponentType::Type> TargetComponent_DEPRECATED;
public:
// Affect the X component of translation on the target bone
UPROPERTY(EditAnywhere, Category="Destination (driven)", meta=(DisplayName="X"))
uint32 bAffectTargetTranslationX : 1;
// Affect the Y component of translation on the target bone
UPROPERTY(EditAnywhere, Category="Destination (driven)", meta=(DisplayName="Y"))
uint32 bAffectTargetTranslationY : 1;
// Affect the Z component of translation on the target bone
UPROPERTY(EditAnywhere, Category="Destination (driven)", meta=(DisplayName="Z"))
uint32 bAffectTargetTranslationZ : 1;
// Affect the X component of rotation on the target bone
UPROPERTY(EditAnywhere, Category="Destination (driven)", meta=(DisplayName="X"))
uint32 bAffectTargetRotationX : 1;
// Affect the Y component of rotation on the target bone
UPROPERTY(EditAnywhere, Category="Destination (driven)", meta=(DisplayName="Y"))
uint32 bAffectTargetRotationY : 1;
// Affect the Z component of rotation on the target bone
UPROPERTY(EditAnywhere, Category="Destination (driven)", meta=(DisplayName="Z"))
uint32 bAffectTargetRotationZ : 1;
// Affect the X component of scale on the target bone
UPROPERTY(EditAnywhere, Category = "Destination (driven)", meta=(DisplayName="X"))
uint32 bAffectTargetScaleX : 1;
// Affect the Y component of scale on the target bone
UPROPERTY(EditAnywhere, Category = "Destination (driven)", meta=(DisplayName="Y"))
uint32 bAffectTargetScaleY : 1;
// Affect the Z component of scale on the target bone
UPROPERTY(EditAnywhere, Category="Destination (driven)", meta=(DisplayName="Z"))
uint32 bAffectTargetScaleZ : 1;
// The type of modification to make to the destination component(s)
UPROPERTY(EditAnywhere, Category="Destination (driven)")
EDrivenBoneModificationMode ModificationMode;
public:
FAnimNode_BoneDrivenController();
// FAnimNode_Base interface
virtual void GatherDebugData(FNodeDebugData& DebugData) override;
// End of FAnimNode_Base interface
// FAnimNode_SkeletalControlBase interface
virtual void EvaluateBoneTransforms(USkeletalMeshComponent* SkelComp, FCSPose<FCompactPose>& MeshBases, TArray<FBoneTransform>& OutBoneTransforms) override;
virtual void EvaluateComponentSpaceInternal(FComponentSpacePoseContext& Context);
virtual bool IsValidToEvaluate(const USkeleton* Skeleton, const FBoneContainer& RequiredBones) override;
// End of FAnimNode_SkeletalControlBase interface
// Upgrade a node from the output enum to the output bits (change made in FAnimationCustomVersion::BoneDrivenControllerMatchingMaya)
void ConvertTargetComponentToBits();
protected:
// FAnimNode_SkeletalControlBase protected interface
virtual void InitializeBoneReferences(const FBoneContainer& RequiredBones) override;
/** Extracts the value used to drive the target bone or parameter */
const float ExtractSourceValue(const FTransform& InCurrentBoneTransform, const FTransform& InRefPoseBoneTransform);
// End of FAnimNode_SkeletalControlBase protected interface
};