autorigs.modules.advancedFace.character package

Submodules

autorigs.modules.advancedFace.character.autoRigsCharacterBuilder module

class autorigs.modules.advancedFace.character.autoRigsCharacterBuilder.AutoRigsCharacterBuilder(index, modulename, moduletype, autorigs_asset, buildguide, model, parentinfo, params_widget, prefix='', parent=None, deform_bones=None, geo_builder=None)

Bases: autorigs.modules.base.autoRigsBaseBuilder.AutoRigsBaseBuilder

BONE_KEY = 'bone'
BONE_SUFFIX = 'bone'
INTERFACE = {'blendcontrols': ('blendcontrols', 'Blend Shapes'), 'folder': ('folder', 'Character'), 'locatorcontrols': ('locatorcontrols', 'Locator Controls'), 'parentcontrols': ('parentcontrols', 'Parent Controls')}
LOCATOR_KEY = 'locator'
NODES = {'characterroot': ('characterroot',), 'mask': ('mask',), 'tanout': ('TAN_OUT',), 'transferstart': ('TRANSFER_START',)}
OFFSET_KEY = 'offset'
OFFSET_SUFFIX = 'control'
PARENT_KEY = 'parent'
ROOT_KEY = 'root'
ROOT_SUFFIX = 'root'
ROTATE_KEY = 'rctrl'
TRANSLATE_KEY = 'tctrl'
UV_KEY = 'uvctrl'
addCaptureNetwork()

Make the character mask deform with the head and jaw bones if they exist

addDeformBone(bone)

Add a bone that will deform the character mask

addLidNetwork(prefix, group_name)

Creates a network that will output a curve to be used for the lid/lip blendshape deform

addTanNetwork()

Adds a tan attribute to the mask points

addTransferPosition()
buildInterfaceKey(node_key, transform_key)
buildRigControls()

Creates the bones and controls based on the guide objects. prefix: the prefix to use for all the nodes created assetnode: the autorig assset node in which to create the rig model: the module’s model for build options buildguide: the module’s buildguides parent: a function takes a node as the argument and parent the node

buildString(base, suffix)
createFolderTemplate()

Creates the folder parm template for the module. model: the module’s model for build options

createOffsetControl(index, locator, t, parent_offset=None)
linkBlendShapes()
linkOffsetToInterface(offset, key, isParent=False)
onCaptureCompleted()

Processes to run after geometry is captured

processParentOffsets()
updateDicts()

Update nodes and interface dicts with blendshapes/locator/offset/bone information

autorigs.modules.advancedFace.character.buildCharacterGuide module

class autorigs.modules.advancedFace.character.buildCharacterGuide.CharacterGuide(assetnode, geometryguides, templateguides, cageguides)

Bases: autorigs.modules.base.buildBaseGuide.BaseGuide

BLENDSHAPES = 'blendshapes'
BS_OUT = 'bsout'
CONSTRAINTS = 'constraints'
DEFORM_OUT = 'deformout'
GEO_FILE = 'file'
JSON_KEY = 'character'
LOCATOR_KEY = 'locator'
LPC_CHARACTER = 'character'
LPC_GEO = 'lpc_geo'
LPC_GEO_FILE = 'lpc_geo.bgeo'
PARENT_KEY = 'parent'
bakeCage()

Bake the low poly cage from template to character specific poly cage

buildFromJsonExisting(json)
buildFromJsonNew()
clearBlendShapes(blendshapes, tmp_inputs)
createCPCNetwork()
createCustomParentLocator(name, key, uv)

Creates an offset guide hovering over the given uv

createLocator(name, key=None)
createNurbsParentLocator(name, key, prim)
createParentLocator(name, key)
createSurfacePatchingInterface()
createSurfacePatchingNetwork(sop_input)
deleteGuides()
findNodeByType(parent, type_name)
generateCharacter()
getConstraintsNode()
getGeometryGuide()
getLocatorKeyAtIndex(index)
getLocatorNodes()
getNurbsParentName(prim_id)
getParentKeyAtIndex(index)
getParentNodes()
getPrimNameFromPrimId(prim_id)
getRootKey()
getRootNode()
isBuilt()
removeLocator(locator)
removeNode(key)
renameGuides()
saveGeometry(sop, node, name)
setJSON(json)
setParmsFromUV(node, uv)

Sets the translates and rotates of the node so that it is hovering above the provided uv coordinates and rotated tangentially with the z-axis pointing away from the surface

sopCreateEdit(name, sop1, sop2)
sortLocatorKeys(tup)
sortParentKeys(tup)
toJSON()
updateParentLocator(locator, uv)

autorigs.modules.advancedFace.character.characterGuideParams module

class autorigs.modules.advancedFace.character.characterGuideParams.ModuleParamsWidget(characterguide)

Bases: autorigs.modules.base.autoRigsBaseWidget.BaseParamWidget

