Author: Jeremy Ernst
icon: This is the image file (125x75 .png) that gets used in the RigCreatorUI
hoverIcon: When you hover over the module in the module list, it will swap to this icon (background changes to orange). There are .psd template files for these.
search: These are search terms that are accepted when searching the list of modules in the RigCreatorUI
class name: The name of the class.
jointMover: The relative path to the joint mover file. Relative to the ARTv2 root directory.
baseName: The default name the module will get created with. Users can then add a prefix and/or suffix to the base name.
rigs: This is a simple list of what rigs this module can build. This feature isn’t implemented yet, but the plan is to query this list and present these options to the user for them to select what rigs they want to build for the module. Right now, it will build all rigs.
fbxImport: This is a list that will show the options for the module in the import mocap interface. Normally, this list will have at least None and FK.
matchData: This is a list of options that will be presented for the module in a comboBox in the match over frame range interface. First argument is a bool as to whether the module can or can’t match. The second arg is a list of strings to display for the match options. For example: matchData = [True, [“Match FK to IK”, “Match IK to FK”]]
This class creates the arm module that builds an arm rig similar to ARTv1
Initiate the class, taking in the instance to the interface and the user specified name.
- rigUiInst – This is the rig creator interface instance being passed in.
- moduleUserName – This is the name specified by the user on module creation.
- Instantiate the following class variables as well:
- self.rigUiInst: take the passed in interface instance and make it a class var
- self.moduleUserName: take the passed in moduleUserName and make it a class var
- self.outlinerWidget: an empty list that will hold all of the widgets added to the outliner
Add custom attributes this module needs to the network node. (AKA metadata)
Always calls on base class function first, then extends with any attributes unique to the class.
Add the joint movers for this module to the outliner. (called from ART_AddModuleUI)
Depending on the module settings, different joint movers may or may not be added. Also, each “joint” usually has three movers: global, offset, and geo. However, not all joints do, so this method is also used to specify which joint movers for each joint are added to the outliner.
Sets up (or removes the setup) of aim mode for the joint mover rig. This ensures the parent always aims at the child mover.
Parameters: state – (bool). Whether to setup or tear down aim mode.
Update the scene after the settings are changed in the skeleton settings UI.
This means also updating the created_bones attr, updating the joint mover if needed, updating the outliner, and updating the bone count.
Parameters: moduleInst – self (usually, but there are cases like templates where an inst on disc is passed in.)
buildClavicleRig(textEdit, uiInst, builtRigs, networkNode)¶
buildFingers(fingers, textEdit, uiInst, builtRigs, networkNode)¶
Builds the FK/IK finger rigs and sets up hand roll.
- fingers – fingers to build rigs for.
- textEdit – textEdit widget to write progress to
- builtRigs – how many rigs have been built.
- networkNode – module network node
buildFkArm(textEdit, uiInst, builtRigs, networkNode)¶
buildIkArm(textEdit, uiInst, builtRigs, networkNode)¶
Import the given joint mover file for the side requested (from network node). For the Arm, there are 2 joint mover files: Left and Right. This will change the movers to the opposite side.
Co-planar mode is a tool for the joint mover rig that snaps the movers to a rotate plane so that the chain is built ideally for an IK setup.
This method defines how mocap is imported onto the rig controls.
- importMethod – Whether or not the FBX is getting imported as FK, IK, Both, or None
- character – The namespace of the rig.
Set visibility and parenting on the joint movers depending on whether the include clavicle checkbox is true or false.
pickerUI(center, animUI, networkNode, namespace)¶
Build the animation picker for the module.
- center – the center of the QGraphicsScene
- animUI – the instance of the AnimationUI
- networkNode – the module’s network node
- namespace – the namespace of the character
Pins the module in place (joint movers), so that the parent module no longer affects it.
Parameters: state – (bool). Whether the module is pinned or not.
(OVERRIDE OF BASE CLASS!) Reset the settings of the module’s network node.
This function is used in the right-click menu of the module on the skeleton settings interface. Occasionally, it is called outside of the menu.
After settings are reset, applyModuleChanges is called to update the joint mover in the scene with the latest values. updateSettingsUI is also called to update the outliner.
(BASE CLASS OVERRIDE!) This method calls on getControls to return a list of the controls and the selects them.
Sets up custom pickwalking between rig controls.
Current limitations: IK fingers are not setup to work with pickwalking as I don’t assume they’ll get much use. If they need pickwalking in the future, it can be added.
Also, twist controls can not currently be pick-walked to from IK controls.
Returns: returns list of top level controls of the module that will need hooks to their parent controls
This is the UI for the module that has all of the configuration settings.
Parameters: name – user given name of module (prefix + base_name + suffix)
Build the groupBox that contains all of the settings for this module. Parent the groupBox into the main skeletonSettingsUI layout. Lastly, call on updateSettingsUI to populate the UI based off of the network node values.
Skin the proxy geo brought in by the module. Each module has to define how it wants to skin its proxy geo.
switchClavMode(mode, checkBox, range=False)¶
Switches the rig mode on the clavicle (FK/IK). If checkbox value is True, match then switch.
- mode – The mode to switch to (FK/IK)
- checkBox – The match checkbox to query its value
- range – Whether or not to match and switch over frame range.
switchFingerMode(mode, finger, range=False)¶
Switch the rig mode on the finger to FK or IK, matching the pose of the current mode.
- mode – Which mode to switch to (FK, IK)
- finger – which finger to operate on
- range – Whether or not to switch/match over a range
switchMode(mode, checkBox, range=False)¶
Switch the rig mode to FK or IK, matching the pose while switching if the checkbox is True.
- mode – Which mode to switch to (FK, IK)
- checkBox – The match checkbox (if True, match, then switch)
- range – Whether to match/switch over range
Whenever changes are made to the module settings, update the outliner (in the rig creator) to show the new or removed movers. Tied to skeletonSettingsUI
Updates the skeleton settings UI based on the network node values for this module. Happens when the UI is launched and there are module metadata present