예제 #1
0
파일: Editor.cs 프로젝트: thomasvt/pose
 private void ClearEditor()
 {
     ChangeEditorMode(EditorMode.Design);
     _currentAnimationId = 0;
     NodeSelection.Clear();
     KeySelection.Clear();
     _currentDocument = null;
 }
예제 #2
0
파일: Editor.cs 프로젝트: thomasvt/pose
        /// <summary>
        /// Loads a <see cref="Document"/> into the editor.
        /// </summary>
        public void LoadDocument(Document document)
        {
            CloseCurrentDocument();

            _currentDocument           = document;
            _currentDocument.Modified += CurrentDocumentOnModified;

            // todo probably replace this with a FullReload() concept to do clean switch to different data
            ChangeCurrentAnimationInternal(_currentDocument.GetFirstAnimationId()); // documents always have at least 1 animation
            _messageBus.Publish(new DocumentLoaded(_currentDocument));
            DoChangeEditorMode(EditorMode.Design);
            DoChangeEditorTool(EditorTool.Modify);
        }
예제 #3
0
파일: Editor.cs 프로젝트: thomasvt/pose
        public void CreateNewDocument()
        {
            var document = Document.CreateNew(_messageBus);

            LoadDocument(document);
        }