nutti / fake-bpy-module

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

Unresolved attribute references for Matrix class #93

Closed charlotte-green closed 2 years ago

charlotte-green commented 3 years ago
empty = bpy.data.objects.new("Empty", None)
empty.matrix_basis.identity()
empty.matrix_parent_inverse.identity()
rot = empty.matrix_world.to_quaternion()
mx = empty.matrix_world.inverted()
transform_mx = empty.matrix_world @ empty.matrix_world.inverted()

Because matrices type set to typing.List[float] instead of Matrix, the code above shows "Unresolved reference" warnings in PyCharm

nutti commented 3 years ago

@charlotte-green

Thanks. But I think this issue should be solved by fixing the Blender docs. https://docs.blender.org/api/current/bpy.types.Object.html#bpy.types.Object.matrix_world

I will send a patch in near future.

nutti commented 2 years ago

This is not blender issue. I fixed now this.