From a8f3a26c7de25c3320a93a7de7c8acc22fef8923 Mon Sep 17 00:00:00 2001
From: Alexander Gavrilov <angavrilov@gmail.com>
Date: Wed, 6 Nov 2019 19:02:05 +0300
Subject: [PATCH] Rigify: fix a 2.80 API update bug in
 experimental.super_chain.

---
 rigify/rigs/experimental/super_chain.py | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/rigify/rigs/experimental/super_chain.py b/rigify/rigs/experimental/super_chain.py
index 9c34478d8..df0facdfe 100644
--- a/rigify/rigs/experimental/super_chain.py
+++ b/rigify/rigs/experimental/super_chain.py
@@ -470,14 +470,15 @@ class Rig:
         mch_start = pb[bones['chain']['mch'][0]]
         mch_end = pb[bones['chain']['mch_ctrl'][-1]] if bones['chain']['mch_ctrl'] else pb[bones['chain']['mch'][-1]]
 
-        if 'bbone_custom_handle_start' in dir(def_pb) and 'bbone_custom_handle_end' in dir(def_pb):
-            if not self.SINGLE_BONE:
-                def_pb.bbone_custom_handle_start = ctrl_start
-                def_pb.bbone_custom_handle_end = ctrl_end
-            else:
-                def_pb.bbone_custom_handle_start = mch_start
-                def_pb.bbone_custom_handle_end = mch_end
-            def_pb.use_bbone_custom_handles = True
+        if not self.SINGLE_BONE:
+            def_pb.bone.bbone_custom_handle_start = ctrl_start.bone
+            def_pb.bone.bbone_custom_handle_end = ctrl_end.bone
+        else:
+            def_pb.bone.bbone_custom_handle_start = mch_start.bone
+            def_pb.bone.bbone_custom_handle_end = mch_end.bone
+
+        def_pb.bone.bbone_handle_type_start = 'ABSOLUTE'
+        def_pb.bone.bbone_handle_type_end = 'ABSOLUTE'
 
     def create_drivers(self, bones):
         bpy.ops.object.mode_set(mode='OBJECT')
@@ -645,7 +646,7 @@ class Rig:
         self.parent_bones(bones)
 
         # ctrls snapping pass
-        self.aggregate_ctrls(bones)
+        #self.aggregate_ctrls(bones)
 
         self.constrain_bones(bones)
         self.stick_to_bendy_bones(bones)
@@ -757,8 +758,8 @@ def parameters_ui(layout, params):
     r = layout.row()
     r.prop(params, 'def_parenting')
 
-    r = layout.row()
-    r.prop(params, 'cluster_ctrls')
+    #r = layout.row()
+    #r.prop(params, 'cluster_ctrls')
 
     ControlLayersOption.TWEAK.parameters_ui(layout, params)
 
-- 
GitLab