25
25
StructMetaPropGroup = bpy_types .bpy_struct_meta_idprop
26
26
# StructRNA = bpy_types.Struct
27
27
28
- bpy_types .BlendDataLibraries .load = _bpy ._library_load
29
- bpy_types .BlendDataLibraries .write = _bpy ._library_write
30
- bpy_types .BlendData .user_map = _bpy ._rna_id_collection_user_map
31
- bpy_types .BlendData .batch_remove = _bpy ._rna_id_collection_batch_remove
32
- bpy_types .BlendData .orphans_purge = _bpy ._rna_id_collection_orphans_purge
33
-
28
+ # Note that methods extended in C are defined in: 'bpy_rna_types_capi.c'
34
29
35
30
class Context (StructRNA ):
36
31
__slots__ = ()
@@ -118,14 +113,19 @@ class Object(bpy_types.ID):
118
113
119
114
@property
120
115
def children (self ):
121
- """All the children of this object. Warning: takes O(len(bpy.data.objects)) time."""
116
+ """All the children of this object.
117
+
118
+ .. note:: Takes ``O(len(bpy.data.objects))`` time."""
122
119
import bpy
123
120
return tuple (child for child in bpy .data .objects
124
121
if child .parent == self )
125
122
126
123
@property
127
124
def users_collection (self ):
128
- """The collections this object is in. Warning: takes O(len(bpy.data.collections) + len(bpy.data.scenes)) time."""
125
+ """
126
+ The collections this object is in.
127
+
128
+ .. note:: Takes ``O(len(bpy.data.collections) + len(bpy.data.scenes))`` time."""
129
129
import bpy
130
130
return (
131
131
tuple (
@@ -139,7 +139,9 @@ def users_collection(self):
139
139
140
140
@property
141
141
def users_scene (self ):
142
- """The scenes this object is in. Warning: takes O(len(bpy.data.scenes) * len(bpy.data.objects)) time."""
142
+ """The scenes this object is in.
143
+
144
+ .. note:: Takes ``O(len(bpy.data.scenes) * len(bpy.data.objects))`` time."""
143
145
import bpy
144
146
return tuple (scene for scene in bpy .data .scenes
145
147
if self in scene .objects [:])
@@ -292,12 +294,16 @@ def vector(self):
292
294
293
295
@property
294
296
def children (self ):
295
- """A list of all the bones children. Warning: takes O(len(bones)) time."""
297
+ """A list of all the bones children.
298
+
299
+ .. note:: Takes ``O(len(bones))`` time."""
296
300
return [child for child in self ._other_bones if child .parent == self ]
297
301
298
302
@property
299
303
def children_recursive (self ):
300
- """A list of all children from this bone. Warning: takes O(len(bones)**2) time."""
304
+ """A list of all children from this bone.
305
+
306
+ .. note:: Takes ``O(len(bones)**2)`` time."""
301
307
bones_children = []
302
308
for bone in self ._other_bones :
303
309
index = bone .parent_index (self )
@@ -314,7 +320,9 @@ def children_recursive_basename(self):
314
320
Returns a chain of children with the same base name as this bone.
315
321
Only direct chains are supported, forks caused by multiple children
316
322
with matching base names will terminate the function
317
- and not be returned. Warning: takes O(len(bones)**2) time.
323
+ and not be returned.
324
+
325
+ .. note:: Takes ``O(len(bones)**2)`` time.
318
326
"""
319
327
basename = self .basename
320
328
chain = []
@@ -1017,7 +1025,10 @@ class NodeSocket(StructRNA, metaclass=RNAMetaPropGroup):
1017
1025
1018
1026
@property
1019
1027
def links (self ):
1020
- """List of node links from or to this socket. Warning: takes O(len(nodetree.links)) time."""
1028
+ """
1029
+ List of node links from or to this socket.
1030
+
1031
+ .. note:: Takes ``O(len(nodetree.links))`` time."""
1021
1032
return tuple (
1022
1033
link for link in self .id_data .links
1023
1034
if (link .from_socket == self or
0 commit comments