nutti / fake-bpy-module

Fake Blender Python API module collection for the code completion.
MIT License
1.35k stars 96 forks source link

bpy_prop_collection is missing `__len__` #120

Closed angavrilov closed 1 year ago

angavrilov commented 1 year ago

System Information

Description about the bug

The bpy_prop_collection class doesn't have a __len__ method, which causes PyCharm to complain about any uses of len(...) on collections. The actual collections in the blender python console have __len__ in dir. Manually editing the file to add __len__ fixes it.

Edit: the Matrix type also supports len in practice - it returns the matrix size, i.e. 3 for 3x3, 4 for 4x4.

nutti commented 1 year ago

This issue is now fixed.