Sequencer Custom Clock Source

Hello,

I’m working on a project and I believe the Custom Clock Source option in the sequencer frame rate drop down is what I need. Despite some fairly extensive searching I can’t find any documentation on how to implement this. Presumably I’d need to create a module that implements a specific interface in an actor, but I can’t find that info anywhere. Does anyone have experience with that feature?

So interestingly after I made this post, it showed up as one of the sources on the AI summary, and suggested an interface called IClockSource. This seems like a reasonable name for the interface, but there seems to be no sign of it on Google and searching the UE source code doesn’t find it either. Seems like maybe the AI made it up?

Eric

Apologies there’s no documentation on this.

In C++, if you create a class that derives from IMovieSceneCustomClockSource and implement OnRequestCurrentTime, you can control how you want Sequencer to advance the clock.

I finally got a chance to get back to working on this, but when I derive the class (in this case an Actor Component) I get this linker error:

unresolved external symbol “__declspec(dllimport) class UClass * __cdecl Z_Construct_UClass_UMovieSceneCustomClockSource_NoRegister(void)” (_imp?Z_Construct_UClass_UMovieSceneCustomClockSource_NoRegister@@YAPEAVUClass@@XZ) referenced in function “void __cdecl `dynamic initializer for ‘public: static struct UECodeGen_Private::FImplementedInterfaceParams const * const Z_Construct_UClass_UCustomTimeSource_Statics::InterfaceParams’'(void)” (??__E?InterfaceParams@Z_Construct_UClass_UCustomTimeSource_Statics@@2QBUFImplementedInterfaceParams@UECodeGen_Private@@B@@YAXXZ)

I haven’t implemented any of the interface functions, but here is my header file for the class:

#pragma once

include “CoreMinimal.h”
include “Components/ActorComponent.h”
include “Evaluation/IMovieSceneCustomClockSource.h”
include “CustomTimeSource.generated.h”

UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
class FOCV_VIRTUALFO_NOV21_API UCustomTimeSource : public UActorComponent, public IMovieSceneCustomClockSource
{
GENERATED_BODY()

public:
// Sets default values for this component’s properties
UCustomTimeSource();

protected:
// Called when the game starts
virtual void BeginPlay() override;

public:
// Called every frame
virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;

//virtual void OnTick(float DeltaSeconds, float InPlayRate) override;


//virtual void OnStartPlaying(const FQualifiedFrameTime& InStartTime) override;

//
//virtual void OnStopPlaying(const FQualifiedFrameTime& InStopTime) override;

//
//virtual FFrameTime OnRequestCurrentTime(const FQualifiedFrameTime& InCurrentTime, float InPlayRate) override;

};

As it turns out new guy mistake, I needed to “MovieScene” to the dependencies list in the build.cs file for the game module.