[Bf-extensions-cvs] [0121b3ff] master: skinify: update to new rigify

karab44 noreply at git.blender.org
Sun May 28 09:28:09 CEST 2017


Commit: 0121b3ff65bd3da484f244637829ad96457057ad
Author: karab44
Date:   Sun May 28 17:27:21 2017 +1000
Branches: master
https://developer.blender.org/rBA0121b3ff65bd3da484f244637829ad96457057ad

skinify: update to new rigify

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

M	object_skinify.py

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

diff --git a/object_skinify.py b/object_skinify.py
index 1c1bc29a..206fa55b 100644
--- a/object_skinify.py
+++ b/object_skinify.py
@@ -137,9 +137,11 @@ def generate_edges(mesh, shape_object, bones, scale, connect_mesh=False, connect
     rigify_ignore_list = []
     pitchipoy_ignore_list = ['face', 'breast', 'pelvis', 'nose', 'lip', 'jaw', 'chin', 'ear.', 'brow',
                             'lid', 'forehead', 'temple', 'cheek', 'teeth', 'tongue']
+    rigify_new_ignore_list = ['face', 'breast', 'pelvis', 'nose', 'lip', 'jaw', 'chin', 'ear.', 'brow',
+                             'lid', 'forehead', 'temple', 'cheek', 'teeth', 'tongue']
 
     alternate_scale_list = []
-    # rig_type rigify = 1, pitchipoy = 2
+    # rig_type rigify = 1, pitchipoy = 2, rigify_new = 3
     rig_type = 0
     me = mesh
     verts = []
@@ -158,6 +160,10 @@ def generate_edges(mesh, shape_object, bones, scale, connect_mesh=False, connect
             ignore_list = ignore_list + pitchipoy_ignore_list
             rig_type = 2
             break
+        if b.name == 'spine' and b.rigify_type == 'spines.super_spine':
+            ignore_list = ignore_list + rigify_new_ignore_list           
+            rig_type = 3            
+            break
 
     # edge generator loop
     for b in bones:
@@ -170,8 +176,7 @@ def generate_edges(mesh, shape_object, bones, scale, connect_mesh=False, connect
         found = False
 
         for i in ignore_list:
-            if i in b.name.lower():
-
+            if i in b.name.lower():              
                 found = True
                 break
 
@@ -184,9 +189,13 @@ def generate_edges(mesh, shape_object, bones, scale, connect_mesh=False, connect
                     
 
         # ignore any head ornaments
-        if head_ornaments is False:
+        if head_ornaments is False:     
             if b.parent is not None:
-                if 'head' in b.parent.name.lower():
+            
+                if 'head' in b.parent.name.lower() and not rig_type == 3:              
+                    continue
+                    
+                if 'face' in b.parent.name.lower() and rig_type == 3:         
                     continue
 
         if connect_parents:
@@ -219,7 +228,7 @@ def generate_edges(mesh, shape_object, bones, scale, connect_mesh=False, connect
             # for bvh free floating hips and hips correction for rigify and pitchipoy
             if ((generate_all is False and 'hip' in b.name.lower()) or
               (generate_all is False and (b.name == 'hips' and rig_type == 1) or
-              (b.name == 'spine' and rig_type == 2))):
+              (b.name == 'spine' and rig_type == 2) or (b.name == 'spine' and rig_type == 3))):
                 continue



More information about the Bf-extensions-cvs mailing list