// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "Constraints/TransformConstraintChannelInterface.h" /** * Interface that defines animatable capabilities for UTransformableComponentHandle */ class UTransformableComponentHandle; class UMovieScene3DTransformSection; class USceneComponent; struct FComponentConstraintChannelInterface : ITransformConstraintChannelInterface { virtual ~FComponentConstraintChannelInterface() = default; /** Get the UMovieScene3DTransformSection from the component. */ virtual UMovieSceneSection* GetHandleSection(const UTransformableHandle* InHandle, const TSharedPtr& InSequencer) override; virtual UMovieSceneSection* GetHandleConstraintSection(const UTransformableHandle* InHandle, const TSharedPtr& InSequencer) override; /** Get the world from the component. */ virtual UWorld* GetHandleWorld(UTransformableHandle* InHandle) override; /** Add an active/inactive key to the constraint channel if needed and does the transform compensation on the component's transform channels. */ virtual bool SmartConstraintKey( UTickableTransformConstraint* InConstraint, const TOptional& InOptActive, const FFrameNumber& InTime, const TSharedPtr& InSequencer) override; /** Add keys on the component's transform channels. */ virtual void AddHandleTransformKeys( const TSharedPtr& InSequencer, const UTransformableHandle* InHandle, const TArray& InFrames, const TArray& InLocalTransforms, const EMovieSceneTransformChannel& InChannels) override; protected: virtual void UnregisterTrack(UMovieSceneTrack* InTrack, UWorld* InWorld) override; private: static UMovieScene3DTransformSection* GetComponentSection(const UTransformableComponentHandle* InHandle, const TSharedPtr& InSequencer, const bool bInConstraint); void RecomposeTransforms( const TSharedPtr& InSequencer, USceneComponent* SceneComponent, UMovieSceneSection* Section, const TArray& InFrames, TArray& InOutTransforms) const; };