ChrisWu1997 / 2D-Motion-Retargeting

PyTorch implementation for our paper Learning Character-Agnostic Motion for Motion Retargeting in 2D, SIGGRAPH 2019
https://motionretargeting2d.github.io
MIT License
444 stars 86 forks source link

Version of blender and bpy #27

Closed annopackage closed 3 years ago

annopackage commented 3 years ago

Hi, thanks for your great work. However, I want to know the version of blender api you used and could you provide the link to the corresponding pypi release link? Currently, the version of blender is v2.9.1. However, while running dataset/fbx2joint3d.py, it throws errors:


File "dataset/fbx2joints3d.py", line 202, in main() File "dataset/fbx2joints3d.py", line 124, in main set_homefile(HOME_FILE_PATH) File "dataset/fbx2joints3d.py", line 58, in set_homefile bpy.data.objects['Lamp'].data.energy = 2 KeyError: 'bpy_prop_collection[key]: key "Lamp" not found' Segmentation fault (core dumped)

ChrisWu1997 commented 3 years ago

Hi! The blender version we used is about 2.79 or 2.78. According to your posted errors, I think you can just delete this line bpy.data.objects['Lamp'].data.energy = 2 because just converting .fbx to .npy does not use object Lamp at all.

annopackage commented 3 years ago

Thanks for your quick reply. Similar error is also occurs:


bpy.data.worlds['World'].use_sky_blend = True # shaded / dynamic background for animations
bpy.data.worlds['World'].horizon_color = (1, 1, 1)
bpy.data.worlds['World'].zenith_color = (1, 1, 1)

Is use_sky_blender necessary in the script? I am new to blender and bpy scripts. Is there any tutorials which can help me find how to use the api?

Thanks in advance.

ChrisWu1997 commented 3 years ago

I think you can also remove this three lines. Those are for rendering. As for tutorial, you can refer to blender's official document https://docs.blender.org/api/current/info_quickstart.html. However, I don't feel it's well written. I feel it's better to search for blender scripts according to your purpose and learn from others' examples.

annopackage commented 3 years ago

Thanks for your reply. I will have a try.