2 def __init__(self, bone):
4 self.name = self._bone.name
6 self.parent_name = None
8 self.parent_name = self._bone.parent.name
10 self.base = self._bone.head_local
13 def __init__(self, arm):
16 self.links = [Link(b) for b in self._armature.bones]
17 for i, l in enumerate(self.links):
20 links_by_name = dict((l.name, l) for l in self.links)
23 l.parent = links_by_name[l.parent_name]
31 sorted_links.append(l)
35 while p and p not in sorted_links:
38 sorted_links += reversed(chain)
39 self.links = sorted_links