Uranium
Application Framework
|
Glue class that holds the scene, (active) view(s), (active) tool(s) and possible user inputs. More...
Public Member Functions | |
def | __init__ (self, application) |
def | getApplication (self) |
Get the application. More... | |
def | addView (self, View view) |
Add a view by name if it"s not already added. More... | |
Optional[View] | getView (self, str name) |
Request view by name. More... | |
Dict[str, View] | getAllViews (self) |
Return all views. More... | |
Optional[View] | getActiveView (self) |
Request active view. More... | |
def | setActiveView (self, str name) |
Set the currently active view. More... | |
def | enableModelRendering (self) |
def | disableModelRendering (self) |
def | isModelRenderingEnabled (self) |
def | addStage (self, Stage stage) |
Add a stage by name if it's not already added. More... | |
Optional[Stage] | getStage (self, str name) |
Request stage by name. More... | |
Dict[str, Stage] | getAllStages (self) |
Return all stages. More... | |
Optional[Stage] | getActiveStage (self) |
Request active stage. More... | |
def | setActiveStage (self, str name) |
Set the currently active stage. More... | |
def | addInputDevice (self, InputDevice device) |
Add an input device (e.g. More... | |
Optional[InputDevice] | getInputDevice (self, str name) |
Request input device by name. More... | |
def | removeInputDevice (self, str name) |
Remove an input device from the list of input devices. More... | |
def | getTool (self, str name) |
Request tool by name. More... | |
def | getAllTools (self) |
Get all tools. More... | |
def | addTool (self, tool) |
Add a Tool (transform object, translate object) if its not already added. More... | |
bool | isToolOperationActive (self) |
Gets whether a tool is currently in use. More... | |
def | getActiveTool (self) |
Request active tool. More... | |
def | setActiveTool (self, tool) |
Set the current active tool. More... | |
Scene | getScene (self) |
Get the scene. More... | |
def | event (self, Event event) |
Process an event. More... | |
def | setCameraTool (self, tool) |
Set the tool used for handling camera controls. More... | |
def | getCameraTool (self) |
Get the camera tool (if any) More... | |
def | setSelectionTool (self, tool) |
Set the tool used for performing selections. More... | |
def | getToolsEnabled (self) |
def | setToolsEnabled (self, enabled) |
def | rotateView (self, coordinate="x", angle=0) |
Static Public Attributes | |
viewsChanged = Signal() | |
Emitted when the list of views changes. More... | |
activeViewChanged = Signal() | |
Emitted when the active view changes. More... | |
stagesChanged = Signal() | |
Emitted when the list of stages changes. More... | |
activeStageChanged = Signal() | |
Emitted when the active stage changes. More... | |
toolsChanged = Signal() | |
Emitted when the list of tools changes. More... | |
toolEnabledChanged = Signal() | |
Emitted when a tool changes its enabled state. More... | |
activeToolChanged = Signal() | |
Emitted when the active tool changes. More... | |
toolOperationStarted = Signal() | |
Emitted whenever a tool starts a longer operation. More... | |
toolOperationStopped = Signal() | |
Emitted whenever a tool stops a longer operation. More... | |
contextMenuRequested = Signal() | |
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.
def UM.Controller.Controller.addInputDevice | ( | self, | |
InputDevice | device | ||
) |
Add an input device (e.g.
mouse, keyboard, etc) if it's not already added.
device | The input device to be added |
def UM.Controller.Controller.addStage | ( | self, | |
Stage | stage | ||
) |
Add a stage by name if it's not already added.
name | string Unique identifier of stage (usually the plugin name) |
stage | Stage The stage to be added |
def UM.Controller.Controller.addTool | ( | self, | |
tool | |||
) |
Add a Tool (transform object, translate object) if its not already added.
tool | Tool Tool to be added |
def UM.Controller.Controller.addView | ( | self, | |
View | view | ||
) |
Add a view by name if it"s not already added.
name | string Unique identifier of view (usually the plugin name) |
view | View The view to be added |
def UM.Controller.Controller.event | ( | self, | |
Event | event | ||
) |
Process an event.
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. |
Optional[Stage] UM.Controller.Controller.getActiveStage | ( | self | ) |
Request active stage.
Returns None if there is no active stage
def UM.Controller.Controller.getActiveTool | ( | self | ) |
Request active tool.
Returns None if there is no active tool
Optional[View] UM.Controller.Controller.getActiveView | ( | self | ) |
Request active view.
Returns None if there is no active view
Dict[str, Stage] UM.Controller.Controller.getAllStages | ( | self | ) |
Return all stages.
def UM.Controller.Controller.getAllTools | ( | self | ) |
Get all tools.
Dict[str, View] UM.Controller.Controller.getAllViews | ( | self | ) |
Return all views.
def UM.Controller.Controller.getApplication | ( | self | ) |
Get the application.
def UM.Controller.Controller.getCameraTool | ( | self | ) |
Get the camera tool (if any)
Optional[InputDevice] UM.Controller.Controller.getInputDevice | ( | self, | |
str | name | ||
) |
Request input device by name.
Returns None if no device is found.
name | string Unique identifier of input device (usually the plugin name) |
Optional[Stage] UM.Controller.Controller.getStage | ( | self, | |
str | name | ||
) |
Request stage by name.
Returns None if no stage is found.
name | string Unique identifier of stage (usually the plugin name) |
def UM.Controller.Controller.getTool | ( | self, | |
str | name | ||
) |
Request tool by name.
Returns None if no view is found.
name | string Unique identifier of tool (usually the plugin name) |
Optional[View] UM.Controller.Controller.getView | ( | self, | |
str | name | ||
) |
bool UM.Controller.Controller.isToolOperationActive | ( | self | ) |
Gets whether a tool is currently in use.
def 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.
name | string The name of the device to remove. |
def UM.Controller.Controller.setActiveStage | ( | self, | |
str | name | ||
) |
Set the currently active stage.
name | string The name of the stage to set as active |
def 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.
tool | Tool or string |
def UM.Controller.Controller.setActiveView | ( | self, | |
str | name | ||
) |
Set the currently active view.
name | string The name of the view to set as active |
def 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.
tool | Tool or string |
def 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.
tool | Tool or string |
|
static |
Emitted when the active stage changes.
|
static |
Emitted when the active tool changes.
|
static |
Emitted when the active view changes.
|
static |
Emitted when the list of stages changes.
|
static |
Emitted when a tool changes its enabled state.
|
static |
Emitted whenever a tool starts a longer operation.
tool | The tool that started the operation. |
|
static |
Emitted whenever a tool stops a longer operation.
tool | The tool that stopped the operation. |
|
static |
Emitted when the list of tools changes.
|
static |
Emitted when the list of views changes.