Closed Pyrolistical closed 1 year ago
bpy.types.Object.children should be iterable
bpy.types.Object.children
From Blender console:
>>> type(bpy.data.objects['some object']) <class 'bpy_types.Object'> >>> type(bpy.data.objects['some object'].children) <class 'tuple'>
in fake-bpy-modules/bpy/types.py class Object defines children as:
class Object
children
children = None
I believe it should be Tuple[Object] as the workaround is to cast children
Tuple[Object]
from typing import cast for child in cast(tuple[Object], some_object.children):
This issue needs to be fixed by sending a patch to Blender itself. I have already submitted the PR. https://projects.blender.org/blender/blender/pulls/108852
This issue is now solved.
System Information
Expected behavior
bpy.types.Object.children
should be iterableFrom Blender console:
Description about the bug
in fake-bpy-modules/bpy/types.py
class Object
defineschildren
as:Additional comments
I believe it should be
Tuple[Object]
as the workaround is to cast children