pygfx.objects.Bone

class pygfx.objects.Bone(name='')

Bases: WorldObject

A bone.

A bone is a part of a skeleton.The skeleton in turn is used by the SkinnedMesh. Bones are almost identical to a blank WorldObject.

property parent

Object’s parent in the scene graph (read-only). An object can have at most one parent.

add(*bones: Bone) Bone

Add child objects.

Any number of objects may be added. Any current parent on an object passed in here will be removed, since an object can have at most one parent. If before argument is given, then the items are inserted before the given element.

Parameters:
  • *objects (WorldObject) – The world objects to add as children.

  • before (WorldObject) – If not None, insert the objects before this child object.

  • keep_world_matrix (bool) – If True, the child will keep it’s world transform. It moves in the scene graph but will visually remain in the same place. If False, the child will keep it’s parent transform.

Examples

Skinned Mesh

Skinned Mesh