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

Handle use of bpy.types.AnyType #1

Open
Mysteryem opened this issue Sep 24, 2022 · 1 comment
Open

Handle use of bpy.types.AnyType #1

Mysteryem opened this issue Sep 24, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@Mysteryem
Copy link
Owner

AnyType is used by functions that accept any Blender pointer type, since it only extends bpy_struct, PyCharm's type checking will complain whenever we're trying to normally use functions that have an AnyType parameter.

If AnyType is strictly a leftover from before bpy.type.bpy_struct was accessible then it could be replaced in all cases where it's used.

Another possibility might be inserting AnyType into the class hierarchy such that all pointer types (all bpy_struct types?) become subclasses of AnyType.

@Mysteryem Mysteryem added the enhancement New feature or request label Sep 24, 2022
@Mysteryem
Copy link
Owner Author

Another alternative: since AnyType declares no attributes, functions or properties (other than bl_rna), the class definitions for AnyType could be replaced with an alias of AnyType = bpy.types.bpy_struct. This would remove it as a distinct class from the documentation however, which might not be the best idea for documentation purposes.

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

No branches or pull requests

1 participant