Converting bvh fles to fbx with batch

2.3k views Asked by At

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.

1

There are 1 answers

0
AudioBubble On BEST ANSWER

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