autorigs.utils.rigtoolutils package

Submodules

autorigs.utils.rigtoolutils.boneiktwisttool module

autorigs.utils.rigtoolutils.boneiktwisttool.invokeTool(kwargs)

autorigs.utils.rigtoolutils.boneiktwistuserinput module

autorigs.utils.rigtoolutils.boneiktwistuserinput.areNodesConnectedInOrder(nodes)

Returns whether the nodes are connected in order

autorigs.utils.rigtoolutils.boneiktwistuserinput.areNodesConnectedInOrderBackwards(nodes)

Returns whether the nodes are connected backwards in order

autorigs.utils.rigtoolutils.boneiktwistuserinput.checkUserInputError(inputlist)

Checks whether the bones are connected in order forwards or backwards

autorigs.utils.rigtoolutils.boneiktwistuserinput.getInputBoneTypeAndList()

User input to get selected bones

autorigs.utils.rigtoolutils.boneiktwistuserinput.getInputOneBone()

User input when one bone is selected

autorigs.utils.rigtoolutils.fkcontrols module

autorigs.utils.rigtoolutils.fkcontrols.createFKControls(prefix, startbone, endbone)

Creates FK controls for each bone from start bone to end bone with the name prefix + fkcontrol

autorigs.utils.rigtoolutils.fkikinterfacecontrol module

autorigs.utils.rigtoolutils.fkikinterfacecontrol.createIKFKInterface(netparent, parent, prefix, endaffectorpath='', twistaffectorpath='', startbonepath='', endbonepath='', kinsolverpath='')

Creates an interface for all ik / ik twist tools. The interface is an .hda file named autobonechaininterface.hda. The default values are set oncreate in the hda. The logic for doing IK->FK and FK->IK conversions are in the hdamodule in the hda. Hence, all we have to do here is set the initial values so the hda can grab these values and use them for the IK FK logic

autorigs.utils.rigtoolutils.ikbonestretch module

autorigs.utils.rigtoolutils.ikbonestretch.getPathStr(bone, node)
autorigs.utils.rigtoolutils.ikbonestretch.setStretchyBone(bone, startbone, endbone, endcontrol, interface)
autorigs.utils.rigtoolutils.ikbonestretch.setStretchyBones(interface, startbone, endbone, endcontrol)

autorigs.utils.rigtoolutils.iktwistcontrols module

autorigs.utils.rigtoolutils.iktwistcontrols.createControlsWithBones(user_choice, startbone, endbone, parent, netparent, prefix)

Given user_choice = 0 (ik control) or user_choice = 1 (ik twist control) adds the controls to the given bone chain. Assumes that endbone is in the same chain as the start_bone. The parent is the parent of the whole structure. The prefix is the prefix name. All postfix names can be found in iktwistnaming.py

autorigs.utils.rigtoolutils.iktwistcontrols.createIKControl(startbone, endbone, parent, netparent, prefix)

Creates a new chopnet and assigns the IK controls to all bones between start bone and end bone Assumes that startbone is parent and endbone is a child of the parent

autorigs.utils.rigtoolutils.iktwistcontrols.createIKWithTwistControl(startbone, endbone, parent, netparent, prefix)

Similar to createIKControl but also adds a twist affector

autorigs.utils.rigtoolutils.iktwistnaming module

Postfix names for different controls

autorigs.utils.rigtoolutils.iktwistnaming.createName(prefix, type)
autorigs.utils.rigtoolutils.iktwistnaming.createParm(type)
autorigs.utils.rigtoolutils.iktwistnaming.getInterfaceName(type)
autorigs.utils.rigtoolutils.iktwistnaming.getPostFix(type)

autorigs.utils.rigtoolutils.iktwistnetworkeditor module

autorigs.utils.rigtoolutils.iktwistnetworkeditor.hideAndOrganizeCreatedObjs(createdobjs)

