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

Object.children should be tuple #130

Closed
Pyrolistical opened this issue Apr 10, 2023 · 2 comments
Closed

Object.children should be tuple #130

Pyrolistical opened this issue Apr 10, 2023 · 2 comments
Assignees

Comments

@Pyrolistical
Copy link

Pyrolistical commented Apr 10, 2023

System Information

  • OS: Windows 11 64-bit
  • Python: 3.10.11
  • Blender: 3.5

Expected behavior

bpy.types.Object.children should be iterable

From Blender console:

>>> type(bpy.data.objects['some object'])
<class 'bpy_types.Object'>

>>> type(bpy.data.objects['some object'].children)
<class 'tuple'>

Description about the bug

in fake-bpy-modules/bpy/types.py class Object defines children as:

children = None

Additional comments

I believe it should be Tuple[Object] as the workaround is to cast children

from typing import cast

for child in cast(tuple[Object], some_object.children):
@nutti nutti self-assigned this Jun 11, 2023
@nutti
Copy link
Owner

nutti commented Jun 11, 2023

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

@nutti
Copy link
Owner

nutti commented Jul 19, 2023

This issue is now solved.

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

No branches or pull requests

2 participants