SkinningTools.UI.weightEditor.weightEditor

Module Contents

Classes

WeightEditorWindow

weight editor widget,

Functions

testUI()

test the current UI without the need of all the extra functionality

class SkinningTools.UI.weightEditor.weightEditor.WeightEditorWindow(parent=None)

weight editor widget, allows for skincluster visualisation based on the vertex selection and the joints in the skincluster

toolName = WeightEditorWindow
__defaults(self)

conveninece function to gather all the default values to be used

_uiSetup(self)

convenience function to gather all buttons for the current UI

cellChanged(self, *args)

cell changed signal, makes sure that the selected indices are returned and the contexts are cleared

cleanupTable(self)

cleanup table data, forced garbage collection as this tool deals with a lot of data

clearCallback(self)

remove selection based callback

clearCopyPaste(self)

clear the copy paste data

closeEvent(self, event)

close event override

copyCells(self)

copy cell information

copyMenu(self)

simple popup menu with copy functions

createCallback(self)

create callback to refresh the current table based on selection in dcc tool

directInput(self, string)

set up popup box based on given string

Parameters

string (string) – string object representing the number

doTranslate(self)

seperate function that calls upon the translate widget to help create a new language we use the english language to translate from to make sure that translation doesnt get lost

evalHeaderWidth(self, add=3)

in here we change the size of the header based on the format of the font and amount of bones

Parameters

add (int) – buffer pixels to extend the size with

getButtonText(self)

convenience function to get the current items that need new locale text

getCellValue(self)

get and set the new cell value based on the self.inputValue from the popupbox

getClickedItemVal(self)

get the current value of the selected cells

getIgnoreList(self, row, column, rowLen, colLen)

get the list of items to be ignored

Parameters
  • row (int) – the index of the row

  • column (int) – the index of the column

  • rowLen (int) – amoutn of rows

  • colLen (int) – amount of columns

Returns

list of itmems to ignore

Return type

list

getRows(self)

get the rows of selected cells

Returns

list of selected rows

Return type

list

getSkinWeights(self)

get skinweights function, this is where we grab all the information from the dcc tool to populate the table based on either object or component selection we make sure to grab all joints and weights associated the selections will be listed as vertex components and will be split according to the object where they came from

lockJointWeight(self, jointID)

based on joint id given we lock the joint weights so they cannot change, this will be represented in the table widget as well by darkening the cells

Parameters

jointID (int) – the index of the joint to be locked

lockWeigths(self, jointID=None, lock=True)

function to lock or unlock weights, this will be represented in the widget as well as in the dcc tool

Parameters
  • jointID (int) – the index of the joint to be locked

  • lock (bool) – if True will lock the weight so it cannot be changed, if False will unlock the weight

pasteCells(self)

paste cell information

refreshTable(self)

force redraw the current table view

searchJointName(self)

based on the given text we only display columns that are represted by a partial identification of the given string in the search lineedit

selectFromHeader(self)

select the current joint we work with from the current header (based on right-click)

Todo

needs to change when other dcc then maya will be used

setClose(self)

close and cleanup the weights table

setLockedData(self, ids, inValue)

make sure that the weights are also locked in the dcc tool

Parameters
  • ids (list) – the list of indeces of the joints to be locked

  • inValue (bool) – if True will lock the weight so it cannot be changed, if False will unlock the weight

setPopupValue(self, textValue=True)

set the value for the popup menu based on the current cells

Note

maybe make this smarter so it just checks what the input is and base it on that instead of using an arg

Parameters

textValue (bool) – if True will convert the information from string to float, if False expects the information to be float already

translate(self, localeDict={})

translate the ui based on given dictionary

Parameters

localeDict (dict) – the dictionary holding information on how to translate the ui

tryNormalizeWeights(self)

force normalize the weights of the current vertex row making sure that all elements are adding up to a maximum of 1 trys to make sure that the maximum influences are kept unless more cells are altered at the same time htis is used as the set weights function as we dont want weights that are not normalized

vtxPaste(self)

paste the gathered date onto newly selected vertices

vxtCopy(self)

copy the date of selected vertices

SkinningTools.UI.weightEditor.weightEditor.testUI()

test the current UI without the need of all the extra functionality