Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImagePreviewCollection do not inherit from dict #351

Open
Andrej730 opened this issue Feb 26, 2025 · 0 comments
Open

ImagePreviewCollection do not inherit from dict #351

Andrej730 opened this issue Feb 26, 2025 · 0 comments

Comments

@Andrej730
Copy link
Contributor

Name: fake-bpy-module-latest
Version: 20250223

See example:

import bpy

icons = bpy.utils.previews.new()
# Cannot access attribute "get" for class "ImagePreviewCollection"
icons.get("test")
print(type(icons).__bases__)  # (<class 'dict'>,)

In the source code it's explicitly inheriting from dict https://projects.blender.org/blender/blender/src/commit/6365110312b657afae2ef3a90e32f38f3204b333/scripts/modules/bpy/utils/previews.py#L33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant