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”]]
# class that defines a torso, with an FK and IK Ribbon rig
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.
buildFkSpine(textEdit, uiInst, builtRigs, networkNode)¶
Builds the FK spine rig.
buildHips(textEdit, uiInst, builtRigs, networkNode)¶
Builds the hip rig (body anim and hip anim controls)
buildIKSpine(textEdit, uiInst, builtRigs, networkNode)¶
Builds the IK spine rig.
The base class gets a buildRig function called from the buildProgressUI. This function has some pre/post functionality that labels new nodes created by the buildRigCustom method. Each derived class will need to have a buildRigCustom implemented. This method should call on any rig building functions for that module.
-each module should have its own settings group : self.name + “_settings” -each module should have something similar to the builtRigs list, which is a list that holds what rigs have been built (NOT, which are going to BE built, but the ones that already have)-this list looks something like this: [[“FK”, [nodesToHide]],[“IK”, [nodesToHide]]] -this is used when it’s time to setup the mode switching
Create the right-click menu for the module.
Parameters: point – Point on monitor to spawn the right-click menu.
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.
This method will change visiblity and parenting on joint movers in the module depending on whether there will be a pelvis or not.
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. :param state: (bool). Whether the module is pinned or not.
Override of base class method that will reset the rig controls to a default state (the creation state).
Parameters: resetAll – Whether or not to reset all of the rig controls in this module. Returns:
(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.
setupAutoSpine(textEdit, uiInst, builtRigs, networkNode, midDriver, midDriverTrans, topCtrl, botJnt)¶
Sets up auto-spine for the IK mid control.
Sets up custom pickwalking between rig 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.
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
Updates the joint mover in the scene based on the new number of spine bones that needs to be present. This method will record the joint mover positions, remove the joint mover, then import in the new file that corresponds to the new number of spine joints.
- attachedModules – Any modules that may be affected by this change
- oldNum – The old (current) number of spine bones