MIRROR_PREFIX = 'mirror_'
PARENT_TYPE_CUSTOM = 2
PARENT_TYPE_ITEMS = ['None', 'NURBS', 'Custom']
PARENT_TYPE_NONE = 0
PARENT_TYPE_NURBS = 1
PRESETS_FILES = ['', 'C:/PROGRA~1/SIDEEF~1/HOUDIN~1.439/houdini/autorigs/presets/facepreset1.json', 'C:/PROGRA~1/SIDEEF~1/HOUDIN~1.439/houdini/autorigs/presets/facepreset2.json']
PRESETS_JSON = [None, {'locators': [{'uv': [0.5, 0.5, 5.0], 'parent_type': 0, 'name': 'nose_side_locator', 'parent': ''}, {'uv': [0.5, 0.5, 11.0], 'parent_type': 0, 'name': 'mirror_nose_side_locator', 'parent': ''}, {'uv': [0.5, 0.5, 1.0], 'parent_type': 0, 'name': 'eye_locator', 'parent': ''}, {'uv': [0.5, 0.5, 7.0], 'parent_type': 0, 'name': 'mirror_eye_locator', 'parent': ''}, {'uv': [0.5, 0.5, 2.0], 'parent_type': 0, 'name': 'eye_side_locator', 'parent': ''}, {'uv': [0.5, 0.5, 8.0], 'parent_type': 0, 'name': 'mirror_eye_side_locator', 'parent': ''}, {'uv': [0.5, 0.5, 13.0], 'parent_type': 0, 'name': 'eyebrow_locator', 'parent': ''}, {'uv': [0.5, 0.5, 18.0], 'parent_type': 0, 'name': 'mirror_eyebrow_locator', 'parent': ''}, {'uv': [0.5, 0.5, 4.0], 'parent_type': 0, 'name': 'mouth_side_locator', 'parent': ''}, {'uv': [0.5, 0.5, 10.0], 'parent_type': 0, 'name': 'mirror_mouth_side_locator', 'parent': ''}, {'uv': [0.5, 0.5, 0.0], 'parent_type': 0, 'name': 'cheek_locator', 'parent': ''}, {'uv': [0.5, 0.5, 6.0], 'parent_type': 0, 'name': 'mirror_cheek_locator', 'parent': ''}, {'uv': [0.5, 0.5, 3.0], 'parent_type': 0, 'name': 'jaw_locator', 'parent': ''}, {'uv': [0.5, 0.5, 9.0], 'parent_type': 0, 'name': 'mirror_jaw_locator', 'parent': ''}, {'uv': [0.5, 0.5, 17.0], 'parent_type': 0, 'name': 'nose_root_locator', 'parent': ''}, {'uv': [0.5, 0.5, 16.0], 'parent_type': 0, 'name': 'nose_locator', 'parent': ''}, {'uv': [0.5, 0.5, 15.0], 'parent_type': 0, 'name': 'mouth_upper_locator', 'parent': ''}, {'uv': [0.5, 0.5, 12.0], 'parent_type': 0, 'name': 'chin_locator', 'parent': ''}, {'uv': [0.5, 0.5, 14.0], 'parent_type': 0, 'name': 'mouth_lower_locator', 'parent': ''}], 'main_nodes': ['jaw_locator', 'eyebrow_locator', 'nose_side_locator', 'mouth_side_locator', 'eye_locator', 'cheek_locator', 'eye_side_locator'], 'parents': {}, 'mirror': {'mirror_cheek_locator': 'cheek_locator', 'mirror_eye_locator': 'eye_locator', 'jaw_locator': 'mirror_jaw_locator', 'eyebrow_locator': 'mirror_eyebrow_locator', 'eye_locator': 'mirror_eye_locator', 'mirror_eye_side_locator': 'eye_side_locator', 'mirror_jaw_locator': 'jaw_locator', 'mouth_side_locator': 'mirror_mouth_side_locator', 'nose_side_locator': 'mirror_nose_side_locator', 'mirror_eyebrow_locator': 'eyebrow_locator', 'cheek_locator': 'mirror_cheek_locator', 'mirror_nose_side_locator': 'nose_side_locator', 'mirror_mouth_side_locator': 'mouth_side_locator', 'eye_side_locator': 'mirror_eye_side_locator'}}, {'locators': [{'uv': [0.110819, 0.944697, 12.0], 'parent_type': 2, 'name': 'chin_locator', 'parent': '../chin_parent'}, {'uv': [0.298555, 0.00669, 14.0], 'parent_type': 2, 'name': 'chin_locator1', 'parent': '../chin_parent'}, {'uv': [0.607822, 0.929582, 12.0], 'parent_type': 2, 'name': 'chin_locator2', 'parent': '../chin_parent'}, {'uv': [0.913823, 0.710906, 12.0], 'parent_type': 2, 'name': 'chin_locator3', 'parent': '../chin_parent'}, {'uv': [0.915789, 0.256632, 14.0], 'parent_type': 2, 'name': 'chin_locator4', 'parent': '../chin_parent'}, {'uv': [0.565365, 0.489671, 14.0], 'parent_type': 2, 'name': 'chin_locator5', 'parent': '../chin_parent'}, {'uv': [0.245295, 0.458167, 14.0], 'parent_type': 2, 'name': 'chin_locator6', 'parent': '../chin_parent'}, {'uv': [0.118098, 0.390711, 12.0], 'parent_type': 2, 'name': 'chin_locator7', 'parent': '../chin_parent'}, {'uv': [0.364635, 0.601082, 12.0], 'parent_type': 2, 'name': 'chin_locator8', 'parent': '../chin_parent'}, {'uv': [0.63877, 0.623498, 12.0], 'parent_type': 2, 'name': 'chin_locator9', 'parent': '../chin_parent'}, {'uv': [0.987737, 0.115828, 12.0], 'parent_type': 2, 'name': 'chin_locator10', 'parent': '../chin_parent'}, {'uv': [0.181759, 0.45131, 15.0], 'parent_type': 2, 'name': 'mouth_locator', 'parent': '../mouth_parent'}, {'uv': [0.462229, 0.534866, 15.0], 'parent_type': 2, 'name': 'mouth_locator1', 'parent': '../mouth_parent'}, {'uv': [0.610963, 0.51547, 15.0], 'parent_type': 2, 'name': 'mouth_locator2', 'parent': '../mouth_parent'}, {'uv': [0.843971, 0.508346, 15.0], 'parent_type': 2, 'name': 'mouth_locator3', 'parent': '../mouth_parent'}, {'uv': [0.033769, 0.40326, 16.0], 'parent_type': 2, 'name': 'nose_locator', 'parent': '../nose_parent'}, {'uv': [0.915025, 0.368776, 16.0], 'parent_type': 2, 'name': 'nose_locator1', 'parent': '../nose_parent'}, {'uv': [0.53242, 0.34866, 16.0], 'parent_type': 2, 'name': 'nose_locator2', 'parent': '../nose_parent'}, {'uv': [0.351828, 0.677213, 16.0], 'parent_type': 2, 'name': 'nose_locator3', 'parent': '../nose_parent'}, {'uv': [0.5658, 0.658187, 16.0], 'parent_type': 2, 'name': 'nose_locator4', 'parent': '../nose_parent'}, {'uv': [0.790077, 0.658838, 16.0], 'parent_type': 2, 'name': 'nose_locator5', 'parent': '../nose_parent'}, {'uv': [0.616308, 0.861862, 16.0], 'parent_type': 2, 'name': 'nose_locator6', 'parent': '../nose_parent'}, {'uv': [0.222927, 0.893854, 16.0], 'parent_type': 2, 'name': 'nose_locator7', 'parent': '../nose_parent'}, {'uv': [0.37066, 0.180727, 17.0], 'parent_type': 2, 'name': 'nose_locator8', 'parent': '../nose_parent'}, {'uv': [0.648641, 0.296112, 17.0], 'parent_type': 2, 'name': 'nose_locator9', 'parent': '../nose_parent'}, {'uv': [0.117124, 0.625655, 13.0], 'parent_type': 2, 'name': 'eyebrow_locator', 'parent': '../eyebrow_parent'}, {'uv': [0.882876, 0.625655, 18], 'parent_type': 2, 'name': 'mirror_eyebrow_locator', 'parent': '../mirror_eyebrow_parent'}, {'uv': [0.253719, 0.208083, 13.0], 'parent_type': 2, 'name': 'eyebrow_locator1', 'parent': '../eyebrow_parent'}, {'uv': [0.746281, 0.208083, 18], 'parent_type': 2, 'name': 'mirror_eyebrow_locator1', 'parent': '../mirror_eyebrow_parent'}, {'uv': [0.634258, 0.170416, 13.0], 'parent_type': 2, 'name': 'eyebrow_locator2', 'parent': '../eyebrow_parent'}, {'uv': [0.365742, 0.170416, 18], 'parent_type': 2, 'name': 'mirror_eyebrow_locator2', 'parent': '../mirror_eyebrow_parent'}, {'uv': [0.607345, 0.620179, 13.0], 'parent_type': 2, 'name': 'eyebrow_locator3', 'parent': '../eyebrow_parent'}, {'uv': [0.392655, 0.620179, 18], 'parent_type': 2, 'name': 'mirror_eyebrow_locator3', 'parent': '../mirror_eyebrow_parent'}, {'uv': [0.948892, 0.639509, 13.0], 'parent_type': 2, 'name': 'eyebrow_locator4', 'parent': '../eyebrow_parent'}, {'uv': [0.051108, 0.639509, 18], 'parent_type': 2, 'name': 'mirror_eyebrow_locator4', 'parent': '../mirror_eyebrow_parent'}, {'uv': [0.321951, 0.879189, 2.0], 'parent_type': 2, 'name': 'eyebrow_locator5', 'parent': '../eyebrow_parent'}, {'uv': [0.678049, 0.879189, 8], 'parent_type': 2, 'name': 'mirror_eyebrow_locator5', 'parent': '../mirror_eyebrow_parent'}, {'uv': [0.594052, 0.72498, 5.0], 'parent_type': 2, 'name': 'cheek_locator', 'parent': '../cheek_parent'}, {'uv': [0.405948, 0.72498, 11], 'parent_type': 2, 'name': 'mirror_cheek_locator', 'parent': '../mirror_cheek_parent'}, {'uv': [0.807541, 0.897094, 4.0], 'parent_type': 2, 'name': 'cheek_locator1', 'parent': '../cheek_parent'}, {'uv': [0.192459, 0.897094, 10], 'parent_type': 2, 'name': 'mirror_cheek_locator1', 'parent': '../mirror_cheek_parent'}, {'uv': [0.841666, 0.973351, 5.0], 'parent_type': 2, 'name': 'cheek_locator2', 'parent': '../cheek_parent'}, {'uv': [0.158334, 0.973351, 11], 'parent_type': 2, 'name': 'mirror_cheek_locator2', 'parent': '../mirror_cheek_parent'}, {'uv': [0.261972, 0.803768, 0.0], 'parent_type': 2, 'name': 'cheek_locator3', 'parent': '../cheek_parent'}, {'uv': [0.738028, 0.803768, 6], 'parent_type': 2, 'name': 'mirror_cheek_locator3', 'parent': '../mirror_cheek_parent'}, {'uv': [0.26165, 0.497365, 0.0], 'parent_type': 2, 'name': 'cheek_locator4', 'parent': '../cheek_parent'}, {'uv': [0.73835, 0.497365, 6], 'parent_type': 2, 'name': 'mirror_cheek_locator4', 'parent': '../mirror_cheek_parent'}, {'uv': [0.746941, 0.591669, 4.0], 'parent_type': 2, 'name': 'cheek_locator5', 'parent': '../cheek_parent'}, {'uv': [0.253059, 0.591669, 10], 'parent_type': 2, 'name': 'mirror_cheek_locator5', 'parent': '../mirror_cheek_parent'}, {'uv': [0.950921, 0.118652, 5.0], 'parent_type': 2, 'name': 'cheek_locator6', 'parent': '../cheek_parent'}, {'uv': [0.049079, 0.118652, 11], 'parent_type': 2, 'name': 'mirror_cheek_locator6', 'parent': '../mirror_cheek_parent'}], 'main_nodes': ['eyebrow_locator3', 'cheek_locator5', 'cheek_locator', 'eyebrow_locator4', 'cheek_locator6', 'cheek_locator1', 'eyebrow_locator5', 'eyebrow_locator', 'cheek_parent', 'cheek_locator2', 'eyebrow_locator1', 'eyebrow_parent', 'cheek_locator3', 'eyebrow_locator2', 'cheek_locator4'], 'parents': [{'uv': [0.2619, 0.803768, 0], 'name': 'cheek_parent'}, {'uv': [0.7381, 0.803768, 6], 'name': 'mirror_cheek_parent'}, {'uv': [0.575042, 0.713738, 13], 'name': 'eyebrow_parent'}, {'uv': [0.424958, 0.713738, 18], 'name': 'mirror_eyebrow_parent'}, {'uv': [0.5, 0.201079, 15], 'name': 'mouth_parent'}, {'uv': [0.5, 0.154209, 14], 'name': 'chin_parent'}, {'uv': [0.5, 0.519392, 16], 'name': 'nose_parent'}], 'mirror': {'mouth_side_parent': 'mirror_mouth_side_parent', 'eyebrow_locator4': 'mirror_eyebrow_locator4', 'eyebrow_locator5': 'mirror_eyebrow_locator5', 'eyebrow_locator2': 'mirror_eyebrow_locator2', 'eyebrow_locator3': 'mirror_eyebrow_locator3', 'eyebrow_locator1': 'mirror_eyebrow_locator1', 'mirror_cheek_locator2': 'cheek_locator2', 'mirror_cheek_locator3': 'cheek_locator3', 'mirror_cheek_locator1': 'cheek_locator1', 'mirror_cheek_locator6': 'cheek_locator6', 'mirror_cheek_locator4': 'cheek_locator4', 'mirror_cheek_locator5': 'cheek_locator5', 'mirror_eyebrow_locator5': 'eyebrow_locator5', 'mirror_eyebrow_locator4': 'eyebrow_locator4', 'mirror_eyebrow_locator1': 'eyebrow_locator1', 'mirror_eyebrow_locator3': 'eyebrow_locator3', 'mirror_eyebrow_locator2': 'eyebrow_locator2', 'mirror_eyebrow_locator': 'eyebrow_locator', 'mirror_cheek_locator': 'cheek_locator', 'eyebrow_parent': 'mirror_eyebrow_parent', 'cheek_locator': 'mirror_cheek_locator', 'mirror_eyebrow_parent': 'eyebrow_parent', 'mirror_cheek_parent': 'cheek_parent', 'cheek_parent': 'mirror_cheek_parent', 'eyebrow_locator': 'mirror_eyebrow_locator', 'cheek_locator5': 'mirror_cheek_locator5', 'cheek_locator4': 'mirror_cheek_locator4', 'cheek_locator6': 'mirror_cheek_locator6', 'cheek_locator1': 'mirror_cheek_locator1', 'cheek_locator3': 'mirror_cheek_locator3', 'cheek_locator2': 'mirror_cheek_locator2'}}]
PRESETS_MENU_ITEMS = [[0, 'None'], [1, '19 Locators'], [2, '51 Locators']]
PRESETS_PATH = 'C:/PROGRA~1/SIDEEF~1/HOUDIN~1.439/houdini/autorigs/presets'
addCustomParentToLocator(mirror=False)
addLocatorSlot()
addMirrorPair(node, mirror_node)
addParentToLocator(index, parent_type=2, mirror=False, parent_path='')
changeLocatorReferences(old_locator, new_locator, index)
clearGuides()
clearLocatorReferences(locator, index)
clearParentWidgets()
createCustomParent(uv=None, name='')
createLocatorAtIndex(idx, prim, uv, isMirror=False, name='', parent_type=None, parent_path='')

