Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Larsson <thomas_larsson_01@hotmail.com>2011-07-18 07:02:04 +0400
committerThomas Larsson <thomas_larsson_01@hotmail.com>2011-07-18 07:02:04 +0400
commitc406858e15028667e2e2a0e47ee3530eb6e65c45 (patch)
treeb4136757b34ff766ff4ba437c082aff5bb00e671
parent1c914a910167a5d9273c86e434b4774fb74bb3a2 (diff)
Mhx import: more compact material assignment.
-rw-r--r--io_import_scene_mhx.py20
1 files changed, 16 insertions, 4 deletions
diff --git a/io_import_scene_mhx.py b/io_import_scene_mhx.py
index 41088940..2cb18c76 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.5.2
+Version 1.6.0
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, 5, 2),
+ 'version': (1, 6, 0),
"blender": (2, 5, 8),
"api": 37702,
'location': "File > Import > MakeHuman (.mhx)",
@@ -51,8 +51,8 @@ bl_info = {
'category': 'Import-Export'}
MAJOR_VERSION = 1
-MINOR_VERSION = 5
-SUB_VERSION = 2
+MINOR_VERSION = 6
+SUB_VERSION = 0
BLENDER_VERSION = (2, 58, 0)
#
@@ -1361,6 +1361,15 @@ def parseFaces2(tokens, me):
f.material_index = int(val[0])
f.use_smooth = int(val[1])
n += 1
+ elif key == 'ftn':
+ mn = int(val[1])
+ us = int(val[2])
+ npts = int(val[0])
+ for i in range(npts):
+ f = me.faces[n]
+ f.material_index = mn
+ f.use_smooth = us
+ n += 1
elif key == 'mn':
fn = int(val[0])
mn = int(val[1])
@@ -2696,6 +2705,9 @@ def rigifyMhx(context, name):
scn.objects.unlink(meta)
rigify = context.object
rigify.name = name+"Rig"
+ layers = 20*[False]
+ layers[1] = True
+ rigify.layers = layers
rigify.show_x_ray = True
for (mesh, mod) in meshes:
mod.object = rigify