public ImportMeshViewModel(Framework framework, Mesh mesh, string initialSaveFolder) { this.framework = framework; // Actually, import already done. See argument "mesh" :) Mesh = mesh; var sceneManager = new SceneManager(framework.Device, framework.AssetManager); sceneManager.LocateCameraLookingMesh(mesh); sceneManager.AddRenderable(new MeshNode(framework.Device, Mesh)); RenderViewModel = new RenderViewModel(framework, sceneManager); MaterialEditor = new MaterialEditor(mesh.Material); SaveName = Path.GetFileNameWithoutExtension(Mesh.Name); SaveFolder = initialSaveFolder; OkCommand = new DelegateCommand(ExecuteOk, CanExecuteOk); CancelCommand = new DelegateCommand(() => { RequestCancel(); }); BrowseCommand = new DelegateCommand(ExecuteBrowse); FlipVCommand = new DelegateCommand(() => Mesh.FlipTextureV()); }