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)
 
Optional[str] getActiveView (self)
 
None setActiveView (self, str name)
 
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)
 
list[str] getRequiredExtraRenderingPasses (self)
 
- Public Member Functions inherited from UM.PluginObject.PluginObject
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()
 
 activeViewChanged = Signal()
 

Protected Member Functions

None _onToolEnabledChanged (self, str tool_id, bool enabled)
 
None _onSelectionChanged (self)
 
List[SceneNode_getSelectedObjectsWithoutSelectedAncestors (self)
 

Protected Attributes

 _controller
 
 _enabled
 
Optional[ToolHandle_handle
 
int _locked_axis
 
Optional[Plane_drag_plane
 
Optional[Vector_drag_start
 
List[str] _exposed_properties
 
Optional[SelectionPass_selection_pass
 
 _onToolEnabledChanged
 
 _onSelectionChanged
 
Optional[List[SceneNode]] _selected_objects_without_selected_ancestors
 
Optional[int] _shortcut_key
 
Optional[str] _active_view
 
int _face_id
 
 _face_id
 
 _selected_objects_without_selected_ancestors
 
- Protected Attributes inherited from UM.PluginObject.PluginObject
 _plugin_id
 
 _version
 
 _metadata
 
 _name
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __init__()

None UM.Tool.Tool.__init__ ( self)

Reimplemented from UM.PluginObject.PluginObject.

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.

◆ setActiveView()

None UM.Tool.Tool.setActiveView ( self,
str name )
Set the currently active view for this tool.
:param name:  The name of the view to set as active, or None is the tool has no specific view

◆ 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: