Docs: add data types of missing bpy.types.Object properties

Pull Request: https://projects.blender.org/blender/blender/pulls/108852
This commit is contained in:
nutti
2023-06-11 17:58:12 +09:00
committed by Brecht Van Lommel
parent 61ead957a0
commit c3514b0eb7

View File

@@ -178,6 +178,8 @@ class Object(bpy_types.ID):
def children(self):
"""All the children of this object.
:type: tuple of `Object`
.. note:: Takes ``O(len(bpy.data.objects))`` time."""
import bpy
return tuple(child for child in bpy.data.objects
@@ -187,6 +189,8 @@ class Object(bpy_types.ID):
def children_recursive(self):
"""A list of all children from this object.
:type: tuple of `Object`
.. note:: Takes ``O(len(bpy.data.objects))`` time."""
import bpy
parent_child_map = {}
@@ -209,6 +213,8 @@ class Object(bpy_types.ID):
"""
The collections this object is in.
:type: tuple of `Collection`
.. note:: Takes ``O(len(bpy.data.collections) + len(bpy.data.scenes))`` time."""
import bpy
return (
@@ -225,6 +231,8 @@ class Object(bpy_types.ID):
def users_scene(self):
"""The scenes this object is in.
:type: tuple of `Scene`
.. note:: Takes ``O(len(bpy.data.scenes) * len(bpy.data.objects))`` time."""
import bpy
return tuple(scene for scene in bpy.data.scenes