void FSequencerNodeTree::SaveExpansionState( const FSequencerDisplayNode& Node, bool bExpanded ) { // @todo Sequencer - This should be moved to the sequence level UMovieScene* MovieScene = Sequencer.GetFocusedMovieSceneSequence()->GetMovieScene(); FMovieSceneEditorData& EditorData = MovieScene->GetEditorData(); EditorData.ExpansionStates.Add( Node.GetPathName(), FMovieSceneExpansionState(bExpanded) ); }
bool FSequencerNodeTree::GetSavedExpansionState( const FSequencerDisplayNode& Node ) const { // @todo Sequencer - This should be moved to the sequence level UMovieScene* MovieScene = Sequencer.GetFocusedMovieSceneSequence()->GetMovieScene(); FMovieSceneEditorData& EditorData = MovieScene->GetEditorData(); FMovieSceneExpansionState* ExpansionState = EditorData.ExpansionStates.Find( Node.GetPathName() ); return ExpansionState ? ExpansionState->bExpanded : GetDefaultExpansionState(Node); }
bool FSequencerNodeTree::GetSavedExpansionState( const FSequencerDisplayNode& Node ) const { UMovieScene* MovieScene = Sequencer.GetFocusedMovieScene(); FMovieSceneEditorData& EditorData = MovieScene->GetEditorData(); // Collapsed nodes are stored instead of expanded so that new nodes are expanded by default bool bCollapsed = EditorData.CollapsedSequencerNodes.Contains( Node.GetPathName() ); return !bCollapsed; }
void FSequencerNodeTree::SaveExpansionState( const FSequencerDisplayNode& Node, bool bExpanded ) { UMovieScene* MovieScene = Sequencer.GetFocusedMovieScene(); FMovieSceneEditorData& EditorData = MovieScene->GetEditorData(); if( bExpanded ) { EditorData.CollapsedSequencerNodes.Remove( Node.GetPathName() ); } else { // Collapsed nodes are stored instead of expanded so that new nodes are expanded by default EditorData.CollapsedSequencerNodes.AddUnique( Node.GetPathName() ) ; } }