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>2012-07-04 05:08:04 +0400
committerThomas Larsson <thomas_larsson_01@hotmail.com>2012-07-04 05:08:04 +0400
commitb55a9289d870bda47253ef274ab13b6089412d17 (patch)
tree2bcbb985ca8696fd10e7b8e5f3cb510ae5f72a08 /io_import_scene_mhx.py
parent5092eeaaee1b532581c6eea4c0421fe42626998b (diff)
MHX importer: Added panel for face shapes, when driven by properties.
Diffstat (limited to 'io_import_scene_mhx.py')
-rw-r--r--io_import_scene_mhx.py29
1 files changed, 26 insertions, 3 deletions
diff --git a/io_import_scene_mhx.py b/io_import_scene_mhx.py
index 497d698d..928195eb 100644
--- a/io_import_scene_mhx.py
+++ b/io_import_scene_mhx.py
@@ -4143,6 +4143,9 @@ class MhxDriversPanel(bpy.types.Panel):
lProps = []
rProps = []
props = []
+ lFaceProps = []
+ rFaceProps = []
+ faceProps = []
plist = list(context.object.keys())
plist.sort()
for prop in plist:
@@ -4151,11 +4154,20 @@ class MhxDriversPanel(bpy.types.Panel):
else:
continue
if prop[-2:] == '_L':
- lProps.append((prop, prop1[:-2]))
+ if prop1[0] == '_':
+ lFaceProps.append((prop, prop1[1:-2]))
+ else:
+ lProps.append((prop, prop1[:-2]))
elif prop[-2:] == '_R':
- rProps.append((prop, prop1[:-2]))
+ if prop1[0] == '_':
+ rFaceProps.append((prop, prop1[1:-2]))
+ else:
+ rProps.append((prop, prop1[:-2]))
else:
- props.append((prop, prop1))
+ if prop1[0] == '_':
+ faceProps.append((prop, prop1[1:]))
+ else:
+ props.append((prop, prop1))
ob = context.object
layout = self.layout
for (prop, pname) in props:
@@ -4166,6 +4178,17 @@ class MhxDriversPanel(bpy.types.Panel):
layout.label("Right")
for (prop, pname) in rProps:
layout.prop(ob, '["%s"]' % prop, text=pname)
+ if faceProps:
+ layout.separator()
+ layout.label("Face shapes")
+ for (prop, pname) in faceProps:
+ layout.prop(ob, '["%s"]' % prop, text=pname)
+ layout.label("Left")
+ for (prop, pname) in lFaceProps:
+ layout.prop(ob, '["%s"]' % prop, text=pname)
+ layout.label("Right")
+ for (prop, pname) in rFaceProps:
+ layout.prop(ob, '["%s"]' % prop, text=pname)
return
###################################################################################