diff options
author | Damien Picard <pioverfour> | 2019-05-09 13:20:23 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2019-05-09 13:30:38 +0300 |
commit | d814cec587f7842e6ea0bfcef06a158b2c6fbb2d (patch) | |
tree | f03a4ebeaacb5bd549a9d75f7283f6991cbedb67 | |
parent | 8865dab4b7c5eb134b5f008163283bc915c279c1 (diff) |
Rigify: fix encoding metarig.
The `Encode Metarig to Python` operator was broken as there was
some leftover code from the UI template system I made last year.
Differential Revision: https://developer.blender.org/D4827
-rw-r--r-- | rigify/utils/rig.py | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/rigify/utils/rig.py b/rigify/utils/rig.py index 638194e7..9aeb9e0f 100644 --- a/rigify/utils/rig.py +++ b/rigify/utils/rig.py @@ -272,22 +272,6 @@ def write_metarig(obj, layers=False, func_name="create", groups=False): code.append("\n arm.layers = [(x in " + str(active_layers) + ") for x in range(" + str(len(arm.layers)) + ")]") - if func_name == "create": - active_template = arm.rigify_active_template - template_name = arm.rigify_templates[active_template].name - code.append("\n # Select proper UI template") - code.append(" template_name = '{}'".format(template_name)) - code.append(" arm_templates = arm.rigify_templates.items()") - code.append(" template_index = None") - code.append(" for i, template in enumerate(arm_templates):") - code.append(" if template[0] == template_name:") - code.append(" template_index = i") - code.append(" break") - code.append(" if template_index is None:") - code.append(" template_index = 0 # Default to something...") - code.append(" else:") - code.append(" arm.rigify_active_template = template_index") - code.append('\nif __name__ == "__main__":') code.append(" " + func_name + "(bpy.context.active_object)\n") |