pKrime / brignet

Automatic rigging using neural network from RigNet
GNU General Public License v3.0
407 stars 39 forks source link

What should I run to get rigged .fbx file from python script using blender? #9

Closed kashyappiyush1998 closed 3 years ago

kashyappiyush1998 commented 3 years ago

I want to use blender inside my python code. I have generated a text file and I have the obj file for the mesh. What part of this code should I run to get rigged mesh as output.

pKrime commented 3 years ago

Hi,

you should be able to load your character from the load skeleton section of the bRigNet panel. If you want to use this operator inside a python script, these lines should do

wm = context.window_manager

wm.brignet_obj_path = "PATH_TO_YOUR_OBJ"
wm.brignet_skel_path = "PATH_TO_YOUR_TEXT_FILE"

bpy.ops.object.brignet_load()

cheers, p.