[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [2329] trunk/py/scripts/addons/ io_import_scene_mhx.py: MHX importer v 1.7.
Thomas Larsson
thomas_larsson_01 at hotmail.com
Sun Sep 18 14:34:22 CEST 2011
Revision: 2329
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=2329
Author: thomasl
Date: 2011-09-18 12:34:21 +0000 (Sun, 18 Sep 2011)
Log Message:
-----------
MHX importer v 1.7. Can now import property limits like min and max.
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-17 21:51:19 UTC (rev 2328)
+++ trunk/py/scripts/addons/io_import_scene_mhx.py 2011-09-18 12:34:21 UTC (rev 2329)
@@ -26,7 +26,7 @@
"""
Abstract
MHX (MakeHuman eXchange format) importer for Blender 2.5x.
-Version 1.6.1
+Version 1.7.0
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, 6, 1),
+ 'version': (1, 7, 0),
"blender": (2, 5, 8),
"api": 37702,
'location': "File > Import > MakeHuman (.mhx)",
@@ -51,8 +51,8 @@
'category': 'Import-Export'}
MAJOR_VERSION = 1
-MINOR_VERSION = 6
-SUB_VERSION = 1
+MINOR_VERSION = 7
+SUB_VERSION = 0
BLENDER_VERSION = (2, 58, 0)
#
@@ -404,11 +404,11 @@
"You can disable this error message by deselecting the \n" +
"Enforce version option when importing. \n" +
"Alternatively, you can try to download the most recent \n" +
-"nightly build from www.makehuman.org. \n" +
-"The current version of the import script is located in the \n" +
-"importers/mhx/blender25x folder and is called import_scene_mhx.py. \n" +
-"The version distributed with Blender builds from \n" +
-"www.graphicall.org may be out of date.\n"
+"Blender build from www.graphicall.org. \n" +
+"The most up-to-date version of the import script is distributed\n" +
+"with Blender, but can also be downloaded from MakeHuman. \n" +
+"It is located in the importers/mhx/blender25x \n" +
+"folder and is called import_scene_mhx.py. \n"
)
if toggle & T_EnforceVersion:
MyError(msg)
@@ -2229,18 +2229,36 @@
# defaultKey(ext, args, tokens, var, exclude, glbals, lcals):
#
+thePropTip = ""
+
def defaultKey(ext, args, tokens, var, exclude, glbals, lcals):
- global todo
+ global todo, thePropTip
if ext == 'Property':
+ thePropTip = ""
try:
- expr = "%s['%s'] = %s" % (var, args[0], args[1])
+ expr = '%s["%s"] = %s' % (var, args[0], args[1])
except:
expr = None
#print("Property", expr)
if expr:
exec(expr, glbals, lcals)
+ if len(args) > 2:
+ thePropTip = '"description":"%s"' % args[2].replace("_", " ")
return
+ elif ext == 'PropKeys':
+ if len(args) < 2:
+ values = '{%s}' % thePropTip
+ else:
+ values = '{%s%s}' % (args[1], thePropTip)
+ try:
+ expr = '%s["_RNA_UI"]["%s"] = %s' % (var, args[0], values)
+ except:
+ expr = None
+ #print("PropKeys", expr)
+ if expr:
+ exec(expr, glbals, lcals)
+ return
if ext == 'bpyops':
expr = "bpy.ops.%s" % args[0]
More information about the Bf-extensions-cvs
mailing list