Skip to content

BatchNode and SimpleBatchNode serialization do not restore correct runtime state after deserialization #2600

@capdevon

Description

@capdevon

After serializing and deserializing a BatchNode or a SimpleBatchNode using the standard jME Node read/write mechanisms, the internal runtime state is not correctly restored.

Specifically:

If BatchNode.batch() was called before serialization, the deserialized node may contain duplicated children (both the original geometries and previously generated batch geometries).

Internal structures such as batches, batchesByGeom, and related runtime data are not consistent with the scene graph.

The root cause is that batched geometries are runtime-generated and are serialized along with the original subtree, but the internal structures are not reconstructed during read().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions