本文整理汇总了C++中UMovieSceneSection类的典型用法代码示例。如果您正苦于以下问题:C++ UMovieSceneSection类的具体用法?C++ UMovieSceneSection怎么用?C++ UMovieSceneSection使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了UMovieSceneSection类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: FixupSurroundingShots
void UMovieSceneShotTrack::FixupSurroundingShots( UMovieSceneSection& Section, bool bDelete )
{
// Find the previous section and extend it to take the place of the section being deleted
int32 SectionIndex = INDEX_NONE;
if( SubMovieSceneSections.Find( &Section, SectionIndex ) )
{
int32 PrevSectionIndex = SectionIndex - 1;
if( SubMovieSceneSections.IsValidIndex( PrevSectionIndex ) )
{
// Extend the previous section
SubMovieSceneSections[PrevSectionIndex]->SetEndTime( bDelete ? Section.GetEndTime() : Section.GetStartTime() );
}
if( !bDelete )
{
int32 NextSectionIndex = SectionIndex + 1;
if(SubMovieSceneSections.IsValidIndex(NextSectionIndex))
{
// Shift the next shot's start time so that it starts when the new shot ends
SubMovieSceneSections[NextSectionIndex]->SetStartTime(Section.GetEndTime());
}
}
}
SortShots();
}
开发者ID:ErwinT6,项目名称:T6Engine,代码行数:26,代码来源:MovieSceneShotTrack.cpp
示例2: HitTestNode
TOptional<FSectionHandle> FVirtualTrackArea::HitTestSection(FVector2D InPhysicalPosition) const
{
TSharedPtr<FSequencerDisplayNode> Node = HitTestNode(InPhysicalPosition.Y);
if (Node.IsValid())
{
TSharedPtr<FSequencerTrackNode> TrackNode = GetParentTrackNode(*Node);
if (TrackNode.IsValid())
{
float Time = PixelToTime(InPhysicalPosition.X);
const auto& Sections = TrackNode->GetSections();
for (int32 Index = 0; Index < Sections.Num(); ++Index)
{
UMovieSceneSection* Section = Sections[Index]->GetSectionObject();
if (Section->IsTimeWithinSection(Time))
{
return FSectionHandle(TrackNode.ToSharedRef(), Index);
}
}
}
}
return TOptional<FSectionHandle>();
}
开发者ID:RandomDeveloperM,项目名称:UE4_Hairworks,代码行数:26,代码来源:VirtualTrackArea.cpp
示例3: SetFlags
UMovieSceneSection* UMovieSceneSection::SplitSection(float SplitTime)
{
if (!IsTimeWithinSection(SplitTime))
{
return nullptr;
}
SetFlags(RF_Transactional);
if (TryModify())
{
float SectionEndTime = GetEndTime();
// Trim off the right
SetEndTime(SplitTime);
// Create a new section
UMovieSceneTrack* Track = CastChecked<UMovieSceneTrack>(GetOuter());
Track->Modify();
UMovieSceneSection* NewSection = DuplicateObject<UMovieSceneSection>(this, Track);
check(NewSection);
NewSection->SetStartTime(SplitTime);
NewSection->SetEndTime(SectionEndTime);
Track->AddSection(*NewSection);
return NewSection;
}
return nullptr;
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:32,代码来源:MovieSceneSection.cpp
示例4: check
void FMoveKeys::OnBeginDrag(const FVector2D& LocalMousePos, TSharedPtr<FTrackNode> SequencerNode)
{
check( SelectedKeys.Num() > 0 )
// Begin an editor transaction and mark the section as transactional so it's state will be saved
GEditor->BeginTransaction( NSLOCTEXT("Sequencer", "MoveKeysTransaction", "Move Keys") );
TSet<UMovieSceneSection*> ModifiedSections;
for( FSelectedKey SelectedKey : SelectedKeys )
{
UMovieSceneSection* OwningSection = SelectedKey.Section;
// Only modify sections once
if( !ModifiedSections.Contains( OwningSection ) )
{
OwningSection->SetFlags( RF_Transactional );
// Save the current state of the section
OwningSection->Modify();
// Section has been modified
ModifiedSections.Add( OwningSection );
}
}
}
开发者ID:PickUpSU,项目名称:UnrealEngine4,代码行数:25,代码来源:SectionDragOperations.cpp
示例5: MakeShareable
TSharedRef<ISequencerSection> F2DTransformTrackEditor::MakeSectionInterface( UMovieSceneSection& SectionObject, UMovieSceneTrack& Track )
{
check( SupportsType( SectionObject.GetOuter()->GetClass() ) );
UClass* SectionClass = SectionObject.GetOuter()->GetClass();
return MakeShareable( new F2DTransformSection( SectionObject, Track.GetTrackName() ) );
}
开发者ID:ErwinT6,项目名称:T6Engine,代码行数:7,代码来源:Sequencer2DTransformTrackEditor.cpp
示例6: BeginTransaction
void FSequencerDragOperation::BeginTransaction( UMovieSceneSection& Section, const FText& TransactionDesc )
{
// Begin an editor transaction and mark the section as transactional so it's state will be saved
GEditor->BeginTransaction( TransactionDesc );
Section.SetFlags( RF_Transactional );
// Save the current state of the section
Section.Modify();
}
开发者ID:PickUpSU,项目名称:UnrealEngine4,代码行数:8,代码来源:SectionDragOperations.cpp
示例7: SupportsType
TSharedRef<ISequencerSection> FMarginTrackEditor::MakeSectionInterface( UMovieSceneSection& SectionObject, UMovieSceneTrack* Track )
{
check( SupportsType( SectionObject.GetOuter()->GetClass() ) );
UClass* SectionClass = SectionObject.GetOuter()->GetClass();
TSharedRef<ISequencerSection> NewSection = MakeShareable( new FMarginPropertySection( SectionObject, Track->GetTrackName() ) );
return NewSection;
}
开发者ID:1vanK,项目名称:AHRUnrealEngine,代码行数:10,代码来源:MarginTrackEditor.cpp
示例8: GetAnimSectionAtTime
UMovieSceneSection* UMovieSceneAnimationTrack::GetAnimSectionAtTime(float Time)
{
for (int32 i = 0; i < AnimationSections.Num(); ++i)
{
UMovieSceneSection* Section = AnimationSections[i];
if( Section->IsTimeWithinSection( Time ) )
{
return Section;
}
}
return NULL;
}
开发者ID:johndpope,项目名称:UE4,代码行数:13,代码来源:MovieSceneAnimationTrack.cpp
示例9: Tick
virtual void Tick( const FGeometry& AllottedGeometry, const double InCurrentTime, const float InDeltaTime )
{
if (Sequencer.Pin()->IsShotFilteringOn())
{
TArray< TWeakObjectPtr<UMovieSceneSection> > FilterShots = Sequencer.Pin()->GetFilteringShotSections();
// if there are filtering shots, continuously update the cached filter zones
// we do this in tick, and cache it in order to make animation work properly
CachedFilteredRanges.Empty();
for (int32 i = 0; i < FilterShots.Num(); ++i)
{
UMovieSceneSection* Filter = FilterShots[i].Get();
CachedFilteredRanges.Add(Filter->GetRange());
}
}
}
开发者ID:Art1stical,项目名称:AHRUnrealEngine,代码行数:15,代码来源:SSequencer.cpp
示例10: FindSectionAtTime
UMovieSceneSection* MovieSceneHelpers::FindSectionAtTime( const TArray<UMovieSceneSection*>& Sections, float Time )
{
for( int32 SectionIndex = 0; SectionIndex < Sections.Num(); ++SectionIndex )
{
UMovieSceneSection* Section = Sections[SectionIndex];
//@todo Sequencer - There can be multiple sections overlapping in time. Returning instantly does not account for that.
if( Section->IsTimeWithinSection( Time ) && Section->IsActive() )
{
return Section;
}
}
return NULL;
}
开发者ID:frobro98,项目名称:UnrealSource,代码行数:15,代码来源:MovieSceneCommonHelpers.cpp
示例11: MakeShareable
TSharedRef<ISequencerSection> FParticleTrackEditor::MakeSectionInterface( UMovieSceneSection& SectionObject, UMovieSceneTrack& Track )
{
check( SupportsType( SectionObject.GetOuter()->GetClass() ) );
const TSharedPtr<ISequencer> OwningSequencer = GetSequencer();
return MakeShareable( new FParticleSection( SectionObject, OwningSequencer.ToSharedRef() ) );
}
开发者ID:JustDo1989,项目名称:UnrealEngine4.11-HairWorks,代码行数:7,代码来源:ParticleTrackEditor.cpp
示例12: FindNearestSectionAtTime
UMovieSceneSection* MovieSceneHelpers::FindNearestSectionAtTime( const TArray<UMovieSceneSection*>& Sections, float Time )
{
// Only update the section if the position is within the time span of the section
// Or if there are no sections at the time, the left closest section to the time
// Or in the case that Time is before all sections, take the section with the earliest start time
UMovieSceneSection* ClosestSection = nullptr;
float ClosestSectionTime = 0.f;
UMovieSceneSection* EarliestSection = nullptr;
float EarliestSectionTime = 0.f;
for( int32 SectionIndex = 0; SectionIndex < Sections.Num(); ++SectionIndex )
{
UMovieSceneSection* Section = Sections[SectionIndex];
if (Section->IsActive())
{
//@todo Sequencer - There can be multiple sections overlapping in time. Returning instantly does not account for that.
if( Section->IsTimeWithinSection( Time ) )
{
return Section;
}
float EndTime = Section->GetEndTime();
if (EndTime < Time)
{
float ClosestTime = Time - EndTime;
if (!ClosestSection || ClosestTime < ClosestSectionTime)
{
ClosestSection = Section;
ClosestSectionTime = ClosestTime;
}
}
float StartTime = Section->GetStartTime();
if (!EarliestSection || StartTime < EarliestSectionTime)
{
EarliestSection = Section;
EarliestSectionTime = StartTime;
}
}
}
// if we get here, we are off of any section
// if ClosestSection, then we take the closest to left of this time
// else, we take the EarliestSection
// if that's nullptr, then there are no sections
return ClosestSection ? ClosestSection : EarliestSection;
}
开发者ID:frobro98,项目名称:UnrealSource,代码行数:47,代码来源:MovieSceneCommonHelpers.cpp
示例13: SupportsType
TSharedRef<ISequencerSection> FAnimationTrackEditor::MakeSectionInterface( UMovieSceneSection& SectionObject, UMovieSceneTrack* Track )
{
check( SupportsType( SectionObject.GetOuter()->GetClass() ) );
TSharedRef<ISequencerSection> NewSection( new FAnimationSection(SectionObject) );
return NewSection;
}
开发者ID:Codermay,项目名称:Unreal4,代码行数:8,代码来源:AnimationTrackEditor.cpp
示例14: GetAllKeyAreas
FReply SAnimationOutlinerTreeNode::OnAddKeyClicked()
{
FSequencer& Sequencer = DisplayNode->GetSequencer();
float CurrentTime = Sequencer.GetCurrentLocalTime(*Sequencer.GetFocusedMovieScene());
TSet<TSharedPtr<IKeyArea>> KeyAreas;
GetAllKeyAreas(DisplayNode, KeyAreas);
FScopedTransaction Transaction(LOCTEXT("AddKeys", "Add keys at current time"));
for (TSharedPtr<IKeyArea> KeyArea : KeyAreas)
{
UMovieSceneSection* OwningSection = KeyArea->GetOwningSection();
OwningSection->SetFlags(RF_Transactional);
OwningSection->Modify();
KeyArea->AddKeyUnique(CurrentTime);
}
return FReply::Handled();
}
开发者ID:PickUpSU,项目名称:UnrealEngine4,代码行数:18,代码来源:SAnimationOutlinerView.cpp
示例15: GetOwningSection
void FNameCurveKeyArea::PasteKeys(const FMovieSceneClipboardKeyTrack& KeyTrack, const FMovieSceneClipboardEnvironment& SrcEnvironment, const FSequencerPasteEnvironment& DstEnvironment)
{
float PasteAt = DstEnvironment.CardinalTime;
KeyTrack.IterateKeys([&](const FMovieSceneClipboardKey& Key){
UMovieSceneSection* Section = GetOwningSection();
if (!Section)
{
return true;
}
if (Section->TryModify())
{
float Time = PasteAt + Key.GetTime();
if (Section->GetStartTime() > Time)
{
Section->SetStartTime(Time);
}
if (Section->GetEndTime() < Time)
{
Section->SetEndTime(Time);
}
FKeyHandle KeyHandle = Curve.UpdateOrAddKey(Time, Key.GetValue<FName>());
DstEnvironment.ReportPastedKey(KeyHandle, *this);
}
return true;
});
}
开发者ID:JustDo1989,项目名称:UnrealEngine4.11-HairWorks,代码行数:30,代码来源:NameCurveKeyArea.cpp
示例16: SliderRange
TArray<UMovieSceneSection*> MovieSceneHelpers::GetTraversedSections( const TArray<UMovieSceneSection*>& Sections, float CurrentTime, float PreviousTime )
{
TArray<UMovieSceneSection*> TraversedSections;
bool bPlayingBackwards = CurrentTime - PreviousTime < 0.0f;
float MaxTime = bPlayingBackwards ? PreviousTime : CurrentTime;
float MinTime = bPlayingBackwards ? CurrentTime : PreviousTime;
TRange<float> SliderRange(MinTime, MaxTime);
for( int32 SectionIndex = 0; SectionIndex < Sections.Num(); ++SectionIndex )
{
UMovieSceneSection* Section = Sections[SectionIndex];
if( Section->GetStartTime() == CurrentTime || SliderRange.Overlaps( TRange<float>( Section->GetRange() ) ) )
{
TraversedSections.Add( Section );
}
}
return TraversedSections;
}
开发者ID:frobro98,项目名称:UnrealSource,代码行数:22,代码来源:MovieSceneCommonHelpers.cpp
示例17: MakeShareable
TSharedRef<ISequencerSection> F3DAttachTrackEditor::MakeSectionInterface( UMovieSceneSection& SectionObject, UMovieSceneTrack& Track, FGuid ObjectBinding )
{
check( SupportsType( SectionObject.GetOuter()->GetClass() ) );
return MakeShareable( new F3DAttachSection( SectionObject, this ) );
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:6,代码来源:AttachTrackEditor.cpp
示例18: GetKeySnapTimes
void FMoveKeys::OnDrag( const FPointerEvent& MouseEvent, const FVector2D& LocalMousePos, const FTimeToPixel& TimeToPixelConverter, TSharedPtr<FTrackNode> SequencerNode )
{
// Convert the delta position to a delta time amount that was moved
float MouseTime = TimeToPixelConverter.PixelToTime(LocalMousePos.X);
float SelectedKeyTime = DraggedKey.KeyArea->GetKeyTime(DraggedKey.KeyHandle.GetValue());
float DistanceMoved = MouseTime - SelectedKeyTime;
if( DistanceMoved != 0.0f )
{
float TimeDelta = DistanceMoved;
// Snapping
if ( Settings->GetIsSnapEnabled() )
{
bool bSnappedToKeyTime = false;
if ( Settings->GetSnapKeyTimesToKeys() )
{
TArray<float> OutSnapTimes;
GetKeySnapTimes(OutSnapTimes, SequencerNode);
TArray<float> InitialTimes;
for ( FSelectedKey SelectedKey : SelectedKeys )
{
InitialTimes.Add(SelectedKey.KeyArea->GetKeyTime(SelectedKey.KeyHandle.GetValue()) + DistanceMoved);
}
float OutInitialTime = 0.f;
float OutSnapTime = 0.f;
if ( SnapToTimes( InitialTimes, OutSnapTimes, TimeToPixelConverter, OutInitialTime, OutSnapTime ) )
{
bSnappedToKeyTime = true;
TimeDelta = OutSnapTime - (OutInitialTime - DistanceMoved);
}
}
if ( bSnappedToKeyTime == false && Settings->GetSnapKeyTimesToInterval() )
{
TimeDelta = Settings->SnapTimeToInterval( MouseTime ) - SelectedKeyTime;
}
}
for( FSelectedKey SelectedKey : SelectedKeys )
{
UMovieSceneSection* Section = SelectedKey.Section;
TSharedPtr<IKeyArea>& KeyArea = SelectedKey.KeyArea;
// Tell the key area to move the key. We reset the key index as a result of the move because moving a key can change it's internal index
KeyArea->MoveKey( SelectedKey.KeyHandle.GetValue(), TimeDelta );
// Update the key that moved
float NewKeyTime = KeyArea->GetKeyTime( SelectedKey.KeyHandle.GetValue() );
// If the key moves outside of the section resize the section to fit the key
// @todo Sequencer - Doesn't account for hitting other sections
if( NewKeyTime > Section->GetEndTime() )
{
Section->SetEndTime( NewKeyTime );
}
else if( NewKeyTime < Section->GetStartTime() )
{
Section->SetStartTime( NewKeyTime );
}
}
}
}
开发者ID:PickUpSU,项目名称:UnrealEngine4,代码行数:65,代码来源:SectionDragOperations.cpp
示例19: MakeShareable
TSharedRef<ISequencerSection> FFaceFXAnimationTrackEditor::MakeSectionInterface(UMovieSceneSection& SectionObject, UMovieSceneTrack& Track)
{
check(SupportsType(SectionObject.GetOuter()->GetClass()));
return MakeShareable(new FFaceFXAnimationSection(SectionObject));
}
开发者ID:jcredmond,项目名称:FaceFX-UE4,代码行数:5,代码来源:FaceFXAnimationTrackEditor.cpp
示例20: MakeShareable
TSharedRef<ISequencerSection> FCameraCutTrackEditor::MakeSectionInterface(UMovieSceneSection& SectionObject, UMovieSceneTrack& Track, FGuid ObjectBinding)
{
check(SupportsType(SectionObject.GetOuter()->GetClass()));
return MakeShareable(new FCameraCutSection(GetSequencer(), ThumbnailPool, SectionObject));
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:6,代码来源:CameraCutTrackEditor.cpp
注:本文中的UMovieSceneSection类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论