A rigger who knows Python code can modify the rig after it is built using 'PostScript'. 

The attachment has its own script editor with code highlight, pep8 errors, and many more features.


Using A Different Code Editor:

You can use a different code editor if you wish:

  1. Use your preferred code editor to write your code.
  2. Save the code in a Python file (.py).
  3. Tick the attachment 'Use File' checkbox attribute.
  4. Enter the path to the file in the 'Script file path' attribute.


Variables Passed to the PostScript:
The following variables can be utilized in your PostScript code. It is important to note that these variables are only accessible during the nodes build process and are not available when using the 'Execute All,' 'Execute Selected,' or 'Execute Current Line' buttons within the PostScript attachment UI.

  • node_name - (str) The name of the parent node to which this attachment belongs.
  • module_grp - (str) Parent node group's full name. E.g. '|rig_root_grp|modules_grp|<<node_name>>_grp'.
  • ctrls_list - (list) Contains the long names of all the ctrls associated with the node.
  • joints_list - (list) Contains the long names of all the joints associated with the node.
  • Additionally, it imports 'maya.cmds' as 'cmds' and as 'mc'.


PythonCodeEditor keyboard shortcuts

  • 'Ctrl + Shift + A' - New File.
  • 'Ctrl+ Shift + O' - Open File.
  • 'Ctrl + S' - Save.
  • 'Ctrl + Shift + S' - Save As.
  • 'Ctrl + G' - open Go To Line Window.
  • 'Ctrl + F' - open Find/Replace Window.
  • 'Ctrl + Shift + P' - Open Settings Window.
  • 'Ctrl + Shift + E' - Execute All. **
  • 'Ctrl + E' - Execute Selected. **
  • 'Ctrl + Alt + E' - Execute Current Line. **
  • 'Ctrl + Shift + H' - Open Quick Help For Maya Flags.


Editor Shortcuts:

  • 'Shift + Tab' - removes indentation from row start.
  • 'Ctrl + /' - comment out line.
  • 'Ctrl + L' - select line.
  • 'Ctrl + Shift + D' - duplicate line.
  • 'Ctrl + Shift + Arrow_Up' - move the line up one row.
  • 'Ctrl + Shift + Arrow_Down' - move the line down one row.
  • 'Ctrl + Spacebar '- open autocomplete.
  • 'Ctrl + [' - removes indentation from row start.
  • 'Ctrl + ]' - add indentation to row start.
  • 'Ctrl + Shift + {' - decrease font size.
  • 'Ctrl + Shift + }' - increase font size.
  • 'Keypad_Enter' - execute code. **


The 'PostScript' editor tries to provide as many features as a standard IDE:

  • 'Go-To Line' - Focus the view on a specific line number. 
  • 'Find/Replace' - Find and replace text in the editor. 
  • 'Insert SetAttr Code Snippet' - If you are new to scripting, you can change an attribute on a Maya node, such as changing the default 'IK_FK_Switch' attribute to FK (value=1), by manually changing it, then with the attribute selected click this button, this will add a line of code to set the 'IK_FK_Switch' attribute to 1 every time the node rebuilds.
  • 'Show Quick Help' - Opens a window to the right of the editor; any maya.cmds commands you enter into the top bar will display their flags below; double-clicking a flag will add that flag to the editor. 


Notes:

  • 'PostScript' cannot be used to reference scenes since referenced nodes cannot be deleted during cleanup.
  • You should only use 'PostScript' to modify Maya nodes that belong to the parent node of the attachment.
    If other Arise nodes are not being rebuilt, code that modifies Maya nodes belonging to those Arise nodes is likely to fail.



_____________________________________________

Get Arise at: https://www.ariserigging.com