diff --git a/Viewer/Mac/Base.lproj/Main.storyboard b/Viewer/Mac/Base.lproj/Main.storyboard index a2d00c3a..1f3e4e45 100644 --- a/Viewer/Mac/Base.lproj/Main.storyboard +++ b/Viewer/Mac/Base.lproj/Main.storyboard @@ -238,6 +238,11 @@ + + + + + diff --git a/Viewer/Mac/Document.swift b/Viewer/Mac/Document.swift index 1d4c8f21..987a9578 100644 --- a/Viewer/Mac/Document.swift +++ b/Viewer/Mac/Document.swift @@ -423,6 +423,17 @@ class Document: NSDocument { isOrthographic.toggle() } + @IBAction func toggleFloatWindow(_: NSMenuItem) { + if let window = viewController?.view.window { + if window.level == .floating { + window.level = .normal + return + } + + window.level = .floating + } + } + // MARK: Menus override func validateMenuItem(_ menuItem: NSMenuItem) -> Bool { @@ -461,6 +472,10 @@ class Document: NSDocument { case #selector(showModelInfo(_:)): menuItem.title = selectedGeometry == nil ? "Scene Info" : "Selected Shape Info" + case #selector(toggleFloatWindow(_:)): + if let window = viewController?.view.window { + menuItem.state = window.level == .floating ? .on : .off + } default: break } diff --git a/docs/mac/getting-started.md b/docs/mac/getting-started.md index bf8d1144..3387c7ef 100755 --- a/docs/mac/getting-started.md +++ b/docs/mac/getting-started.md @@ -37,6 +37,8 @@ No third-party editors currently support ShapeScript syntax directly, but if you ShapeScript will only ask you which editor you want to use the *first* time you edit a file, then it will remember your choice. If you change your mind later, you can select a different editor in Preferences (select the `ShapeScript > Preferences…` menu or press **Cmd-,**). +When using an external editor, it may be useful to have the window displaying the rendered model accessible in the same workspace so you do not have to use split-screen or switch applications every time you make a change to see the result. You can do this using the `View > Float Window` option. Note that this setting must be set independently for each window. + ## File Structure The first line of the default `.shape` document looks like this: