void UMovieSceneDirectorTrack::AddNewShot(FGuid CameraHandle, float Time) { UMovieSceneShotSection* NewSection = ConstructObject<UMovieSceneShotSection>( UMovieSceneShotSection::StaticClass(), this ); NewSection->InitialPlacement(ShotSections, Time, Time + 1.f, SupportsMultipleRows()); //@todo find a better default end time NewSection->SetCameraGuid(CameraHandle); NewSection->SetTitle(LOCTEXT("AddNewShot", "New Shot")); ShotSections.Add(NewSection); }
void UMovieScene3DAttachTrack::AddConstraint(float KeyTime, float ConstraintEndTime, const FGuid& ConstraintId) { // add the section UMovieScene3DAttachSection* NewSection = NewObject<UMovieScene3DAttachSection>(this); NewSection->AddAttach(KeyTime, ConstraintEndTime, ConstraintId); NewSection->InitialPlacement( ConstraintSections, KeyTime, ConstraintEndTime, SupportsMultipleRows() ); ConstraintSections.Add(NewSection); }
void UMovieScene3DAttachTrack::AddConstraint(float KeyTime, float ConstraintEndTime, const FName SocketName, const FName ComponentName, const FGuid& ConstraintId) { // add the section UMovieScene3DAttachSection* NewSection = NewObject<UMovieScene3DAttachSection>(this); NewSection->SetFlags(RF_Transactional); NewSection->AddAttach(KeyTime, ConstraintEndTime, ConstraintId); NewSection->InitialPlacement( ConstraintSections, KeyTime, ConstraintEndTime, SupportsMultipleRows() ); NewSection->AttachSocketName = SocketName; NewSection->AttachComponentName = ComponentName; ConstraintSections.Add(NewSection); }
void UMovieSceneParticleTrack::AddNewParticleSystem(float KeyTime, bool bTrigger) { EParticleKey::Type KeyType = bTrigger ? EParticleKey::Trigger : EParticleKey::Toggle; // @todo Instead of a 0.1 second event, this should be 0 seconds, requires handling 0 size sections float Duration = KeyType == EParticleKey::Trigger ? 0.1f : 1.f; UMovieSceneParticleSection* NewSection = NewObject<UMovieSceneParticleSection>(this); NewSection->InitialPlacement(ParticleSections, KeyTime, KeyTime + Duration, SupportsMultipleRows()); NewSection->SetKeyType(KeyType); ParticleSections.Add(NewSection); }
void UMovieSceneAudioTrack::AddNewSound(USoundBase* Sound, float Time) { check(Sound); // determine initial duration // @todo Once we have infinite sections, we can remove this float DurationToUse = 1.f; // if all else fails, use 1 second duration float SoundDuration = Sound->GetDuration(); if (SoundDuration != INDEFINITELY_LOOPING_DURATION) { DurationToUse = SoundDuration; } // add the section UMovieSceneAudioSection* NewSection = ConstructObject<UMovieSceneAudioSection>( UMovieSceneAudioSection::StaticClass(), this ); NewSection->InitialPlacement( AudioSections, Time, Time + DurationToUse, SupportsMultipleRows() ); NewSection->SetAudioStartTime(Time); NewSection->SetSound(Sound); AudioSections.Add(NewSection); }
void UFaceFXAnimationTrack::AddSection(float KeyTime, const FFaceFXAnimComponentSet& AnimCompSet) { UFaceFXAnimationSection* NewSection = Cast<UFaceFXAnimationSection>(CreateNewSection()); { NewSection->SetData(AnimCompSet); NewSection->InitialPlacement(AnimationSections, KeyTime, KeyTime + NewSection->GetAnimationDuration(), SupportsMultipleRows()); } AddSection(*NewSection); }
void UMovieSceneAnimationTrack::AddNewAnimation(float KeyTime, UAnimSequence* AnimSequence) { // add the section UMovieSceneAnimationSection* NewSection = NewObject<UMovieSceneAnimationSection>(this); NewSection->InitialPlacement( AnimationSections, KeyTime, KeyTime + AnimSequence->SequenceLength, SupportsMultipleRows() ); NewSection->SetAnimationStartTime( KeyTime ); NewSection->SetAnimSequence(AnimSequence); AnimationSections.Add(NewSection); }