Wednesday, October 27, 2010

Working MHX importer in Blender 2.55 beta

Version 1.0 of the MHX importer is included in the upcoming beta release of Blender (2.55). Hopefully the days of copying the mhx import script to Blender's add-ons folder are gone now. To import mhx files, do the following:
1. File > User preferences
2. On the Add-Ons tab, Import/Export section, enable Import MakeHuman (.mhx).
3. File > Import > MakeHuman (.mhx)


Will this continue to work? Actually, when I tested today there was an error due to another api change. It could be easily fixed on the export side, so it will work with tomorrow's nightly build. Hopefully the days of api changes are over soon.

8 comments:

  1. First of all, many thanks for trying to keep the importer functional, through all the Blender 2.5 updates (I have my own set of 2.5 scripts and I am fully aware of the associated maintenance pains).

    Will this be compatible with mhx files exported from the MH alpha 5 (current release) or do we to use the MH nightly build?

    ReplyDelete
  2. It does not work with alpha 5. The mhx files themselves depend on the api, and thus don't survive Blender changes. The bug mentioned in the post was of this type.

    ReplyDelete
  3. I´ve got blender 2.55 e MH alpha 5, so, what is the fix for the bug?

    ReplyDelete
  4. Ok, I understand the value of not putting things up until they're compleately done, but I really think that this is too important an issue to put off. This fix needs to be in the stable version as soon as you can possibly get it in there. I honestly have no problem with waiting even a full month for any other development on this program if the darn export process was workable.

    ReplyDelete
  5. @ Joseph

    If you download the latest Nightly Build you shouldn't have any problem exporting from Makehuman to Blender 2.55.

    ReplyDelete
  6. The importer that comes with Blender 2.55 beta works with that version of Blender. If you are using a newer build from graphicall.org, you must copy the updated importer from importers/mhx/blender25x to Blender's addon folder first. The procedure, with some obvious modifications, was described in http://makehuman.blogspot.com/2010/08/problems-with-mhx-importer.html

    ReplyDelete
  7. using Blender 2.55 beta r33254 from graphicall on Windows Vista, I copied the io_import_scene_mhx.py from TODAYs MH-Download and still cannot import.

    The Blender-Console says:

    Load C:\Users\Reinhard\Documents\makehuman\exports\Eva-25.mhx
    Found Blender (2, 55, 0)
    Opening MHX file C:\Users\Reinhard\Documents\makehuman\exports\Eva-25.mhx
    Tokenizing
    clearScene 32
    Parsing
    Traceback (most recent call last):
    File "C:\PROGRA~1\Blender\2.55\scripts\addons\io_import_scene_mhx.py", line 24
    28, in execute
    readMhxFile(self.properties.filepath, self.properties.scale)
    File "C:\PROGRA~1\Blender\2.55\scripts\addons\io_import_scene_mhx.py", line 33
    0, in readMhxFile
    parse(tokens)
    File "C:\PROGRA~1\Blender\2.55\scripts\addons\io_import_scene_mhx.py", line 47
    5, in parse
    data = parseDefaultType(key, val, sub)
    File "C:\PROGRA~1\Blender\2.55\scripts\addons\io_import_scene_mhx.py", line 49
    0, in parseDefaultType
    expr = "bpy.data.%s.new('%s')" % (Plural[typ], name)
    KeyError: 'if'

    Thank you!

    ReplyDelete
  8. hi Thomas,
    I really would like you to join here:
    http://projects.blender.org/projects/bf-extensions/
    so I can give you access to our svn here:
    https://svn.blender.org/svnroot/bf-extensions/
    then you can upload & update the script & it will be in Blender svn builds correctly.
    The script will need to be maintained so it matches both Blender nighly & MH nighly builds.
    That way it will be as up to date as possible.
    All you will need to do is check out our svn & update the script as you make changes.
    Thanks.
    Brendon.

    ReplyDelete

© MHteam 2001-2010