Create a locator at the specified index slot with the given prim and uv.

createLocatorListTab()
createLocatorPresets(index)
createMultiSurfaceLocators()

Creates multiple surface locators where the user clicks

createMultiSurfaceParents()
createNurbsParent(prim_id)
createParentListTab()
createParentWidget(parent, key)

Creates the ui parameters for a parent guide

createSurfaceLocator(index)

Creates a locator on the specified UV position of the surface.

deleteLocator(locator)
deleteNode(node)

Deletes a node and removes it from all data structures

fromJSON(json)
generateNurbsParents()

Once the user hits generate rig, generates the necessary NURBS parent controls

getLocator(index)
getLocatorList()
getLocatorParent(index)
getLocatorParentType(index)
getLocatorUVW(index)
getLocatorWidget(index)
getMirrorName(name)
getMirrorNode(node)
getParent(parent_key)
getParentWidgetKeyAtIndex(index)
getParentWidgets()
getRelativePath(node)
initializeAfterJson(json)
linkUvwParm(index, uvw_widget)
onWidgetCreated(index, item_widget)

Set up the callbacks when a new instance of UiParamLocatorWidget in the UiParamMultiParm is created

onWidgetDeleted(index, item_widget)

Do necessary cleanup work when a multiparm instance is deleted

path = 'C:/PROGRA~1/SIDEEF~1/HOUDIN~1.439/houdini/autorigs/presets/facepreset2.json'
popParentWidget(key)

Pops the parent widget referenced by key and deletes the parent guide

setConstraintsPath(locator, index)

Sets up the uv surface constraint for the locator

setLocatorReferences(locator, index)

Links the locator to a multiparm instance at index in the lpc character node

setMirrorLocatorExpressions(locator, mirror_locator)
setupUI()
shiftLocators(index)

Resets the labels and constraints of the locators/UiParamMultiParm instances that come after a locator that was inserted/deleted. i.e If a UiParamMultiParm instance is deleted at index 10 out of 20, then instances 11 to 20 will have to be reset with the correct label and linked parameters

toJSON()
toggleParentWidgetVisibility(index, widget)
toggleParmVisibility(toggle)
updateParent(index)

Module contents