Skip to main content

Editor.Assets.PassBinding

Class

Defines a binding parameter for a render pass with metadata for UI presentation and value constraints.

Index

Example

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

// Find Material assets and inspect PassBindings via passInfos
const materials = assetManager.assets.filter(
a => a.getTypeName() === 'Material'
) as Editor.Assets.Material[];

let totalBindings = 0;
for (const material of materials) {
for (const info of material.passInfos) {
const uiData = info.uiData;
if (!uiData) continue;

// Each PassBinding exposes: name, label, type, hint, defaultValue,
// min/max/step for numeric ranges, and values for enum-like dropdowns
totalBindings += uiData.passBindings.length;
}
}

console.log(`Inspected ${materials.length} material(s), ${totalBindings} pass binding(s)`);

Properties

defaultValue?

readonly optional defaultValue?: number

Initial numeric value for the binding parameter.


hint

readonly hint: string

Tooltip or help text displayed in the UI.


label

readonly label: string

Human-readable name shown in the UI.


max?

readonly optional max?: number

Maximum allowed numeric value.


min?

readonly optional min?: number

Minimum allowed numeric value.


name

readonly name: string

Unique identifier for the binding parameter.


step?

readonly optional step?: number

Increment step size for numeric input.


type

readonly type: PassBindingType

Data type of the binding parameter.


values

readonly values: PassBinding[]

Array of valid string values for enum-type bindings.