Uranium
Application Framework
|
Public Member Functions | |
None | __init__ (self) |
List[str] | getExposedProperties (self) |
setExposedProperties (self, *str args) | |
Optional[int] | getShortcutKey (self) |
bool | event (self, Event event) |
Controller | getController (self) |
bool | getEnabled (self) |
Optional[ToolHandle] | getHandle (self) |
setHandle (self, ToolHandle handle) | |
int | getLockedAxis (self) |
None | setLockedAxis (self, int axis) |
Optional[Plane] | getDragPlane (self) |
None | setDragPlane (self, Optional[Plane] plane) |
Optional[Vector] | getDragStart (self) |
None | setDragStart (self, float x, float y) |
Optional[Vector] | getDragPosition (self, float x, float y) |
Optional[Vector] | getDragVector (self, float x, float y) |
None | setSettingToSelection (self, str key, bool value) |
Optional[bool] | getBoolSettingFromSelection (self, str key, bool default) |
![]() | |
None | __init__ (self, *args, **kwags) |
str | getId (self) |
None | setPluginId (self, str plugin_id) |
None | setMetaData (self, Dict[str, Any] metadata) |
Dict[str, Any] | getMetaData (self) |
str | getPluginId (self) |
None | setVersion (self, str version) |
str | getVersion (self) |
Static Public Attributes | |
operationStarted = Signal() | |
operationStopped = Signal() | |
propertyChanged = Signal() | |
Protected Member Functions | |
None | _onToolEnabledChanged (self, str tool_id, bool enabled) |
None | _onSelectionChanged (self) |
List[SceneNode] | _getSelectedObjectsWithoutSelectedAncestors (self) |
Protected Attributes | |
Controller | _controller = UM.Application.Application.getInstance().getController() |
bool | _enabled = True |
_handle = None | |
_locked_axis = ToolHandle.NoAxis | |
_drag_plane = None | |
Optional[Vector] | _drag_start = None |
list | _exposed_properties = [] |
_selection_pass = None | |
_onToolEnabledChanged | |
_onSelectionChanged | |
list | _selected_objects_without_selected_ancestors = None |
_shortcut_key = None | |
![]() | |
_plugin_id = None | |
_version = None | |
dict | _metadata = {} |
_name = None | |
Abstract base class for tools that manipulate (or otherwise interact with) the scene.
bool UM.Tool.Tool.event | ( | self, | |
Event | event ) |
Handle an event. :param event: The event to handle. :return: True if this event has been handled and requires no further processing.
Optional[bool] UM.Tool.Tool.getBoolSettingFromSelection | ( | self, | |
str | key, | ||
bool | default ) |
Get a boolean setting on selection. Return True or False if all the selected object agree, None otherwise. :param key: The name of the setting. :param default: The default value when the setting is not set on the object.
Controller UM.Tool.Tool.getController | ( | self | ) |
Convenience function
bool UM.Tool.Tool.getEnabled | ( | self | ) |
Get the enabled state of the tool
Optional[ToolHandle] UM.Tool.Tool.getHandle | ( | self | ) |
Get the associated handle
int UM.Tool.Tool.getLockedAxis | ( | self | ) |
Get which axis is locked, if any. :return: The ID of the axis or axes that are locked. See the `ToolHandle` class for the associations of IDs to each axis.
UM.Tool.Tool.setHandle | ( | self, | |
ToolHandle | handle ) |
set the associated handle
None UM.Tool.Tool.setSettingToSelection | ( | self, | |
str | key, | ||
bool | value ) |
Set a setting on all selected objects without ancestors :param key: The name of the setting. :param value: The setting state.