Closed Road-hog123 closed 3 weeks ago
@Road-hog123
Thanks for finding this issue.
Should we remove the bpy_types
module and replace bpy_types
to bpy.types
for all type annotations?
It is possible to import bpy_types
within Blender, so I'm not sure it should be removed.
There are a few classes that are unique to bpy_types
—as far as I can tell _GenericUI
is the only one that is used currently, but that may have been different in older versions or change in the future. Would it be possible for the generation code to do a set intersection or something to determine which classes should be redirected?
Fixed this issue.
I noticed while testing for #250 that
bl_ui.generic_ui_list.draw_ui_list()
'scontext
argument was sometimes typed asbpy_types.Context
and sometimes asbpy.types.Context
, and the change didn't seem to be consistent with the package version changes I was making.Testing again now, I generated 9 theoretically identical modules, each into a different directory, without making any changes, and three of them used
bpy_types
while the rest usedbpy.types
, with no other differences.I feel like the generated output should at least be consistent, it would make it easier to test if changes have unintended side effects.
Usage of
bpy_types
is limited tobl_ui
,bl_operators
andkeyingsets_builtins
—I have no experience with these parts of the API.