ART_SelectionSetsUI

class Tools.Animation.ART_SelectionSetsUI.ART_SelectionSetsUI(parent=None)[source]

This class creates the selection sets interface tool. This tool allows the user to add and modify selection sets.

__init__(parent=None)[source]

Instantiates the class, gets settings values from QSettings. Calls on building the interface. Lastly, populates the UI.

../../_images/selectionSetsMaster.png
_add_button(objectName, tooltip)[source]

Adds toolbar buttons for the tangent tools.

Parameters:
  • image – the image to be used for QIcon
  • tooltip – the tooltip image path
Returns:

returns the QPushButton created

See also

buildUI

_add_selection_sets(data, path)[source]

Creates the selection set buttons in the UI.

Parameters:
  • data – The data from the selection set file (name, category, controls)
  • path

    The file path of the selectioh set file.

_clearLayout(layout)[source]

Clears the given layout of all child widgets

Parameters:layout – the layout to clear widgets from
_get_categories()[source]

Find the categories from all of the selection sets and compose a list.

Returns:A list of all categories from the selection sets.
_get_filter_index(text)[source]

Finds the index of the given text in the category combo box.

Parameters:text – the text to
Returns:returns the index of the text in the category combo box.
_populate_add_remove_UI(path)[source]

Populates the listWidget in the add/remove UI.

Parameters:path – Path to the selection set file.
Returns:returns a list of the controls to add to the list widget.
_populate_categories()[source]

populate the categories comboBox with the categories found in the selection sets.

_populate_sets()[source]

Populate the UI with buttons for each selection set. (If the category of the selection set matches the current category, or if the current category is all.)

See also

_add_selection_sets

_strip_namespaces(selection)[source]

Takes the passed in controls and strips any namespaces.

Parameters:selection – objects to strip namespaces from
Returns:new list of controls without namespaces
add_remove_set_UI(add, remove, path)[source]

Creates the UI for adding new items to the selection set or removing items from the selection set.

Parameters:
  • add – If add is true, the UI functions will be changed to allow for adding items to the set.
  • remove – if remove is true, the UI functions will be changed to allow for removing items from the set.
  • path – the file path of the selection set
add_to_set(checkbox, path)[source]

Adds current selection to the selection set. Modifies the selection set file to reflect those changes.

Parameters:
  • checkbox – the checkbox widget to see if we should store namespaces or not.
  • path – the selection set file path
buildUI()[source]

Builds the interface for the tool.

See also

_populate_sets

See also

_populate_categories

See also

_add_button

../../_images/selectionSets.png
createContextMenu(button, point)[source]

Creates a context menu for the selection set buttons.

Parameters:
  • button – Which button to create the context menu for.
  • point

    the cursor position.

create_new_set()[source]

Creates a new selection set. Called on from create_new_set_UI().

See also

create_new_set_UI

See also

write_set_to_file

create_new_set_UI()[source]

Builds an interface for creating a new selection set.

delete_set(path)[source]

Deletes the selection set from disk.

Parameters:path – path of the file to delete.
remove_from_set(path)[source]

Removes the selected listWidget items from the selection set, then modifies the selection set file to reflect those changes.

Parameters:path – selection set file path.
rename_set(path, button)[source]

Renames the selection set.

Parameters:
  • path – Selection set file path
  • button – the button widget whose context menu was called. Used to set text of button after the rename.
select_controls(data)[source]

Selects the controls in the selection set. If shift is held down while selecting, it will append the selection.

Parameters:data – selection set file data (name, category, controls)
set_tangents(tangentType)[source]

Sets the tangents of the selections’ keys to the given tangent type.

Parameters:tangentType – auto, spline, step, flat, etc..
write_set_to_file(file_name, category, selection)[source]

Writes the selection set to disk.

Parameters:
  • file_name – The name of the file and the selection set
  • category – The category name
  • selection – The controls for the selection set
Tools.Animation.ART_SelectionSetsUI.run()[source]

Deletes the UI if it exists, then instatiates the class, building the tool and the UI.

Returns:the instance of this tool