Uranium
Application Framework
Loading...
Searching...
No Matches
UM.Tool.Tool Class Reference
Inheritance diagram for UM.Tool.Tool:
UM.PluginObject.PluginObject

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[ToolHandlegetHandle (self)
 setHandle (self, ToolHandle handle)
int getLockedAxis (self)
None setLockedAxis (self, int axis)
Optional[PlanegetDragPlane (self)
None setDragPlane (self, Optional[Plane] plane)
Optional[VectorgetDragStart (self)
None setDragStart (self, float x, float y)
Optional[VectorgetDragPosition (self, float x, float y)
Optional[VectorgetDragVector (self, float x, float y)
None setSettingToSelection (self, str key, bool value)
Optional[bool] getBoolSettingFromSelection (self, str key, bool default)
Public Member Functions inherited from UM.PluginObject.PluginObject
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
Protected Attributes inherited from UM.PluginObject.PluginObject
 _plugin_id = None
 _version = None
dict _metadata = {}
 _name = None

Detailed Description

Abstract base class for tools that manipulate (or otherwise interact with) the scene.

Member Function Documentation

◆ event()

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.

◆ getBoolSettingFromSelection()

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.

◆ getController()

Controller UM.Tool.Tool.getController ( self)
Convenience function

◆ getEnabled()

bool UM.Tool.Tool.getEnabled ( self)
Get the enabled state of the tool

◆ getHandle()

Optional[ToolHandle] UM.Tool.Tool.getHandle ( self)
Get the associated handle

◆ getLockedAxis()

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.

◆ setHandle()

UM.Tool.Tool.setHandle ( self,
ToolHandle handle )
set the associated handle

◆ setSettingToSelection()

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.

The documentation for this class was generated from the following file:
  • UM/Tool.py