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.
This commit is contained in:
Campbell Barton 2022-04-19 12:17:23 +10:00
parent 76acc5e999
commit f401741544
1 changed files with 11 additions and 7 deletions

View File

@ -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