diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2021-09-19 19:16:20 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2021-09-19 19:46:16 +0300 |
commit | ecf30de46c368ffddad259c125402a38e6093382 (patch) | |
tree | ed74dc70798c13130f20e01e0c9da91121ae3a4d /rigify/ui.py | |
parent | e7f22134350127ac18747c367bb0ad9a1ef2d8a3 (diff) |
Rigify: support executing an arbitrary script after generation.
Just in case the user wants to apply some custom changes to the
generated rig, allow executing a text datablock as a python script
after generation completes.
The script is executed with the generated rig active and in object
mode. When executed by rigify, the generator instance is available
via `rigify.get_generator()`. Outside of Rigify generation the return
value is None.
Diffstat (limited to 'rigify/ui.py')
-rw-r--r-- | rigify/ui.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/rigify/ui.py b/rigify/ui.py index 6ba455da..c9592677 100644 --- a/rigify/ui.py +++ b/rigify/ui.py @@ -177,6 +177,8 @@ class DATA_PT_rigify_buttons(bpy.types.Panel): if armature_id_store.rigify_generate_mode == 'new': row.enabled = False + col.prop(armature_id_store, "rigify_finalize_script", text="Run Script") + elif obj.mode == 'EDIT': # Build types list build_type_list(context, id_store.rigify_types) |