Blender 2.56a import error

Tech support and suggestions forum. If you only have a basic question on how to get started, please use the "newbies" forum in the community section.

Moderator: joepal

Blender 2.56a import error

Postby Tindytim » Mon Jan 10, 2011 5:50 pm

I'm using Blender 2.56.0 R34231, and the makehuman build I got from the Arch User Repo, which reports the version as 1.0alpha5-2 (http://aur.archlinux.org/packages.php?ID=8387).

When I attempt to import an MHX file I've exported this is the error I get:
Code: Select all
Opening MHX file /home/tim/makehuman/exports/main-25.mhx
Tokenizing
clearScene 32 <bpy_struct, Scene("Scene")>
Parsing
Traceback (most recent call last):
  File "/home/tim/.blender-custom/blender/2.56/scripts/addons/io_import_scene_mhx.py", line 2444, in execute
    readMhxFile(self.properties.filepath, self.properties.scale)
  File "/home/tim/.blender-custom/blender/2.56/scripts/addons/io_import_scene_mhx.py", line 334, in readMhxFile
    parse(tokens)
  File "/home/tim/.blender-custom/blender/2.56/scripts/addons/io_import_scene_mhx.py", line 489, in parse
    data = parseDefaultType(key, val, sub)               
  File "/home/tim/.blender-custom/blender/2.56/scripts/addons/io_import_scene_mhx.py", line 504, in parseDefaultType
    expr = "bpy.data.%s.new('%s')" % (Plural[typ], name)
KeyError: 'if'

location:<unknown location>:-1

location:<unknown location>:-1


I'm using Arch Linux x64. Any help would be greatly appreciated!
Tindytim
 
Posts: 11
Joined: Sun Jul 20, 2008 4:33 am

Re: Blender 2.56a import error

Postby ThomasL » Tue Jan 11, 2011 9:56 am

It looks like you have an old mhx file; older than alpha 5.2 I think. Try download a nightly build from http://download.tuxfamily.org/makehuman/nightly/.
ThomasL
 
Posts: 1139
Joined: Tue Sep 15, 2009 2:46 am

Re: Blender 2.56a import error

Postby brkurt » Sat Jan 15, 2011 3:38 pm

I've got a truly interesting problem. I'm using Blender 2.56a from blender.org, and MH Nightly build 1778 in good old Ubuntu 9.04. After initializing the addon in Blender, but not using the 1778 python scripts, the import loads the Expressions shape keys, but not the LipSync. Is there a hotkey for the LipSync interface that isn't part of the Shape Key interface? If I use the 1778 scripts, I get a whole series of python warnings, and all that gets imported is the .obj portion, and the armature.

btw, my students--mostly female--love the 'Software Barbie' aspect of Makehuman. They truly enjoyed that lab. More on their comments later. :D
brkurt
 
Posts: 1100
Joined: Sun Feb 17, 2008 8:49 pm

Re: Blender 2.56a import error

Postby ThomasL » Sun Jan 16, 2011 4:46 am

This is a combination of two effects. The lipsync tool earlier than 1770 is not aware of the expressions. The mhx importer was changed in 1774 to work with a change in Blender's api. It works with Blender svn but not with 2.56a. Hence you need the updated lipsync tool, but not the updated mhx importer unless you also grab an updated Blender from graphicall.org.

The lipsync tool is implemented as a Blender add-on, but it is not yet distributed with Blender. The file view3d_mhx_lipsync.py must hence first be copied to Blender's addons folder, and the add-on must then be enabled as described in https://sites.google.com/site/makehumandocs/blender-export-and-mhx/copy-addon-to-blender and https://sites.google.com/site/makehumandocs/blender-export-and-mhx/enable-addon.
ThomasL
 
Posts: 1139
Joined: Tue Sep 15, 2009 2:46 am

Re: Blender 2.56a import error

Postby brkurt » Sun Jan 16, 2011 12:52 pm

Is the file space_view3d_mhx_lipsync.py that file? Given how fine-tuned this is, I'm thinking I'll need to know. :)
brkurt
 
Posts: 1100
Joined: Sun Feb 17, 2008 8:49 pm

Re: Blender 2.56a import error

Postby ThomasL » Mon Jan 17, 2011 4:24 pm

If the expressions are included in your mhx file (this is controlled in proxy.cfg), they can either be accessed directly as shapekeys, or from the UI panel if you run space_view3d_mhx_lipsync.py. I will write something about it, but not today.

Unfortunately, Blender has just changed how you define add-ons, so this file may not appear in the add-ons list even if it is in the addons directory. However, you can always execute it in the text editor.
ThomasL
 
Posts: 1139
Joined: Tue Sep 15, 2009 2:46 am

Re: Blender 2.56a import error

Postby Tindytim » Wed Feb 02, 2011 9:38 am

I compiled makehuman, created a couple test characters, but alas, Blender has decided to spit out yet another error:
Code: Select all
found bundled python: /home/tim/.blender-custom/blender/2.56/python
   bpy.utils.addon_enable io_import_scene_mhx
Load /home/tim/makehuman/exports/test-2-25.mhx
Found Blender (2, 56, 0)
Opening MHX file /home/tim/makehuman/exports/test-2-25.mhx
Tokenizing
clearScene 32 <bpy_struct, Scene("Scene")>
Parsing
Loading  /home/tim/Desktop/makehuman/data/textures/texture.tif  =  texture.tif
No file /home/tim/makehuman/exports/texture.tif
Found file /home/tim/Desktop/makehuman/data/textures/texture.tif
Image <bpy_struct, Image("texture.tif")>
<bpy_struct, Image("texture.tif")>
Loading  /home/tim/Desktop/makehuman/data/textures/texture_ref.tif  =  texture_ref.tif
No file /home/tim/makehuman/exports/texture_ref.tif
Found file /home/tim/Desktop/makehuman/data/textures/texture_ref.tif
Image <bpy_struct, Image("texture_ref.tif")>
<bpy_struct, Image("texture_ref.tif")>
<bpy_struct, ImageTexture("diffuse")>
<bpy_struct, ImageTexture("specularity")>
<bpy_struct, CloudsTexture("normals")>
Tdo mtex
['__doc__', '__module__', '__slots__', 'alpha_factor', 'ambient_factor', 'bl_rna', 'blend_type', 'bump_method', 'color', 'default_value', 'density_factor', 'diffuse_color_factor', 'diffuse_factor', 'displacement_factor', 'emission_color_factor', 'emission_factor', 'emit_factor', 'hardness_factor', 'invert', 'mapping', 'mapping_x', 'mapping_y', 'mapping_z', 'mirror_factor', 'name', 'normal_factor', 'normal_map_space', 'object', 'offset', 'output_node', 'raymir_factor', 'reflection_color_factor', 'reflection_factor', 'rna_type', 'scale', 'scattering_factor', 'specular_color_factor', 'specular_factor', 'texture', 'texture_coords', 'translucency_factor', 'transmission_color_factor', 'use', 'use_from_dupli', 'use_from_original', 'use_map_alpha', 'use_map_ambient', 'use_map_color_diffuse', 'use_map_color_emission', 'use_map_color_reflection', 'use_map_color_spec', 'use_map_color_transmission', 'use_map_density', 'use_map_diffuse', 'use_map_displacement', 'use_map_emission', 'use_map_emit', 'use_map_hardness', 'use_map_mirror', 'use_map_normal', 'use_map_raymir', 'use_map_reflect', 'use_map_scatter', 'use_map_specular', 'use_map_translucency', 'use_map_warp', 'use_rgb_to_intensity', 'use_stencil', 'uv_layer', 'warp_factor']
Traceback (most recent call last):
  File "/home/tim/.blender-custom/blender/2.56/scripts/addons/io_import_scene_mhx.py", line 2247, in defaultKey
    exec(expr, glbals, lcals)
  File "<string>", line 1, in <module>
AttributeError: 'MaterialTextureSlot' object has no attribute 'use_old_bump'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/tim/.blender-custom/blender/2.56/scripts/addons/io_import_scene_mhx.py", line 2444, in execute
    readMhxFile(self.properties.filepath, self.properties.scale)
  File "/home/tim/.blender-custom/blender/2.56/scripts/addons/io_import_scene_mhx.py", line 334, in readMhxFile
    parse(tokens)
  File "/home/tim/.blender-custom/blender/2.56/scripts/addons/io_import_scene_mhx.py", line 441, in parse
    data = parseMaterial(val, sub)
  File "/home/tim/.blender-custom/blender/2.56/scripts/addons/io_import_scene_mhx.py", line 788, in parseMaterial
    parseMTex(mat, val, sub)
  File "/home/tim/.blender-custom/blender/2.56/scripts/addons/io_import_scene_mhx.py", line 820, in parseMTex
    defaultKey(key, val, sub, "mtex", [], globals(), locals())
  File "/home/tim/.blender-custom/blender/2.56/scripts/addons/io_import_scene_mhx.py", line 2249, in defaultKey
    pushOnTodoList(var, expr, glbals, lcals)
  File "/home/tim/.blender-custom/blender/2.56/scripts/addons/io_import_scene_mhx.py", line 2260, in pushOnTodoList
    raise NameError("Todo", expr)
NameError: ('Todo', 'mtex.use_old_bump = True')

location:<unknown location>:-1

location:<unknown location>:-1


Any help? Same version of blender, I'm going to test out the version released on the site soon.

EDiT: Turns out, the binary from the blender.org site turns up no errors. I'm not sure if it's that I'm using a nightly revision, or if it's the fact that I compiled it with custom CFLAGS.
Tindytim
 
Posts: 11
Joined: Sun Jul 20, 2008 4:33 am

Re: Blender 2.56a import error

Postby ThomasL » Thu Feb 03, 2011 9:25 pm

Your mhx file is outdated. Export it again with an updated build and import it again. However, wait until tomorrow's nightly build because today's is broken.
ThomasL
 
Posts: 1139
Joined: Tue Sep 15, 2009 2:46 am


Return to Bugs, problems and feature requests

Who is online

Users browsing this forum: No registered users and 2 guests