Skip to content

KX_BatchGroup

Base class: EXP_Value

The batch group is class containing a mesh resulting of the merging of meshes used by objects. The meshes are merged with the transformation of the objects using it. An instance of this class is not owned by one object but shared between objects. In consideration an instance of KX_BatchGroup have to instanced with as argument a list of at least one object containing the meshes to merge. This can be done in a way similar to:

import Range
scene = Range.logic.getCurrentScene()
batchGroup = types.KX_BatchGroup([scene.objects["Cube"], scene.objects["Plane"]])

The list of the objects merged. (read only)

Type: EXP_ListValue of KX_GameObject

The object used for object rendering settings (layer, color…).

Merge meshes using the transformation of the objects using them.

  • objects: The objects to merge.
    • type: EXP_ListValue of KX_GameObject

Split the meshes of the objects using them and restore their original meshes.

  • objects: The objects to unmerge.
    • type: EXP_ListValue of KX_GameObject

Destruct the batch group and restore all the objects to their original meshes.