DIYer22 / bpycv

Computer vision utils for Blender (generate instance annoatation, depth and 6D pose by one line code)
MIT License
464 stars 58 forks source link

How to replace primitives with my own objs in demo.py? #22

Closed BostonLobster closed 2 years ago

BostonLobster commented 2 years ago

I have a bunch of obj files, and as the tile says, I want to replace the bpy.ops.mesh.primitive_cube_add with my own obj files.

I didn't refer to ycb_demo.py because my obj files are very simple just like the primitives in demo_vis. They only contain vertices and faces, and with no materials.

How can I achieve this?

DIYer22 commented 2 years ago

If your obj is 3D file like .obj or .ply, using obj = bpycv.load_obj(model_path).

BostonLobster commented 2 years ago

I have got it done. Thanks for your reply!