[Bf-docboard-svn] bf-manual: [8400] trunk/blender_docs/manual/addons/rigging/rigify/basics.rst: Rigify: document the option to run a custom post-generate script.

Alexander Gavrilov noreply at blender.org
Sun Sep 19 19:20:43 CEST 2021


Revision: 8400
          https://developer.blender.org/rBM8400
Author:   angavrilov
Date:     2021-09-19 19:20:42 +0200 (Sun, 19 Sep 2021)
Log Message:
-----------
Rigify: document the option to run a custom post-generate script.

Ref rBAecf30de46c368ff

Modified Paths:
--------------
    trunk/blender_docs/manual/addons/rigging/rigify/basics.rst

Modified: trunk/blender_docs/manual/addons/rigging/rigify/basics.rst
===================================================================
--- trunk/blender_docs/manual/addons/rigging/rigify/basics.rst	2021-09-16 16:50:10 UTC (rev 8399)
+++ trunk/blender_docs/manual/addons/rigging/rigify/basics.rst	2021-09-19 17:20:42 UTC (rev 8400)
@@ -160,6 +160,7 @@
 - Generate more than one rig per scene.
 - Generate a rig with a specific name.
 - Update/Overwrite a specific rig.
+- Execute a script datablock after generation.
 
 
 Advanced Options Activation
@@ -200,6 +201,27 @@
 a Python script named ``rig_ui.py``.
 
 
+Run Script
+^^^^^^^^^^
+
+It is possible to configure Rigify to execute a python script contained in a text datablock
+after generation in order to apply user-defined customizations.
+
+The simplest use of this may be adjusting properties of generated constraints when Rigify rig types
+don't have any relevant metarig settings. That can be done simply by using the *Copy Full Data Path*
+context menu option on the property, pasting it into the script and making an assignment, e.g.::
+
+   import bpy
+
+   bpy.data.objects["rig"].pose.bones["MCH-spine.003"].constraints[0].influence = 0.6
+
+Doing such changes via a script would ensure they aren't lost if the rig is re-generated.
+
+Users familiar with Rigify scripting can import Rigify utility modules, and access the generator
+instance through ``rigify.get_generator()``; note however that since generation is already
+finished, the only use of that is reading data created in the generation process.
+
+
 Library Linking
 ===============
 



More information about the Bf-docboard-svn mailing list