MLightCAD
    Preparing search index...

    Synchronizes scene drawable materials with live layer-table style changes.

    The host view (AcTrView2d) delegates layer add/update and background refresh entry points here so material cache updates, scene fan-out, and text rematerialization stay out of the view class.

    Index

    Constructors

    Methods

    • Builds resolved layer traits used when syncing appearance or remapping INSERT layers.

      Reads the active draw database from AcTrRenderer.context unless a custom resolver was supplied to the constructor.

      Parameters

      • layerName: string

        Name of the layer to resolve from the active database.

      Returns Partial<AcGiSubEntityTraits> | undefined

      Resolved sub-entity traits, or undefined when the layer is missing.

    • Returns true when a layer-table edit may require material refresh.

      Parameters

      • changes: Partial<AcDbLayerTableRecordAttrs>

        Partial layer record attributes from the edit event.

      Returns boolean

      True when color, linetype, lineweight, or transparency changed.

    • Rebinds text materials after INSERT groups are split/reparented or when the canvas background changes (ACI-7 foreground inversion).

      Parameters

      • root: Object3D

        Object subtree to traverse for text refresh hooks.

      • OptionallayerTraits: Partial<AcGiSubEntityTraits>

        Optional resolved traits passed through to text wrappers.

      Returns void

    • Refreshes cached layer materials from the live layer-table record and propagates the result to batched drawables and text hierarchies.

      Parameters

      • layer: AcDbLayerTableRecord

        Live layer-table record whose traits should drive the refresh.

      Returns void