diff options
author | Thomas Larsson <thomas_larsson_01@hotmail.com> | 2011-08-01 13:05:55 +0400 |
---|---|---|
committer | Thomas Larsson <thomas_larsson_01@hotmail.com> | 2011-08-01 13:05:55 +0400 |
commit | b40f3249428fe2dd3b829d6249cef7b730a91a83 (patch) | |
tree | 15092e5c5018fe7c935a3bf0bcdea0bdb90d6c93 | |
parent | 4281300d70f0e064af60d0ab3f3a24051ae7adc9 (diff) |
Added switch for ignoring Limit rotation and distance constraints.
-rw-r--r-- | io_import_scene_mhx.py | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/io_import_scene_mhx.py b/io_import_scene_mhx.py index 2cb18c76..69a70587 100644 --- a/io_import_scene_mhx.py +++ b/io_import_scene_mhx.py @@ -26,7 +26,7 @@ """ Abstract MHX (MakeHuman eXchange format) importer for Blender 2.5x. -Version 1.6.0 +Version 1.6.1 This script should be distributed with Blender. If not, place it in the .blender/scripts/addons dir @@ -39,7 +39,7 @@ Alternatively, run the script in the script editor (Alt-P), and access from the bl_info = { 'name': 'Import: MakeHuman (.mhx)', 'author': 'Thomas Larsson', - 'version': (1, 6, 0), + 'version': (1, 6, 1), "blender": (2, 5, 8), "api": 37702, 'location': "File > Import > MakeHuman (.mhx)", @@ -52,7 +52,7 @@ bl_info = { MAJOR_VERSION = 1 MINOR_VERSION = 6 -SUB_VERSION = 0 +SUB_VERSION = 1 BLENDER_VERSION = (2, 58, 0) # @@ -99,7 +99,7 @@ todo = [] T_EnforceVersion = 0x01 T_Clothes = 0x02 T_Stretch = 0x04 -T_Bend = 0x08 +T_Limit = 0x08 T_Diamond = 0x10 T_Replace = 0x20 @@ -116,7 +116,7 @@ T_Opcns = 0x2000 T_Symm = 0x4000 toggle = (T_EnforceVersion + T_Replace + T_Mesh + T_Armature + - T_Face + T_Shape + T_Proxy + T_Clothes + T_Rigify) + T_Face + T_Shape + T_Proxy + T_Clothes + T_Rigify + T_Limit) # # Blender versions @@ -2033,6 +2033,9 @@ def correctRig(args): if cns.type == 'CHILD_OF': cnslist.append((pb, cns, cns.influence)) cns.influence = 0 + elif ((toggle & T_Limit == 0) and + (cns.type in ['LIMIT_DISTANCE', 'LIMIT_ROTATION'])): + cns.influence = 0 for (pb, cns, inf) in cnslist: amt.bones.active = pb.bone @@ -2092,6 +2095,8 @@ def deleteDiamonds(ob): # def parseProcess(args, tokens): + return + """ if toggle & T_Bend == 0: return try: @@ -2218,6 +2223,7 @@ def applyTransform(objects, rig, parents): bpy.ops.object.mode_set(mode='OBJECT') return + """ # # defaultKey(ext, args, tokens, var, exclude, glbals, lcals): @@ -2984,7 +2990,7 @@ MhxBoolProps = [ ("symm", "Symmetric shapes", "Keep shapekeys symmetric", T_Symm), ("diamond", "Diamonds", "Keep joint diamonds", T_Diamond), ("rigify", "Rigify", "Create rigify control rig", T_Rigify), - #("bend", "Bend joints", "Bend joints for better IK", T_Bend), + ("limit", "Limit constraints", "Keep limit constraints", T_Limit), ] class ImportMhx(bpy.types.Operator, ImportHelper): |