diff options
author | Thomas Larsson <thomas_larsson_01@hotmail.com> | 2012-07-04 05:08:04 +0400 |
---|---|---|
committer | Thomas Larsson <thomas_larsson_01@hotmail.com> | 2012-07-04 05:08:04 +0400 |
commit | b55a9289d870bda47253ef274ab13b6089412d17 (patch) | |
tree | 2bcbb985ca8696fd10e7b8e5f3cb510ae5f72a08 | |
parent | 5092eeaaee1b532581c6eea4c0421fe42626998b (diff) |
MHX importer: Added panel for face shapes, when driven by properties.
-rw-r--r-- | io_import_scene_mhx.py | 29 |
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 ################################################################################### |