[Bf-extensions-cvs] [d814cec5] master: Rigify: fix encoding metarig.

Damien Picard noreply at git.blender.org
Thu May 9 12:30:55 CEST 2019


Commit: d814cec587f7842e6ea0bfcef06a158b2c6fbb2d
Author: Damien Picard
Date:   Thu May 9 13:20:23 2019 +0300
Branches: master
https://developer.blender.org/rBAd814cec587f7842e6ea0bfcef06a158b2c6fbb2d

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

===================================================================

M	rigify/utils/rig.py

===================================================================

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")



More information about the Bf-extensions-cvs mailing list