本文整理汇总了C++中UMovieSceneTrack::Modify方法的典型用法代码示例。如果您正苦于以下问题:C++ UMovieSceneTrack::Modify方法的具体用法?C++ UMovieSceneTrack::Modify怎么用?C++ UMovieSceneTrack::Modify使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UMovieSceneTrack
的用法示例。
在下文中一共展示了UMovieSceneTrack::Modify方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SplitSection
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;
}
示例2: DeleteSection
void FSequencer::DeleteSection(class UMovieSceneSection* Section)
{
UMovieScene* MovieScene = GetFocusedMovieScene();
bool bAnythingRemoved = false;
UMovieSceneTrack* Track = CastChecked<UMovieSceneTrack>( Section->GetOuter() );
// If this check fails then the section is outered to a type that doesnt know about the section
//checkSlow( Track->HasSection(Section) );
Track->SetFlags( RF_Transactional );
FScopedTransaction DeleteSectionTransaction( NSLOCTEXT("Sequencer", "DeleteSection_Transaction", "Delete Section") );
Track->Modify();
Track->RemoveSection(Section);
bAnythingRemoved = true;
if( bAnythingRemoved )
{
UpdateRuntimeInstances();
}
}
示例3: OnEndDrag
void FMoveSection::OnEndDrag(TSharedPtr<FTrackNode> SequencerNode)
{
DraggedKeyHandles.Empty();
if (Section.IsValid())
{
SequencerNode->FixRowIndices();
UMovieSceneTrack* OuterTrack = Cast<UMovieSceneTrack>(Section->GetOuter());
if (OuterTrack)
{
OuterTrack->Modify();
OuterTrack->OnSectionMoved(*Section);
}
}
EndTransaction();
}