rigtoolutils package

Submodules

rigtoolutils.boneiktwisttool module

rigtoolutils.boneiktwisttool.invokeTool(kwargs)

rigtoolutils.boneiktwistuserinput module

rigtoolutils.boneiktwistuserinput.areNodesConnectedInOrder(nodes)

Returns whether the nodes are connected in order

rigtoolutils.boneiktwistuserinput.areNodesConnectedInOrderBackwards(nodes)

Returns whether the nodes are connected backwards in order

rigtoolutils.boneiktwistuserinput.checkUserInputError(inputlist)

Checks whether the bones are connected in order forwards or backwards

rigtoolutils.boneiktwistuserinput.getInputBoneTypeAndList()

User input to get selected bones

rigtoolutils.boneiktwistuserinput.getInputOneBone()

User input when one bone is selected

rigtoolutils.fkcontrols module

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

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

rigtoolutils.fkikinterfacecontrol module

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

rigtoolutils.ikbonestretch module

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

rigtoolutils.iktwistcontrols module

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

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

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

Similar to createIKControl but also adds a twist affector

rigtoolutils.iktwistnaming module

Postfix names for different controls

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

rigtoolutils.iktwistnetworkeditor module

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 fk controls

rigtoolutils.iktwisttool module

rigtoolutils.iktwisttool.invokeTool(kwargs)

rigtoolutils.iktwistuserinput module

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

rigtoolutils.randomnulls module

rigtoolutils.randomnulls.createNulls()

rigtoolutils.rigutils module

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

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

Creates a null at the end of the bone

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

Creates a null at the input node

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

Creates a null parent for the node

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

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

rigtoolutils.rigutils.isChildConnectedToParent(child, parent)

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

rigtoolutils.rigutils.lockAllPivotParms(node, value=True)
rigtoolutils.rigutils.lockAllRotateParms(node, value=True)
rigtoolutils.rigutils.lockAllScaleParms(node, value=True)
rigtoolutils.rigutils.lockAllTranslateParms(node, value=True)
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

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

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

Module contents