Preparing search index...

    The layers of a {@Editor.Assets.Scene}.

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

    console.log(`Can add new layers: ${layers.canAdd}`);

    const combinedIds = layers.combinedIds;
    const idArray = combinedIds.toArray();
    console.log(`Combined layer count: ${idArray.length}`);

    for (const id of idArray) {
    const layer = layers.find(id);
    if (!Editor.isNull(layer)) {
    console.log(` Layer "${layer.name}" — id: ${layer.id}`);
    }
    }

    const defaultId = Editor.Model.LayerId.Default;
    const hasDefault = layers.contains(defaultId);
    console.log(`Contains default layer: ${hasDefault}`);

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    canAdd: boolean

    Check if another layer can be added to this entity.

    combinedIds: LayerSet

    The LayerSet which represents this entity.

    id: Uuid

    The unique id of the entity.

    meta: Meta

    Metadata associated with this entity, providing access to its unique identifier and other descriptive properties.

    type: string

    The entity's type.

    Methods

    • Whether the layers contain layerId.

      Parameters

      Returns boolean

    • Returns the name of this object's type.

      Returns string

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

      Parameters

      • type: string

      Returns boolean

    • Returns true if this object refers to the same instance as the given object.

      Parameters

      Returns boolean

    • Remove layerId from this entity.

      Parameters

      Returns void