ArchComponent.ArchSelectionObserver Class Reference
Public Member Functions | |
def | addSelection (self, document, object, element, position) |
Public Attributes | |
hide | |
nextCommand | |
origin | |
watched | |
Detailed Description
Selection observer used throughout the Arch module. When a nextCommand is specified, the observer fires a Gui command when anything is selected. When a watched object is specified, the observer will only fire when this watched object is selected. TODO: This could probably use a rework. Most of the functionality isn't used. It does not work correctly to reset the appearance of parent object in ComponentTaskPanel.editObject(), for example. Parameters ---------- watched: <App::DocumentObject>, optional If no watched value is provided, functionality relating to origin and hide parameters will not occur. Only the nextCommand will fire. When a watched value is provided, the selection observer will only fire when the watched object has been selected. hide: bool Sets if the watched object should be hidden. origin: <App::DocumentObject, optional If provided, and hide is True, will make the origin object selectable, and opaque (set transparency to 0). nextCommand: str Name of Gui command to run when the watched object is selected, (if one is specified), or when anything is selected (if no watched object is specified).
Member Function Documentation
◆ addSelection()
def ArchComponent.ArchSelectionObserver.addSelection | ( | self, | |
document, | |||
object, | |||
element, | |||
position | |||
) |
Method called when a selection is made on the Gui. When a nextCommand is specified, fire a Gui command when anything is selected. When a watched object is specified, only fire when this watched object is selected. Parameters ---------- document: str The document's Name. object: str The selected object's Name. element: str The element on the object that was selected, such as an edge or face. position: The location in XYZ space the selection was made.
References ArchComponent.ArchSelectionObserver.hide, ArchComponent.ArchSelectionObserver.nextCommand, ArchComponent.ArchSelectionObserver.origin, and ArchComponent.ArchSelectionObserver.watched.
Member Data Documentation
◆ hide
ArchComponent.ArchSelectionObserver.hide |
◆ nextCommand
ArchComponent.ArchSelectionObserver.nextCommand |
Referenced by ArchComponent.ArchSelectionObserver.addSelection().
◆ origin
ArchComponent.ArchSelectionObserver.origin |
◆ watched
ArchComponent.ArchSelectionObserver.watched |
Referenced by ArchComponent.ArchSelectionObserver.addSelection().
The documentation for this class was generated from the following file:
- src/Mod/Arch/ArchComponent.py