open3d.visualization.gui.Application

class open3d.visualization.gui.Application

Global application singleton. This owns the menubar, windows, and event loop

__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

add_window(self: open3d.cpu.pybind.visualization.gui.Application, arg0: open3d::visualization::gui::Window) → None

Adds a window to the application. This is only necessary when creating object that is a Window directly, rather than with create_window

create_window(self: open3d.cpu.pybind.visualization.gui.Application, title: str = '', width: int = - 1, height: int = - 1, x: int = - 1, y: int = - 1, flags: int = 0) → open3d::visualization::gui::PyWindow

Creates a window and adds it to the application. To programmatically destroy the window do window.close().Usage: create_window(title, width, height, x, y, flags). x, y, and flags are optional.

initialize(*args, **kwargs)

Overloaded function.

  1. initialize(self: open3d.cpu.pybind.visualization.gui.Application) -> None

Initializes the application, using the resources included in the wheel. One of the initialize functions _must_ be called prior to using anything in the gui module

  1. initialize(self: open3d.cpu.pybind.visualization.gui.Application, arg0: str) -> None

Initializes the application with location of the resources provided by the caller. One of the initialize functions _must_ be called prior to using anything in the gui module

post_to_main_thread(self: open3d.cpu.pybind.visualization.gui.Application, arg0: open3d::visualization::gui::Window, arg1: Callable[[], None]) → None

Runs the provided function on the main thread. This can be used to execute UI-related code at a safe point in time. If the UI changes, you will need to manually request a redraw of the window with w.post_redraw()

quit(self: open3d.cpu.pybind.visualization.gui.Application) → None

Closes all the windows, exiting as a result

render_to_image(self: open3d.cpu.pybind.visualization.gui.Application, arg0: open3d.cpu.pybind.visualization.rendering.Open3DScene, arg1: int, arg2: int) → open3d.cpu.pybind.geometry.Image

Renders a scene to an image and returns the image. If you are rendering without a visible window you should use open3d.visualization.rendering.RenderToImage instead

run(self: open3d.cpu.pybind.visualization.gui.Application) → None

Runs the event loop. After this finishes, all windows and widgets should be considered uninitialized, even if they are still held by Python variables. Using them is unsafe, even if run() is called again.

run_in_thread(self: open3d.cpu.pybind.visualization.gui.Application, arg0: Callable[[], None]) → None

Runs function in a separate thread. Do not call GUI functions on this thread, call post_to_main_thread() if this thread needs to change the GUI.

run_one_tick(self: open3d.cpu.pybind.visualization.gui.Application) → bool

Runs the event loop once, returns True if the app is still running, or False if all the windows have closed or quit() has been called.

set_font_for_code_points(self: open3d.cpu.pybind.visualization.gui.Application, arg0: str, arg1: List[int]) → None

set_font_for_code_points(font, [unicode_code_points]).The font can the path to a TrueType or OpenType font or it can be the name of the font, in which case the font will be located from the system directories. No error will be produced if the font does not contain glyphs for the specified components.

set_font_for_language(self: open3d.cpu.pybind.visualization.gui.Application, arg0: str, arg1: str) → None

set_font_for_language(font, language_code). The font can the path to a TrueType or OpenType font or it can be the name of the font, in which case the font will be located from the system directories. The language code must be two-letter, lowercase ISO 639-1 codes. Support is available for ‘en’ (English), ‘ja’ (Japanese), ‘ko’ (Korean), ‘th’ (Thai), ‘vi’ (Vietnamese), ‘zh’ (common Chinese characters), ‘zh_all’ (all Chinese characters; this creates a very large bitmap for each window). All other codes are assumed to by Cyrillic. Note that ‘ja’, ‘zh’ will create a 50 MB bitmap, and ‘zh_all’ creates a 200 MB bitmap

instance = Application singleton instance
property menubar

The Menu for the application (initially None)

property now

Returns current time in seconds

property resource_path

Returns a string with the path to the resources directory