Incoming parameters: startbone : startbone endbone : endbone root : created parent (of the entire creation) parent : created parent (of the bone) iksolver : created iksolver chopnet : created chopnet endhook : created endhook for endaffector twisthook : created twisthook for twistaffector endaffector : created endaffector twistaffector : created twistaffector selectedrootparent : true : if a root parent was selected, false if root was created ikortwist : 0 for ik, 1 for iktwist prefix : prefix specified by the user for naming netparent : parent to create the netbox in fkcontrols : list of (fkcontrol, fkcontrolinit)

autorigs.utils.rigtoolutils.iktwisttool module

autorigs.utils.rigtoolutils.iktwisttool.invokeTool(kwargs)

autorigs.utils.rigtoolutils.iktwistuserinput module

autorigs.utils.rigtoolutils.iktwistuserinput.checkErrors(parentinput, inputlist)
autorigs.utils.rigtoolutils.iktwistuserinput.getIKChoiceFromUser(kwargs)
autorigs.utils.rigtoolutils.iktwistuserinput.getInputList()
autorigs.utils.rigtoolutils.iktwistuserinput.getParentChoiceFromUser()
autorigs.utils.rigtoolutils.iktwistuserinput.getPrefixFromUser(kwargs)
autorigs.utils.rigtoolutils.iktwistuserinput.isOneBoneInput(inputlist)
autorigs.utils.rigtoolutils.iktwistuserinput.isStartEndBoneInput(inputlist)

autorigs.utils.rigtoolutils.randomnulls module

autorigs.utils.rigtoolutils.randomnulls.createNulls()

autorigs.utils.rigtoolutils.rigutils module

autorigs.utils.rigtoolutils.rigutils.buildBoneBetweenNulls(null0, null1, netparent, boneparent, name)

Given two nulls, creates a bone between the origins of the two nulls and adds boneparent as the parent of the newly created bone

autorigs.utils.rigtoolutils.rigutils.createNullAtEndOfBone(netparent, bone, name)

Creates a null at the end of the bone

autorigs.utils.rigtoolutils.rigutils.createNullAtNode(netparent, node, name)

Creates a null at the input node

autorigs.utils.rigtoolutils.rigutils.createNullHookForNode(netparent, node, name)

Creates a null parent for the node

autorigs.utils.rigtoolutils.rigutils.getAverageBoneChainLength(startbone, endbone)
autorigs.utils.rigtoolutils.rigutils.getFKControl(bone)
autorigs.utils.rigtoolutils.rigutils.getRandomColor(prevcolor=None)
autorigs.utils.rigtoolutils.rigutils.getTotalBoneChainLength(startbone, endbone)

Returns (totalbonelength, numberofbones) from start bone to end bone inclusive

autorigs.utils.rigtoolutils.rigutils.isChildConnectedToParent(child, parent)

Returns whether child is connected to parent Returns true if child is parent

autorigs.utils.rigtoolutils.rigutils.lockAllPivotParms(node, value=True)
autorigs.utils.rigtoolutils.rigutils.lockAllRotateParms(node, value=True)
autorigs.utils.rigtoolutils.rigutils.lockAllScaleParms(node, value=True)
autorigs.utils.rigtoolutils.rigutils.lockAllTranslateParms(node, value=True)
autorigs.utils.rigtoolutils.rigutils.numNodesFromChildToParent(child, parent)

Returns number of nodes from child to parent or until it reaches the end of the chain if child is not connected to parent

autorigs.utils.rigtoolutils.rigutils.setAllRestAngles(node, value)
autorigs.utils.rigtoolutils.rigutils.setAllRotateParms(node, value)
autorigs.utils.rigtoolutils.rigutils.setAllTranslateParms(node, value)
autorigs.utils.rigtoolutils.rigutils.setDisplayColor(node, color)
autorigs.utils.rigtoolutils.rigutils.setWireframeColorExpression(colorobj, refobj, refparm)

Sets the dcolorr/g/b of colorobj to be referenced to refobj/refparmrgb

Module contents