SnapToolExt#

class omni.kit.manipulator.tool.snap.SnapToolExt#

Bases: IExt

An extension for enabling and managing snap tools in the application.

This class is responsible for the initialization, management, and cleanup of snap tools. It registers and unregisters toolbar buttons, handles hotkeys, and sets up the necessary providers and menus for the snap tool functionality.

Methods

on_shutdown()

Cleans up the snap tool extension.

on_startup(ext_id)

Initializes the snap tool extension.

__init__(self: omni.ext._extensions.IExt) None#
on_shutdown()#

Cleans up the snap tool extension.

This method unsubscribes from extension hooks, and destroys the snap button group, registration helper, snap menu, hotkey, and registry if they exist.

on_startup(ext_id)#

Initializes the snap tool extension.

This method sets up the snap provider registry, registration helper, snap menu, hotkey, and hooks for the toolbar button.

Parameters:

ext_id (str) – The identifier for the extension.