public override void ExecutePlugin()
            string modelFile = null;

              // when running tests we don't want file selection dialog to pop up.
              if (!TestManager.IsRunning)
            modelFile = @"Models\curtainmedi.V3O"; // default model file
            if (!EditorManager.EngineManager.File_Exists(modelFile))
              // show a file open dialog to select a model file
              OpenFileDlg fileDlg = new OpenFileDlg();
              fileDlg.Caption = "Selecting the Cloth Model File";
              fileDlg.Description = "Please select the cloth model file you want to use and press OK to continue.";
              fileDlg.InitialDirectory = EditorManager.Project.ProjectDir;
              fileDlg.Filter = new string[] {".model"};
              if (fileDlg.ShowDialog() != DialogResult.OK)
              modelFile = fileDlg.FileName;
              ClothObjectShape shape = new ClothObjectShape("ClothObject",modelFile);
              shape.Position = EditorManager.Scene.CurrentShapeSpawnPosition;
              Layer layer = EditorManager.Scene.ActiveLayer;
              EditorManager.Actions.Add(AddShapeAction.CreateAddShapeAction(shape, layer.ActiveShape, layer, true));
 public override ShapeBase CreateShapeInstance()
     ClothObjectShape shape = new ClothObjectShape("ClothObject","");
       return shape;