ART_SpaceSwitcherUI

Module for creating user interfaces that interact with the ART_SpaceSwitcher module classes.

class Tools.Animation.Interfaces.ART_SpaceSwitcherUI.ART_CreateGlobalSpacesUI(parent=None)[source]

Creating global spaces is like setting up standard space “slots” you always want controls to have. You could create individual spaces one at a time using the create space tool, but this allows you to achieve the same result in a few clicks. They also give you the option to exclude controls for getting a global space created on them.

These can be saved and loaded as templates as well.

../../_images/space_switcher_global_spaces_ui.png

The interface for creating a global space, which will create a space for multiple controls at once.

Note

Global spaces are always created with parentConstraints!

__init__(parent=None)[source]
class Tools.Animation.Interfaces.ART_SpaceSwitcherUI.ART_CreateSpaceUI(control=None, uiInst=None, parent=None)[source]

User interface class that requests the control to create a space for, the space object, the name of the space, and what type of constraint to use. This information then gets passed to the main space switcher class and creates the space.

../../_images/space_switcher_create_ui.png

The interface for creating a space for a control.

To run from a command line, use:

import Tools.Animation.Interfaces.ART_SpaceSwitcherUI as ssui
ssui.create_space(None, None)
__init__(control=None, uiInst=None, parent=None)[source]
Parameters:
  • control (str) – The name of the control that will receive the created space.
  • uiInst (ART_AnimationUI) – Instance of the animation interface.
  • parent (QtWidgets.QWidget) – Parent widget.
class Tools.Animation.Interfaces.ART_SpaceSwitcherUI.ART_SpaceSwitcherUI(parent=None)[source]

This class provides a user interface for switching and baking spaces.

../../_images/space_switcher_switch_ui.png

The interface for switching spaces. Also includes functions for updating matching on spaces.

../../_images/space_switcher_bake_ui.png

The interface for baking spaces.

To run from a command line, use:

import Tools.Animation.Interfaces.ART_SpaceSwitcherUI as ssui
ssui.run()
__init__(parent=None)[source]
Parameters:parent (QtWidgets.QWidget) – Parent widget
class Tools.Animation.Interfaces.ART_SpaceSwitcherUI.DeleteSpaceWidget(control, parent=None)[source]

Presents a user interface for deleting a space found on the control passed into the instance of this class.

../../_images/space_switcher_remove_ui.png

The interface for deleting a space.

__init__(control, parent=None)[source]
Parameters:
  • control (str) – The name of the control to delete a space from.
  • parent (QtWidgets.QWidget) – Parent widget for the UI.
class Tools.Animation.Interfaces.ART_SpaceSwitcherUI.RenameSpaceWidget(control=None, parent=None)[source]

Presents a user interface for renaming a space found on the control passed into the instance of this class.

../../_images/space_switcher_rename_ui.png

The interface for renaming a space.

__init__(control=None, parent=None)[source]
Parameters:
  • control (str) – The name of the control which contains the space to be renamed.
  • parent (QtWidgets.QWidget) – Parent widget of the UI.
class Tools.Animation.Interfaces.ART_SpaceSwitcherUI.SelectControlsWidget(parent=None, multi_select=False, selection_list=None, has_spaces=False)[source]

Shows a user interface of all controls that have a space switcher. The user can then choose from this list to populate the main ART_SpaceSwitcherUI control lineEdit.

../../_images/space_switch_selection_widget.png

Select controls widget.

__init__(parent=None, multi_select=False, selection_list=None, has_spaces=False)[source]
Parameters:
  • parent (QtWidgets.QtWidget) – Parent widget.
  • multi_select (bool) – Whether or not the list widget allows multi-selection.
  • selection_list (string array) – A supplied list of items to select by default in the list widget.
  • has_spaces (bool) – Whether or not the controls need to have spaces to be valid or just have the ability.
Tools.Animation.Interfaces.ART_SpaceSwitcherUI.create_global_spaces()[source]

Instantiate the ART_CreateGlobalSpacesUI class.

Tools.Animation.Interfaces.ART_SpaceSwitcherUI.create_space(control, uiInst=None)[source]

Instantiate the ART_CreateSpaceUI.

Parameters:
  • control (str) – The control to create the space for.
  • uiInst – The animation interface instance
Type:

uiInst: QtWidgets.QWidget

Tools.Animation.Interfaces.ART_SpaceSwitcherUI.delete_space(control)[source]

Instantiate the ART_DeleteSpaceWidget.

Parameters:control (str) – The control to delete a given space from.
Tools.Animation.Interfaces.ART_SpaceSwitcherUI.populate_line_edit(line_edit, combo_box, control=False)[source]

Takse a control and adds its text as the text for the given lineEdit.

Parameters:
  • control (str) – Control whose text to query.
  • combo_box (QtWidgets.QComboBox) – combo box needed for populating spaces to.
  • line_edit (QtWidgets.QLineEdit) – lineEdit to populate the control’s text with.
Tools.Animation.Interfaces.ART_SpaceSwitcherUI.populate_spaces(combo_box, text_field, *args)[source]

Populates the combo box with the spaces for the control specified in the line edit.

Parameters:
  • combo_box (QtWidgets.QComboBox) – combo box needed for populating spaces.
  • text_field (QtWidgets.QLineEdit) – text field needed for populating spaces.
Tools.Animation.Interfaces.ART_SpaceSwitcherUI.rename_space(control)[source]

Instantiate the ART_RenameSpaceWidget.

Parameters:control (str) – The control to create the space for.
Tools.Animation.Interfaces.ART_SpaceSwitcherUI.run()[source]

Instantiates the ART_SpaceSwitcherUI, which provides user interfaces for switching and baking spaces.

Tools.Animation.Interfaces.ART_SpaceSwitcherUI.search_controls(completer_model, combo_box, text_field, *args)[source]

Searches all controls for the text in the line edit that the completer is assigned to. Adds matches to the completer model.

Parameters:
  • completer_model (QtGui.QStringListModel) – completer model to add matches to the search results to, from the line edit
  • combo_box (QtWidgets.QComboBox) – combo box needed for populating spaces.
  • text_field (QtWidgets.QLineEdit) – text field needed for populating spaces.
Tools.Animation.Interfaces.ART_SpaceSwitcherUI.show_selection_widget(parent, line_edit, combo_box, has_spaces=False)[source]

Shows a dialog of a list of all controls that have space switching ability.

Parameters:
  • parent (QtWidgets.QWidget) – parent widget of this dialog.
  • line_edit (QtWidgets.QLineEdit) – line edit whose text to populate with the selected control from the list.
  • combo_box (QtWidgets.QComboBox) – combo box needed for populating spaces to.
  • has_spaces (bool) – Whether or not the controls to populate need to have existing spaces to be considered.