picker2
=== Author: Assaf Ben Zur ===
mnsPicker UI Class
This is the UI defenition for the dynamic picker UI build.
The picker is essentially defined by the user using scene guides and attributes,
this class handles the dynamic drawing of the picker into an actual live UI.
-
The global width and height attributes of the window is read from the "Picker Layout Base"
-
The picker buttons positions are read and interperted from the rig's 'Picker Layout Guides'
-
The buttons display settings and actions are drawen from each PLG attributes, which can be editted using the PLG Setting tool.
Classes
MnsPicker2 [Class]
Picker UI Class.
Constructor: | MnsPicker2(parent(str) ; [default: mnsUIUtils.get_maya_window()]) |
Inherits from: | form_class, base_class |
Class Members: |
|
Methods: |
|
MnsPicker2 methods
attemptToGetImages [MnsPicker2 class method]
Constructor: | attemptToGetImages(self, originPath, bodyBgImage, faceBgImage, tn, **kwargs) |
Return: | None |
Arguments: |
|
Optional Arguments: |
connectSignals [MnsPicker2 class method]
Connect all UI Signals.
Constructor: | connectSignals(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
createVisMap [MnsPicker2 class method]
Constructor: | createVisMap(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
createVisRelationMapForRigTop [MnsPicker2 class method]
Constructor: | createVisRelationMapForRigTop(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
deleteCallBacks [MnsPicker2 class method]
Constructor: | deleteCallBacks(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
destroyAction [MnsPicker2 class method]
Constructor: | destroyAction(self, dummy = None) |
Return: | None |
Arguments: |
|
Optional Arguments: |
displayHowToUseGuide [MnsPicker2 class method]
Constructor: | displayHowToUseGuide(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
drawPlgButton [MnsPicker2 class method]
This is the main dynamic button draw method.
Flow:
- Acquire PLG
- calculate local space position
- gather all relevant settings
- draw the button based on the gathered settings and position, and connect it's click signal.
Constructor: | drawPlgButton(self, plg, bodyQGV, faceQGV) |
Return: | None |
Arguments: |
|
Optional Arguments: |
eventFilter [MnsPicker2 class method]
Override event filter to catch the close trigger to delete the callback
Constructor: | eventFilter(self, source, event) |
Return: | None |
Arguments: |
|
Optional Arguments: |
getControllersInView [MnsPicker2 class method]
Constructor: | getControllersInView(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
getPlgPositionandSize [MnsPicker2 class method]
Maps a PLG scene position to the UI's local layout position.
Since the positions of the PLG within the scene doesn't match the settings of QT,
this method maps the passed in plg position, in relation to the main 'Picker Layout Base',
and returns the new relative position to the UI layout.
This method also retunes the bounding box size of the given plg.
Constructor: | getPlgPositionandSize(self, plg) |
Return: | list, list (plgPosition(x,y), plgSize (width, height)) |
Arguments: |
|
Optional Arguments: |
gridToggleTrigger [MnsPicker2 class method]
Constructor: | gridToggleTrigger(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
initializePuppetPicker [MnsPicker2 class method]
Main method for the global UI draw.
The UI is initialy destroyed, then re-drawen.
Constructor: | initializePuppetPicker(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
initializeUI [MnsPicker2 class method]
Constructor: | initializeUI(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
loadWindow [MnsPicker2 class method]
Show window method.
Constructor: | loadWindow(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
newInstance [MnsPicker2 class method]
Constructor: | newInstance(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
recSetInstanceName [MnsPicker2 class method]
Constructor: | recSetInstanceName(self, idx = 0) |
Return: | None |
Arguments: |
|
Optional Arguments: |
refreshBtnState [MnsPicker2 class method]
Constructor: | refreshBtnState(self, dummy = None) |
Return: | None |
Arguments: |
|
Optional Arguments: |
refreshButtonVisibility [MnsPicker2 class method]
Constructor: | refreshButtonVisibility(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
setBGImages [MnsPicker2 class method]
Sets the bg image for the UI, in case there is one within the rig-top's attributes.
The bg cannot be set to multiple layouts, hence, a 'tab changed' trigger is connected to this method,
in order to toggle between the body and facial background images.
Constructor: | setBGImages(self, bodyQGV = None, faceQGV = None) |
Return: | None |
Arguments: |
|
Optional Arguments: |
setBtnVisStateBasedOnPupetRoot [MnsPicker2 class method]
Constructor: | setBtnVisStateBasedOnPupetRoot(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
setBtnVisStateBasedOnPupetRootAttr [MnsPicker2 class method]
Constructor: | setBtnVisStateBasedOnPupetRootAttr(self, visAttr) |
Return: | None |
Arguments: |
|
Optional Arguments: |
setLocalVarsBasedOnCurrentRigTop [MnsPicker2 class method]
Constructor: | setLocalVarsBasedOnCurrentRigTop(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
setRigTop [MnsPicker2 class method]
Constructor: | setRigTop(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
setThumbnail [MnsPicker2 class method]
Constructor: | setThumbnail(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
setWindowSize [MnsPicker2 class method]
Constructor: | setWindowSize(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
validateVisCtrl [MnsPicker2 class method]
Constructor: | validateVisCtrl(self, node) |
Return: | None |
Arguments: |
|
Optional Arguments: |
MnsPickerGraphicViewWidget [Class]
Constructor: | MnsPickerGraphicViewWidget(parent(str) ; [default: mnsUIUtils.get_maya_window()]) |
Inherits from: | QtWidgets.QGraphicsView |
Class Members: |
|
Methods: |
|
MnsPickerGraphicViewWidget methods
connectSignals [MnsPickerGraphicViewWidget class method]
Connect all UI Signals.
Constructor: | connectSignals(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
determaineSelection [MnsPickerGraphicViewWidget class method]
Constructor: | determaineSelection(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
drawConstantFG [MnsPickerGraphicViewWidget class method]
Constructor: | drawConstantFG(self, painter, rect, **kwargs) |
Return: | None |
Arguments: |
|
Optional Arguments: |
drawForeground [MnsPickerGraphicViewWidget class method]
Constructor: | drawForeground(self, painter, rect) |
Return: | None |
Arguments: |
|
Optional Arguments: |
fitContent [MnsPickerGraphicViewWidget class method]
Constructor: | fitContent(self, fromSel = False) |
Return: | None |
Arguments: |
|
Optional Arguments: |
getContentBoundingRect [MnsPickerGraphicViewWidget class method]
Constructor: | getContentBoundingRect(self, fromSel = False) |
Return: | None |
Arguments: |
|
Optional Arguments: |
getControllersInView [MnsPickerGraphicViewWidget class method]
Constructor: | getControllersInView(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
getSceneCenterPosition [MnsPickerGraphicViewWidget class method]
Constructor: | getSceneCenterPosition(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
getSelectedItems [MnsPickerGraphicViewWidget class method]
Constructor: | getSelectedItems(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
initializeGraphicsView [MnsPickerGraphicViewWidget class method]
Constructor: | initializeGraphicsView(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
keyPressEvent [MnsPickerGraphicViewWidget class method]
Constructor: | keyPressEvent(self, event) |
Return: | None |
Arguments: |
|
Optional Arguments: |
mouseMoveEvent [MnsPickerGraphicViewWidget class method]
Constructor: | mouseMoveEvent(self, event) |
Return: | None |
Arguments: |
|
Optional Arguments: |
mousePressEvent [MnsPickerGraphicViewWidget class method]
Constructor: | mousePressEvent(self, event) |
Return: | None |
Arguments: |
|
Optional Arguments: |
mouseReleaseEvent [MnsPickerGraphicViewWidget class method]
Constructor: | mouseReleaseEvent(self, event) |
Return: | None |
Arguments: |
|
Optional Arguments: |
resizeEvent [MnsPickerGraphicViewWidget class method]
Constructor: | resizeEvent(self, event) |
Return: | None |
Arguments: |
|
Optional Arguments: |
setBGImage [MnsPickerGraphicViewWidget class method]
Constructor: | setBGImage(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
setCurrentStateRect [MnsPickerGraphicViewWidget class method]
Constructor: | setCurrentStateRect(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
wheelEvent [MnsPickerGraphicViewWidget class method]
Constructor: | wheelEvent(self, event) |
Return: | None |
Arguments: |
|
Optional Arguments: |
MnsPickerGraphicsScene [Class]
Constructor: | MnsPickerGraphicsScene(parent(str) ; [default: mnsUIUtils.get_maya_window()],**kwargs) |
Inherits from: | QtWidgets.QGraphicsScene |
Class Members: |
|
picker2QPushButton [Class]
A simple QPushButton re-implementation.
This reimplementation is used to control the button's mouse events, used in 'Edit' mode.
Constructor: | picker2QPushButton(parent(str) ; [default: None],plgNode(str) ; [default: None],**kwargs) |
Inherits from: | QtWidgets.QPushButton |
Class Members: |
|
Methods: |
|
picker2QPushButton methods
btnDoubleClickedTrigger [picker2QPushButton class method]
The global action trigger for any picker UI button double click trigger.
This method will trigger the "hierarchy selection" and the "action script" for the passed in QPushButton passed in.
Constructor: | btnDoubleClickedTrigger(self, clickMode = "select") |
Return: | None |
Arguments: |
|
Optional Arguments: |
connectSignals [picker2QPushButton class method]
Constructor: | connectSignals(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
filterConnectedControls [picker2QPushButton class method]
Constructor: | filterConnectedControls(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
mouseDoubleClickEvent [picker2QPushButton class method]
Constructor: | mouseDoubleClickEvent(self, QMouseEvent) |
Return: | None |
Arguments: |
|
Optional Arguments: |
pickerButtonClickAction [picker2QPushButton class method]
The global action trigger for any picker UI button click trigger.
This method will trigger the "controls selection" and the "action script" for the passed in QPushButton passed in.
Constructor: | pickerButtonClickAction(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
rightClickedTrigger [picker2QPushButton class method]
Constructor: | rightClickedTrigger(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
setButtonStyle [picker2QPushButton class method]
Constructor: | setButtonStyle(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
setButtonVis [picker2QPushButton class method]
Constructor: | setButtonVis(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
setPositionAndScale [picker2QPushButton class method]
Constructor: | setPositionAndScale(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
updateButtonVis [picker2QPushButton class method]
Constructor: | updateButtonVis(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
Defenitions
closeAllInstances
Constructor: | closeAllInstances(idx = 0) |
Return: | None |
Arguments: |
|
Keyword Arguments: |
loadPicker
Load the Def Serach UI from globals, avoid UI duplication.
Constructor: | loadPicker() |
Return: | None |
Arguments: | |
Keyword Arguments: |