public void BrowseMesh()
 {
     using (var browser = new PackFileBrowserWindow(_pfs))
     {
         browser.ViewModel.Filter.SetExtentions(new List <string>()
         {
             ".variantmeshdefinition", ".wsmodel", ".rigid_model_v2"
         });
         if (browser.ShowDialog() == true && browser.SelectedFile != null)
         {
             var file = browser.SelectedFile;
             SetMesh(file);
         }
     }
 }
        void ImportReference()
        {
            using (var browser = new PackFileBrowserWindow(_packFileService))
            {
                browser.ViewModel.Filter.SetExtentions(new List <string>()
                {
                    ".variantmeshdefinition", ".wsmodel", ".rigid_model_v2"
                });
                if (browser.ShowDialog() == true && browser.SelectedFile != null)
                {
                    ModelLoader.LoadReference(browser.SelectedFile);
                }
            }

            GC.Collect();
            GC.WaitForPendingFinalizers();
        }
Ejemplo n.º 3
0
 void BrowseTexture()
 {
     using (var browser = new PackFileBrowserWindow(_packfileService))
     {
         browser.ViewModel.Filter.SetExtentions(new List <string>()
         {
             ".dds", ".png",
         });
         if (browser.ShowDialog() == true && browser.SelectedFile != null)
         {
             try
             {
                 Path = _packfileService.GetFullPath(browser.SelectedFile);
                 _meshNode.UpdateTexture(Path, _texureType);
             }
             catch
             {
                 UpdateUseTexture(false);
             }
         }
     }
 }