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

Installation with Blender 4.0.2 failed #51

Open ateranishi opened 7 months ago

ateranishi commented 7 months ago

Followed installation steps. ./blender -b -E CYCLES --python-expr "import bpycv,cv2;d=bpycv.render_data();bpycv.tree(d);cv2.imwrite('/tmp/try_bpycv_vis(inst-rgb-depth).jpg', d.vis()[...,::-1])" resulted with the following traceback;

Traceback (most recent call last): File "", line 1, in File "/home/art/Applications/blender-4.0.2-linux-x64/4.0/python/lib/python3.10/site-packages/bpycv/render_utils.py", line 118, in render_data with set_inst_material(), set_annotation_render(), withattr( File "/home/art/Applications/blender-4.0.2-linux-x64/4.0/python/lib/python3.10/site-packages/bpycv/render_utils.py", line 72, in init self.set_attrs(render.image_settings, attrs) File "/home/art/Applications/blender-4.0.2-linux-x64/4.0/python/lib/python3.10/site-packages/bpycv/statu_recover.py", line 50, in set_attrs self.set_attr(obj, attr, value) File "/home/art/Applications/blender-4.0.2-linux-x64/4.0/python/lib/python3.10/site-packages/bpycv/statu_recover.py", line 53, in set_attr self.obj_to_old_attr_value.append([(obj, attr), getattr(obj, attr)]) AttributeError: 'ImageFormatSettings' object has no attribute 'use_zbuffer'

DIYer22 commented 7 months ago

Thank you for your feedback. I learned about blender 4.0 and it seems that the changes are relatively big. I don’t have the time to make bpycv support blender 4.0 for the time being. If anyone is interested, please submit a PR.