From c3514b0eb7fceb4b38e38ea512688da9e2e4c701 Mon Sep 17 00:00:00 2001 From: nutti Date: Sun, 11 Jun 2023 17:58:12 +0900 Subject: [PATCH] Docs: add data types of missing bpy.types.Object properties Pull Request: https://projects.blender.org/blender/blender/pulls/108852 --- scripts/modules/bpy_types.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/modules/bpy_types.py b/scripts/modules/bpy_types.py index ca62145dc87..9d67805a481 100644 --- a/scripts/modules/bpy_types.py +++ b/scripts/modules/bpy_types.py @@ -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