carlosedubarreto / b3d_mocap_import

addon for blender to import mocap data from tools like easymocap, frankmocap and Vibe
106 stars 14 forks source link

UnboundLocalError: local variable 'ob' referenced before assignment #39

Closed eren-ture closed 6 months ago

eren-ture commented 8 months ago

Hi,

I am generating an smplfull folder from a monocular video using Easymocap and importing it to Blender, through this process:

When I try to import it, I get this error message:

Python: Traceback (most recent call last):
  File "C:\Users\erent\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\Mocap_PE_data_import\load_mocap.py", line 353, in execute
    ob, obname, arm_ob, cam_ob= init_scene(scene, params, obj_gender)
  File "C:\Users\erent\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\Mocap_PE_data_import\load_mocap.py", line 333, in init_scene
    ob.data.use_auto_smooth = False  # autosmooth creates artifacts
UnboundLocalError: local variable 'ob' referenced before assignment

I looked into the load_mocap.py file, and tried to declare the ob in all cases, but that didn't seem to help.

I am using:

carlosedubarreto commented 8 months ago

Hello @eren-ture , if you are using esymocap monocular, I would suggest you to go with the version that I did for blender called CEB Easymocap Monocular.

since it already have the data import in blender.

To be honest I actually dont use mocap import in a long time and I would take much longer to take a look, single I'm extemelly busy at the moment.

And to be even more honest, if you idea is to get an animation from a single camera, I'd suggest you to try CEB 4d Humans, I noticed that its results is much better than easymocap

and both have free versions that you could use.

rexainn commented 6 months ago

Same. Have you solved?

eren-ture commented 6 months ago

I couldn't, but just adding a "save blender file" or "export fbx" line at the end of convert2bvh.py on the EasyMoCap post-process scripts gives a good result.

rexainn commented 6 months ago

So there is official implementation of EasyMocap for exporting fbx files? Cool! I'll find it!