[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [2363] trunk/py/scripts/addons/ io_import_scene_mhx.py: MHX importer: now assumes that driver properties begin with &, to filter out these in display.
Thomas Larsson
thomas_larsson_01 at hotmail.com
Tue Sep 27 17:17:20 CEST 2011
Revision: 2363
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=2363
Author: thomasl
Date: 2011-09-27 15:17:19 +0000 (Tue, 27 Sep 2011)
Log Message:
-----------
MHX importer: now assumes that driver properties begin with &, to filter out these in display.
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-09-27 04:09:03 UTC (rev 2362)
+++ trunk/py/scripts/addons/io_import_scene_mhx.py 2011-09-27 15:17:19 UTC (rev 2363)
@@ -26,7 +26,7 @@
"""
Abstract
MHX (MakeHuman eXchange format) importer for Blender 2.5x.
-Version 1.8.0
+Version 1.8.1
This script should be distributed with Blender.
If not, place it in the .blender/scripts/addons dir
@@ -39,7 +39,7 @@
bl_info = {
'name': 'Import: MakeHuman (.mhx)',
'author': 'Thomas Larsson',
- 'version': (1, 8, 0),
+ 'version': (1, 8, 1),
"blender": (2, 5, 9),
"api": 40335,
'location': "File > Import > MakeHuman (.mhx)",
@@ -52,7 +52,7 @@
MAJOR_VERSION = 1
MINOR_VERSION = 8
-SUB_VERSION = 0
+SUB_VERSION = 1
BLENDER_VERSION = (2, 59, 2)
#
@@ -3487,18 +3487,20 @@
plist = list(context.object.keys())
plist.sort()
for prop in plist:
+ if prop[0] == '&':
+ prop1 = prop[1:]
+ else:
+ continue
if prop[-2:] == '_L':
- lProps.append((prop, prop[:-2]))
+ lProps.append((prop, prop1[:-2]))
elif prop[-2:] == '_R':
- rProps.append((prop, prop[:-2]))
- elif prop[:3] == 'Mhx' or prop[0] == '_' or prop[0] == '*':
- pass
+ rProps.append((prop, prop1[:-2]))
else:
- props.append(prop)
+ props.append((prop, prop1))
ob = context.object
layout = self.layout
- for prop in props:
- layout.prop(ob, '["%s"]' % prop, text=prop)
+ for (prop, pname) in props:
+ layout.prop(ob, '["%s"]' % prop, text=pname)
layout.label("Left")
for (prop, pname) in lProps:
layout.prop(ob, '["%s"]' % prop, text=pname)
More information about the Bf-extensions-cvs
mailing list