// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "Templates/SharedPointer.h" #include "Constraints/TransformConstraintChannelInterface.h" class ISequencer; class UMovieSceneControlRigParameterSection; class IMovieSceneConstrainedSection; class UMovieSceneSection; class UTransformableHandle; class UTickableTransformConstraint; class UTransformableControlHandle; struct FFrameNumber; /** * Interface that defines animatable capabilities for UTransformableControlHandle */ class UMovieSceneControlRigParameterSection; class UTransformableControlHandle; struct FControlConstraintChannelInterface : ITransformConstraintChannelInterface { virtual ~FControlConstraintChannelInterface() override = default; /** Get the UMovieSceneControlRigParameterSection from the ControlRig. */ 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 ControlRig. */ virtual UWorld* GetHandleWorld(UTransformableHandle* InHandle) override; /** Add an active/inactive key to the constraint channel if needed and does the transform compensation on the control's transform channels. */ virtual bool SmartConstraintKey( UTickableTransformConstraint* InConstraint, const TOptional& InOptActive, const FFrameNumber& InTime, const TSharedPtr& InSequencer) override; /** Add keys on the controls'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 UMovieSceneControlRigParameterSection* GetControlSection(const UTransformableControlHandle* InHandle, const TSharedPtr& InSequencer, const bool bIsConstraint); };