Glue class that holds the scene, (active) view(s), (active) tool(s) and possible user inputs.
More...
|
| __init__ (self, application) |
|
| getApplication (self) |
| Get the application.
|
|
| addView (self, View view) |
| Add a view by name if it"s not already added.
|
|
Optional[View] | getView (self, str name) |
| Request view by name.
|
|
Dict[str, View] | getAllViews (self) |
| Return all views.
|
|
Optional[View] | getActiveView (self) |
| Request active view.
|
|
| setActiveView (self, str name) |
| Set the currently active view.
|
|
| enableModelRendering (self) |
|
| disableModelRendering (self) |
|
| isModelRenderingEnabled (self) |
|
| addStage (self, Stage stage) |
| Add a stage by name if it's not already added.
|
|
Optional[Stage] | getStage (self, str name) |
| Request stage by name.
|
|
Dict[str, Stage] | getAllStages (self) |
| Return all stages.
|
|
Optional[Stage] | getActiveStage (self) |
| Request active stage.
|
|
| setActiveStage (self, str name) |
| Set the currently active stage.
|
|
| addInputDevice (self, InputDevice device) |
| Add an input device (e.g.
|
|
Optional[InputDevice] | getInputDevice (self, str name) |
| Request input device by name.
|
|
| removeInputDevice (self, str name) |
| Remove an input device from the list of input devices.
|
|
| getTool (self, str name) |
| Request tool by name.
|
|
| getAllTools (self) |
| Get all tools.
|
|
| addTool (self, tool) |
| Add a Tool (transform object, translate object) if its not already added.
|
|
bool | isToolOperationActive (self) |
| Gets whether a tool is currently in use.
|
|
| getActiveTool (self) |
| Request active tool.
|
|
| setActiveTool (self, tool) |
| Set the current active tool.
|
|
Scene | getScene (self) |
| Get the scene.
|
|
| event (self, Event event) |
| Process an event.
|
|
| setCameraTool (self, tool) |
| Set the tool used for handling camera controls.
|
|
| getCameraTool (self) |
| Get the camera tool (if any)
|
|
| setSelectionTool (self, tool) |
| Set the tool used for performing selections.
|
|
| getToolsEnabled (self) |
|
| setToolsEnabled (self, enabled) |
|
| rotateView (self, coordinate="x", angle=0) |
|
|
| addStage |
|
| addView |
|
| addTool |
|
| addInputDevice |
|
| event |
|
|
| viewsChanged = Signal() |
| Emitted when the list of views changes.
|
|
| activeViewChanged = Signal() |
| Emitted when the active view changes.
|
|
| stagesChanged = Signal() |
| Emitted when the list of stages changes.
|
|
| activeStageChanged = Signal() |
| Emitted when the active stage changes.
|
|
| toolsChanged = Signal() |
| Emitted when the list of tools changes.
|
|
| toolEnabledChanged = Signal() |
| Emitted when a tool changes its enabled state.
|
|
| activeToolChanged = Signal() |
| Emitted when the active tool changes.
|
|
| toolOperationStarted = Signal() |
| Emitted whenever a tool starts a longer operation.
|
|
| toolOperationStopped = Signal() |
| Emitted whenever a tool stops a longer operation.
|
|
| contextMenuRequested = Signal() |
|
|
| _onToolOperationStarted (self, tool) |
|
| _onToolOperationStopped (self, tool) |
|
|
| _scene |
|
| _application |
|
| _is_model_rendering_enabled |
|
| _active_view |
|
| _views |
|
| _active_tool |
|
| _tool_operation_active |
|
| _tools |
|
| _camera_tool |
|
| _selection_tool |
|
| _tools_enabled |
|
| _active_stage |
|
| _stages |
|
| _input_devices |
|
| _onToolOperationStarted |
|
| _onToolOperationStopped |
|
Glue class that holds the scene, (active) view(s), (active) tool(s) and possible user inputs.
The different types of views / tools / inputs are defined by plugins.
- See also
- View
-
Tool
-
Scene
◆ addInputDevice()
UM.Controller.Controller.addInputDevice |
( |
|
self, |
|
|
InputDevice |
device |
|
) |
| |
Add an input device (e.g.
mouse, keyboard, etc) if it's not already added.
- Parameters
-
device | The input device to be added |
◆ addStage()
UM.Controller.Controller.addStage |
( |
|
self, |
|
|
Stage |
stage |
|
) |
| |
Add a stage by name if it's not already added.
- Parameters
-
name | string Unique identifier of stage (usually the plugin name) |
stage | Stage The stage to be added |
◆ addTool()
UM.Controller.Controller.addTool |
( |
|
self, |
|
|
|
tool |
|
) |
| |
Add a Tool (transform object, translate object) if its not already added.
- Parameters
-
tool | Tool Tool to be added |
◆ addView()
UM.Controller.Controller.addView |
( |
|
self, |
|
|
View |
view |
|
) |
| |
Add a view by name if it"s not already added.
- Parameters
-
name | string Unique identifier of view (usually the plugin name) |
view | View The view to be added |
◆ event()
UM.Controller.Controller.event |
( |
|
self, |
|
|
Event |
event |
|
) |
| |
Process an event.
- Parameters
-
event | Event event to be handle. The event is first passed to the camera tool, then active tool and finally selection tool. If none of these events handle it (when they return something that does not evaluate to true) a context menu signal is emitted. |
◆ getActiveStage()
Optional[Stage] UM.Controller.Controller.getActiveStage |
( |
|
self | ) |
|
Request active stage.
Returns None if there is no active stage
- Returns
- stage Stage if an stage is active, None otherwise.
◆ getActiveTool()
UM.Controller.Controller.getActiveTool |
( |
|
self | ) |
|
Request active tool.
Returns None if there is no active tool
- Returns
- Tool Tool if an tool is active, None otherwise.
◆ getActiveView()
Optional[View] UM.Controller.Controller.getActiveView |
( |
|
self | ) |
|
Request active view.
Returns None if there is no active view
- Returns
- view View if an view is active, None otherwise.
◆ getAllStages()
Dict[str, Stage] UM.Controller.Controller.getAllStages |
( |
|
self | ) |
|
Return all stages.
- Returns
- stages dict
◆ getAllTools()
UM.Controller.Controller.getAllTools |
( |
|
self | ) |
|
Get all tools.
- Returns
- tools dict
◆ getAllViews()
Dict[str, View] UM.Controller.Controller.getAllViews |
( |
|
self | ) |
|
Return all views.
- Returns
- views dict
◆ getApplication()
UM.Controller.Controller.getApplication |
( |
|
self | ) |
|
Get the application.
- Returns
- Application \type {Application}
◆ getCameraTool()
UM.Controller.Controller.getCameraTool |
( |
|
self | ) |
|
Get the camera tool (if any)
- Returns
- camera tool (or none)
◆ getInputDevice()
Optional[InputDevice] UM.Controller.Controller.getInputDevice |
( |
|
self, |
|
|
str |
name |
|
) |
| |
Request input device by name.
Returns None if no device is found.
- Parameters
-
name | string Unique identifier of input device (usually the plugin name) |
- Returns
- input InputDevice device if name was found, none otherwise.
◆ getScene()
Scene UM.Controller.Controller.getScene |
( |
|
self | ) |
|
Get the scene.
- Returns
- scene Scene
◆ getStage()
Optional[Stage] UM.Controller.Controller.getStage |
( |
|
self, |
|
|
str |
name |
|
) |
| |
Request stage by name.
Returns None if no stage is found.
- Parameters
-
name | string Unique identifier of stage (usually the plugin name) |
- Returns
- Stage Stage if name was found, none otherwise.
◆ getTool()
UM.Controller.Controller.getTool |
( |
|
self, |
|
|
str |
name |
|
) |
| |
Request tool by name.
Returns None if no view is found.
- Parameters
-
name | string Unique identifier of tool (usually the plugin name) |
- Returns
- tool Tool if name was found, none otherwise.
◆ getView()
Optional[View] UM.Controller.Controller.getView |
( |
|
self, |
|
|
str |
name |
|
) |
| |
Request view by name.
Returns None if no view is found.
- Parameters
-
name | string Unique identifier of view (usually the plugin name) |
- Returns
- View View if name was found, none otherwise.
◆ isToolOperationActive()
bool UM.Controller.Controller.isToolOperationActive |
( |
|
self | ) |
|
Gets whether a tool is currently in use.
- Returns
- bool true if a tool current being used.
◆ removeInputDevice()
UM.Controller.Controller.removeInputDevice |
( |
|
self, |
|
|
str |
name |
|
) |
| |
Remove an input device from the list of input devices.
Does nothing if the input device is not in the list.
- Parameters
-
name | string The name of the device to remove. |
◆ setActiveStage()
UM.Controller.Controller.setActiveStage |
( |
|
self, |
|
|
str |
name |
|
) |
| |
Set the currently active stage.
- Parameters
-
name | string The name of the stage to set as active |
◆ setActiveTool()
UM.Controller.Controller.setActiveTool |
( |
|
self, |
|
|
|
tool |
|
) |
| |
Set the current active tool.
The tool can be set by name of the tool or directly passing the tool object.
- Parameters
-
◆ setActiveView()
UM.Controller.Controller.setActiveView |
( |
|
self, |
|
|
str |
name |
|
) |
| |
Set the currently active view.
- Parameters
-
name | string The name of the view to set as active |
◆ setCameraTool()
UM.Controller.Controller.setCameraTool |
( |
|
self, |
|
|
|
tool |
|
) |
| |
Set the tool used for handling camera controls.
Camera tool is the first tool to receive events. The tool can be set by name of the tool or directly passing the tool object.
- Parameters
-
- See also
- setSelectionTool
-
setActiveTool
◆ setSelectionTool()
UM.Controller.Controller.setSelectionTool |
( |
|
self, |
|
|
|
tool |
|
) |
| |
Set the tool used for performing selections.
Selection tool receives its events after camera tool and active tool. The tool can be set by name of the tool or directly passing the tool object.
- Parameters
-
- See also
- setCameraTool
-
setActiveTool
◆ toolOperationStarted
UM.Controller.Controller.toolOperationStarted = Signal() |
|
static |
Emitted whenever a tool starts a longer operation.
- Parameters
-
tool | The tool that started the operation. |
- See also
- Tool::startOperation
◆ toolOperationStopped
UM.Controller.Controller.toolOperationStopped = Signal() |
|
static |
Emitted whenever a tool stops a longer operation.
- Parameters
-
tool | The tool that stopped the operation. |
- See also
- Tool::stopOperation
The documentation for this class was generated from the following file: