0

I trying to combine two programs: MakeHuman 1.06 (http://www.makehuman.org/) and Blender 2.57 (http://www.blender.org/).

I have been using the script for importing MH to blender and it works perfectly.

As I have imported one person, I simply want to use the add-on (mocap tool) (whose source code is provided here http://code.google.com/p/makehuman/source/browse/trunk/makehuman/importers/mhx/blender25x/space_view3d_mhx_mocap.py )

and use the option Load, Retarget, Simplify to load my .bvh file.

Although, I can do it though the GUI, I can't find the write method/class to call, so that I could do it by script.

scn = bpy.context.scene

bpy.ops.mhx.mocap_load_retarget_simplify('INVOKE_DEFAULT', filepath = './cmuconvert-mb2-141-144/141/141_23.bvh')

but it doesn't seem to work...because of a warning

Warning - no scene - scene properties not set

Could you please help me.? I am quite stuck here:(

Hamish
  • 22,860
  • 8
  • 53
  • 67
Dimitra Micha
  • 2,089
  • 8
  • 27
  • 31
  • Rolled back the change - add it as a comment below and accept. That's the correct way to mark solved (it's ok to accept your own answers!) – Hamish Mar 07 '12 at 22:40

1 Answers1

0

You just need to set 'EXEC_DEFAULT'

bpy.ops.mhx.mocap_load_retarget_simplify('EXEC_DEFAULT', filepath = filepath)

Dimitra Micha
  • 2,089
  • 8
  • 27
  • 31