data_events: Support for bulk tracking of data changesΒΆ

This module provides a singleton of class Tracker, tracker, that is used to batch notifications of changes of various data structures. Notifications are ordered, so the nofications for particular data types will always be in the same order.

Data types that should be tracked are registered with Tracker.register_data_type() and the order given.

def computation():
    from chimerax.core.data_events import tracker
    with tracker:
        # manipulate data
    # changes propagated