ART_AddModuleToCanvas

Author: Jeremy Ernst

class Tools.Animation.ART_AddModuleToCanvas.ART_AddModuleToCanvas(animPickerUI, modulesToAdd, parent=None)[source]

This tool presents a UI that lists all modules not currently on the animation picker canvas, and allows the user to choose modules from the list to add to the animation picker canvas. This is an animator-facing tool.

../../_images/addModuleToCanvas.png
__init__(animPickerUI, modulesToAdd, parent=None)[source]

initialize the class, get the QSettings for the tool, and call on buildUI.

Parameters:
  • animPickerUI – the instance of the animation picker class that launched this class.
  • modulesToAdd – A list of the modules to add, which is a list of modules currently not on the animPickerUI
addModulesToList()[source]

Take the modules passed into the class, and if the modules do not already exist on the canvas, add them to the list widget.

addSelectedToCanvas()[source]

Takes the selected module in the list widget and adds it to the picker canvas. The picker UI is contained in the self.pickerUI.

buildUI()[source]

Builds the interface for the tool, showing a list of modules not currently displayed on the picker.

closeWin(event)[source]

deletes the UI.

getCurrentCanvasTab()[source]

Get the current tab of the current character of the animation picker. :return: returns the QGraphicsScene that items can then be added to.

getExistingModules()[source]

Find all existing modules on the canvas and return those modules as a list. :return: List of modules whose picker exists on the canvas.

mirrorChildren(children)[source]

Take the passed in children and mirror the item so the text is not backwards. When a module is added to the canvas, if it was a right side module, it will be mirrored. This then unmirrors the text.

Parameters:children – List of QGraphicsSimpleTextItems that need to be mirrored.