0

I want to convert hundreds of .bvh files into .fbx files with using the batch preference in the MotionBuilder but when I apply it it gives and error like "Character is not specified!" . How can I convert them with auto processing? Thank you for your help.

pidgeotto
  • 13
  • 3
  • Could you post the current script you're using? – UnknownOctopus Jul 27 '15 at 03:45
  • I don't use any scripts for this I just used the "Batch" preference in MotionBuilder but it doesn't working. Also it does not work with the following phyton script. FOR %%f IN (*.bvh) DO "C:\Program Files\Blender Foundation\Blender\blender.exe" -b --python "C:\Users\irem\Desktop\motionCapture\convert_fbx.py" -- "%%f" – pidgeotto Jul 27 '15 at 09:03
  • Post the contents of `convert_fbx.py` or upload it to pastebin/privatepaste and link it here because the error may be issued by that script. – wOxxOm Jul 27 '15 at 10:55

1 Answers1

1

You can do a similar task with Blender. Your mileage may vary, but you can call import BVH and export in FBX, through a python script, to automate the process

This is the call to open the BVH; you need to cd first in the location where the bvh file is. The filename goes in the "filepath" parameter between quotes

bpy.ops.import_anim.bvh(filepath="", filter_glob="*.bvh", global_scale=1, frame_start=1, use_fps_scale=False, use_cyclic=False, rotate_mode='NATIVE', axis_forward='-Z', axis_up='Y')

To export to FBX, the call is this; filepath hold the fbx output file

bpy.ops.export_scene.fbx(filepath="", axis_forward='-Z', axis_up='Y', use_anim=True, use_selection=True, use_default_take=False)

To call the script via Blender from console (windows):

<full path for blender.exe> -b -- python <full path to python script>

You can easily loop the call to parse all the files in a folder, so you can convert in one seat, all the bvh files in a folder