diff options
author | Campbell Barton <campbell@blender.org> | 2022-04-19 05:17:23 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-04-19 05:18:53 +0300 |
commit | f4017415448fd38f879a2e4bbf7a9f0d85050f1e (patch) | |
tree | 156b4f053afc0237046fd28c9f112897bc2a2125 /release | |
parent | 76acc5e9992e3bc554dac678bf40be1d285a81e8 (diff) |
PyDoc: remove multiple `children` properties for Bone type
This doesn't cause any functional change as the RNA property
of Bone wasn't overridden by the _GenericBone's property,
however the `children` property was documented twice, causing a warning.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/modules/bpy_types.py | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py index be60a1711aa..b3f0c055769 100644 --- a/release/scripts/modules/bpy_types.py +++ b/release/scripts/modules/bpy_types.py @@ -371,13 +371,8 @@ class _GenericBone: """ return (self.tail - self.head) - @property - def children(self): - """A list of all the bones children. - - .. note:: Takes ``O(len(bones))`` time.""" - return [child for child in self._other_bones if child.parent == self] - + # NOTE: each bone type is responsible for implementing `children`. + # This is done since `Bone` has direct access to this data in RNA. @property def children_recursive(self): """A list of all children from this bone. @@ -457,10 +452,19 @@ class PoseBone(StructRNA, _GenericBone, metaclass=StructMetaPropGroup): class Bone(StructRNA, _GenericBone, metaclass=StructMetaPropGroup): __slots__ = () + # NOTE: `children` is implemented in RNA. + class EditBone(StructRNA, _GenericBone, metaclass=StructMetaPropGroup): __slots__ = () + @property + def children(self): + """A list of all the bones children. + + .. note:: Takes ``O(len(bones))`` time.""" + return [child for child in self._other_bones if child.parent == self] + def align_orientation(self, other): """ Align this bone to another by moving its tail and settings its roll |