reorder_attributes.utils module¶
-
class
reorder_attributes.utils.
UndoChunkContext
¶ Bases:
object
The undo context is used to combine a chain of commands into one undo. Can be used in combination with the “with” statement.
- with UndoChunkContext():
- # code
-
class
reorder_attributes.utils.
UndoStateContext
¶ Bases:
object
The undo state is used to force undo commands to be registered when this tool is being used. Once the “with” statement is being exited, the default settings are restored.
- with UndoStateContext():
- # code
-
reorder_attributes.utils.
get_channel_box
()¶ Returns: Maya’s main channel box Return type: QtWidget.QWidget
Returns: Maya’s main channel box menu Return type: QtWidgets.QMenu Raises: RuntimeError – When menu cannot be found.
-
reorder_attributes.utils.
get_last_selected_path
()¶ Query the current selection with the Maya API and return the last item on the selection list. The reason the API has to be used is that there is a delay with cmds, not returning the right node. This function gets called as a result of a OpenMaya.MModelMessage.kActiveListModified callback.
Returns: Full path of latest selected object. Return type: str/None
-
reorder_attributes.utils.
get_main_window
()¶ Returns: Maya main window Raises: RuntimeError – When the main window cannot be obtained.
-
reorder_attributes.utils.
maya_to_qt
(name, type_=<sphinx.ext.autodoc._MockObject object>)¶ Parameters: - name (str) – Maya path of an ui object
- type (cls) –
Returns: QWidget of parsed Maya path
Return type: QWidget
Raises: RuntimeError – When no handle could be obtained
-
reorder_attributes.utils.
qt_to_maya
(widget)¶ Parameters: widget (QWidget) – QWidget of a maya ui object Returns: Maya path of parsed QWidget Return type: str