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 head module
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
Also, read the QSettings to find out where needed paths are.
Add custom attributes this module needs to the network node.
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.
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, running self.updateNeck, 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.)
Build the rigs for this module.
This method defines what rigs are built and how they are built when the asset is published. It posts any build info to the passed in textEdit.
- textEdit – passed in text edit that the rig build can post updates to
- uiInst – passed in instance of the buildProgressUI
Create the right-click menu for the module.
Parameters: point – Point on monitor to spawn the right-click menu.
- Default menu actions created:
- Copy Settings
- Paste Settings
- Reset Settings
- Delete Module
Import FBX motion onto this module’s rig controls.
- importMethod – The import method to be used (options defined in the file attributes)
- character – the namespace of the character
Each module has to define what import methods it offers (at the very top of the module file) and then define how motion is imported using those methods.
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
Pin the module in place so the parent does not move the module. Each module has to define how it needs to be pinned.
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.
- name – user given name of module (prefix + base_name + suffix)
- width – width of the skeleton settings groupBox. 335 usually
- height – height of the skeleton settings groupBox.
- checkable – Whether or not the groupBox can be collapsed.
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.
Toggle the state of the Apply Changes button.
Take the number of neck bones value and rebuild the joint mover.
The head module has 3 joint mover files, 1 for each possible neck number. When the number of neck bones is changed, the current module has its information stored (placement, etc), the module is then deleted, the new joint mover path is constructed and brought in, and lastly it resolves any dependency issues. (Like if there was a leaf joint as a child of a neck bone that no longer exists)
- attachedModules – self.checkForDependencies()
- oldNum – the existing amount of neck bones prior to the update
Whenever changes are made to the module settings, update the outliner to show the new or removed movers
Update the skeleton settings UI based on the network node values for this module.