Skip to content

Custom Scripts

General

Mansur-Rig contains the ability to append Python-scripts to it's automated process.
You can easily add custom Python scripts to Mansur-Rig's process in 4 key stages:

  1. Pre-Construction- The script will be run just before the rig construction is initiated.
  2. Post-Construction - The script will be run after the construction is finished.
  3. Pre-Deconstruction - The script will bb run before the rig is deconstructed.
  4. Post-Deconstruction- The script will be run after deconstruction is finished.


Inserting custom scripts into any Block-Rig is very easy, follow the guide below.

User-Guide

  1. First, open your Block-Rig's Rig-Settings by selecting your Rig-Top, and clicking the Module/Rig Settings in Block-Builder.
    Rig-Settings Button
  2. Then move to the Custom-Scripts Tab in the Rig-Settings dialog.
    Custom-Scripts Tab
  3. Then open the dropdown menu for the stage you want to add a custom-script to (you can add as many as you want, and at any combination of stages you choose.)
    Custom-Scripts Open Drop-Down Menu
  4. Then simply use the dialog options to add/remove custom scripts paths into the list.

    Note: the checkbox above the list named execPostCustruct.
    This checkbox is there for your convenience, in order to choose whether to execute the stage's cutom scripts inserted, or not.
    Notice this checkbox is OFF by default, make sure you turn it ON in order to execute this stage's inserted custom-scripts.
  5. Use the + button to choose a script path.
    In the opened dialog, navigate to your script path, and choose Open
    The path will be added to the dialog's list.
    Added Script

    Note: For ease of use, in case the path selected is within Maya's current Project-Set directory, a message dialog will be displayed, asking you wether you want to convert the selected path to a Relative-Path. In case you do so, the path will be converted to a relative path from your Project-Set directory onwards. That will mean that if any other artists opens this rig (in a team environment for example) opens this rig and sets his Maya-Project correctly, the script will be found regardless. Use this feature in case it fits your needs.
    Relative path convertion dialog
  6. Then simply check the execPostCunstruct to indicate you want to run your custom-scripts, and click Update-Settings at the bottom of the dialog.
    Execute checkbox
  7. Now once you construct/deconstruct your rig, the custom-scripts will be executed based on the stage you choose to insert them.
    You can add as many as you want, and at any stage, in any combination.