Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
blender-addons
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
blender
blender-addons
Commits
c406858e
Commit
c406858e
authored
13 years ago
by
Thomas Larsson
Browse files
Options
Downloads
Patches
Plain Diff
Mhx import: more compact material assignment.
parent
1c914a91
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
io_import_scene_mhx.py
+16
-4
16 additions, 4 deletions
io_import_scene_mhx.py
with
16 additions
and
4 deletions
io_import_scene_mhx.py
+
16
−
4
View file @
c406858e
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
"""
"""
Abstract
Abstract
MHX (MakeHuman eXchange format) importer for Blender 2.5x.
MHX (MakeHuman eXchange format) importer for Blender 2.5x.
Version 1.
5.2
Version 1.
6.0
This script should be distributed with Blender.
This script should be distributed with Blender.
If not, place it in the .blender/scripts/addons dir
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
...
@@ -39,7 +39,7 @@ Alternatively, run the script in the script editor (Alt-P), and access from the
bl_info
=
{
bl_info
=
{
'
name
'
:
'
Import: MakeHuman (.mhx)
'
,
'
name
'
:
'
Import: MakeHuman (.mhx)
'
,
'
author
'
:
'
Thomas Larsson
'
,
'
author
'
:
'
Thomas Larsson
'
,
'
version
'
:
(
1
,
5
,
2
),
'
version
'
:
(
1
,
6
,
0
),
"
blender
"
:
(
2
,
5
,
8
),
"
blender
"
:
(
2
,
5
,
8
),
"
api
"
:
37702
,
"
api
"
:
37702
,
'
location
'
:
"
File > Import > MakeHuman (.mhx)
"
,
'
location
'
:
"
File > Import > MakeHuman (.mhx)
"
,
...
@@ -51,8 +51,8 @@ bl_info = {
...
@@ -51,8 +51,8 @@ bl_info = {
'
category
'
:
'
Import-Export
'
}
'
category
'
:
'
Import-Export
'
}
MAJOR_VERSION
=
1
MAJOR_VERSION
=
1
MINOR_VERSION
=
5
MINOR_VERSION
=
6
SUB_VERSION
=
2
SUB_VERSION
=
0
BLENDER_VERSION
=
(
2
,
58
,
0
)
BLENDER_VERSION
=
(
2
,
58
,
0
)
#
#
...
@@ -1361,6 +1361,15 @@ def parseFaces2(tokens, me):
...
@@ -1361,6 +1361,15 @@ def parseFaces2(tokens, me):
f
.
material_index
=
int
(
val
[
0
])
f
.
material_index
=
int
(
val
[
0
])
f
.
use_smooth
=
int
(
val
[
1
])
f
.
use_smooth
=
int
(
val
[
1
])
n
+=
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
'
:
elif
key
==
'
mn
'
:
fn
=
int
(
val
[
0
])
fn
=
int
(
val
[
0
])
mn
=
int
(
val
[
1
])
mn
=
int
(
val
[
1
])
...
@@ -2696,6 +2705,9 @@ def rigifyMhx(context, name):
...
@@ -2696,6 +2705,9 @@ def rigifyMhx(context, name):
scn
.
objects
.
unlink
(
meta
)
scn
.
objects
.
unlink
(
meta
)
rigify
=
context
.
object
rigify
=
context
.
object
rigify
.
name
=
name
+
"
Rig
"
rigify
.
name
=
name
+
"
Rig
"
layers
=
20
*
[
False
]
layers
[
1
]
=
True
rigify
.
layers
=
layers
rigify
.
show_x_ray
=
True
rigify
.
show_x_ray
=
True
for
(
mesh
,
mod
)
in
meshes
:
for
(
mesh
,
mod
)
in
meshes
:
mod
.
object
=
rigify
mod
.
object
=
rigify
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment