ART_Torso

Author: Jeremy Ernst

File Attributes

  • 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”]]

    ../../_images/selectRigControls.png

Class

class RigModules.ART_Torso.ART_Torso(rigUiInst, moduleUserName)[source]

Bases: RigModules.Base.ART_RigModule.ART_RigModule

# class that defines a torso, with an FK and IK Ribbon rig

__init__(rigUiInst, moduleUserName)[source]

Initiate the class, taking in the instance to the interface and the user specified name.

Parameters:
  • 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
addAttributes()[source]

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.

addJointMoverToOutliner()[source]

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.

../../_images/outliner.png
aimMode_Setup(state)[source]

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.
applyModuleChanges(moduleInst)[source]
buildFkSpine(textEdit, uiInst, builtRigs, networkNode)[source]

Builds the FK spine rig.

buildHips(textEdit, uiInst, builtRigs, networkNode)[source]

Builds the hip rig (body anim and hip anim controls)

buildIKSpine(textEdit, uiInst, builtRigs, networkNode)[source]

Builds the IK spine rig.

buildRigCustom(textEdit, uiInst)[source]

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
createContextMenu(point)[source]

Create the right-click menu for the module.

Parameters:point – Point on monitor to spawn the right-click menu.
importFBX(importMethod, character)[source]

This method defines how mocap is imported onto the rig controls.

Parameters:
  • importMethod – Whether or not the FBX is getting imported as FK, IK, Both, or None
  • character – The namespace of the rig.
includePelvis(*args)[source]

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)[source]

Build the animation picker for the module.

Parameters:
  • center – the center of the QGraphicsScene
  • animUI – the instance of the AnimationUI
  • networkNode – the module’s network node
  • namespace – the namespace of the character
pinModule(state)[source]

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.

resetRigControls(resetAll)[source]

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:
resetSettings()[source]

(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.

selectRigControls(mode)[source]

(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)[source]

Sets up auto-spine for the IK mid control.

setupPickWalking()[source]

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
skeletonSettings_UI(name)[source]

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.

../../_images/skeletonSettings.png
skinProxyGeo()[source]

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)[source]

Switch the rig mode to FK or IK, matching the pose while switching if the checkbox is True.

Parameters:
  • mode – Which mode to switch to (FK, IK)
  • checkBox – The match checkbox (if True, match, then switch)
  • range – Whether to match/switch over range
updateOutliner()[source]

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

updateSettingsUI()[source]

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

updateSpine(attachedModules, oldNum)[source]

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.

Parameters:
  • attachedModules – Any modules that may be affected by this change
  • oldNum – The old (current) number of spine bones