Preparing search index...

    Base class for streams that track and apply model changes.

        const model = this.pluginSystem.findInterface(Editor.Model.IModel) as Editor.Model.IModel;
    const scene = model.project.scene;

    // project.history is a BaseChangesStream — use executeAsGroup()
    // to batch multiple mutations into a single undo/redo entry
    const history = model.project.history as Editor.Model.BaseChangesStream;

    const obj1 = scene.createSceneObject('ObjectA');
    const obj2 = scene.createSceneObject('ObjectB');

    // Group renames into one undo step
    history.executeAsGroup('Rename objects', () => {
    obj1.name = 'RenamedA';
    obj2.name = 'RenamedB';
    });
    console.log(`After grouped rename: "${obj1.name}", "${obj2.name}"`);
    // Ctrl+Z will undo both renames at once

    Hierarchy (View Summary)

    Index

    Constructors

    Methods

    • Executes a set of changes grouped under a named operation for undo/redo purposes.

      Parameters

      • name: string
      • change: () => void

      Returns void

    • Returns true if the object is of the specified type.

      Parameters

      • type: string

      Returns boolean