Editor.Assets.PassBindingType
EnumEnum defining types of bindings for render passes.
Index
Enumeration Members
Example
const model = this.pluginSystem.findInterface(Editor.Model.IModel) as Editor.Model.IModel;
const assetManager = model.project.assetManager;
const materials = assetManager.assets.filter(
a => a.isOfType('Material')
) as Editor.Assets.Material[];
// PassBindingType discriminates Property (shader uniforms) vs Define (compile-time switches)
let propertyCount = 0;
let defineCount = 0;
for (const mat of materials) {
const passes = mat.passInfos;
if (passes.length === 0) continue;
const uiData = passes[0].uiData;
for (const binding of uiData.passBindings) {
if (binding.type === Editor.Assets.PassBindingType.Property) propertyCount++;
else if (binding.type === Editor.Assets.PassBindingType.Define) defineCount++;
}
}
console.log(`Across ${materials.length} material(s): ${propertyCount} Property binding(s), ${defineCount} Define binding(s)`);
Enumeration Members
Define
Define:
number
Binding to a shader define.
DefineSelect
DefineSelect:
number
Binding to a define with selectable options.
DefineSelectValue
DefineSelectValue:
number
Binding to a specific value within a define select.
GroupEnd
GroupEnd:
number
Marks the end of a binding group.
Invalid
Invalid:
number
Invalid or uninitialized binding type.
Property
Property:
number
Binding to a material property.