[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [2770] trunk/py/scripts/addons/ io_import_scene_mhx.py: MHX importer: now deletes all helper geometry, not just diamonds.

Thomas Larsson thomas_larsson_01 at hotmail.com
Tue Dec 13 02:28:09 CET 2011


Revision: 2770
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=2770
Author:   thomasl
Date:     2011-12-13 01:28:02 +0000 (Tue, 13 Dec 2011)
Log Message:
-----------
MHX importer: now deletes all helper geometry, not just diamonds.

Modified Paths:
--------------
    trunk/py/scripts/addons/io_import_scene_mhx.py

Modified: trunk/py/scripts/addons/io_import_scene_mhx.py
===================================================================
--- trunk/py/scripts/addons/io_import_scene_mhx.py	2011-12-12 18:10:46 UTC (rev 2769)
+++ trunk/py/scripts/addons/io_import_scene_mhx.py	2011-12-13 01:28:02 UTC (rev 2770)
@@ -2053,19 +2053,20 @@
 #
 #    deleteDiamonds(ob)
 #    Delete joint diamonds in main mesh
+#    Invisio = material # 1
 #
 
 def deleteDiamonds(ob):
     bpy.context.scene.objects.active = ob
     if not bpy.context.object:
         return
-    print("Delete diamonds in %s" % bpy.context.object)
+    print("Delete helper geometry in %s" % bpy.context.object)
     bpy.ops.object.mode_set(mode='EDIT')
     bpy.ops.mesh.select_all(action='DESELECT')
     bpy.ops.object.mode_set(mode='OBJECT')
     me = ob.data
-    for f in me.faces:        
-        if len(f.vertices) < 4:
+    for f in me.faces:    
+        if f.material_index == 1:
             for vn in f.vertices:
                 me.vertices[vn].select = True
     bpy.ops.object.mode_set(mode='EDIT')
@@ -2852,7 +2853,7 @@
     ("face", "Face shapes", "Include facial shapekeys", T_Face),
     ("shape", "Body shapes", "Include body shapekeys", T_Shape),
     ("symm", "Symmetric shapes", "Keep shapekeys symmetric", T_Symm),
-    ("diamond", "Diamonds", "Keep joint diamonds", T_Diamond),
+    ("diamond", "Helper geometry", "Keep helper geometry", T_Diamond),
     ("rigify", "Rigify", "Create rigify control rig", T_Rigify),
 ]
 



More information about the Bf-extensions-cvs mailing list