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"]])objects
Section titled “objects”The list of the objects merged. (read only)
Type: EXP_ListValue of KX_GameObject
referenceObject
Section titled “referenceObject”The object used for object rendering settings (layer, color…).
merge(objects)
Section titled “merge(objects)”Merge meshes using the transformation of the objects using them.
objects: The objects to merge.- type:
EXP_ListValueofKX_GameObject
- type:
split(objects)
Section titled “split(objects)”Split the meshes of the objects using them and restore their original meshes.
objects: The objects to unmerge.- type:
EXP_ListValueofKX_GameObject
- type:
destruct()
Section titled “destruct()”Destruct the batch group and restore all the objects to their original meshes.
