Skip to content
Jigwright
HullForge docs

Set Material Layer

Assign a material function into one layer or blend slot on an instance. This is a STATIC parameter: changing it recompiles the instance's shaders rather than updating a value.

hf_set_material_layerWrite

Arguments

NameTypeDescription
functionreqstringMaterial function to put there. An empty string clears the slot.
indexreqintegerPosition in that array. Must already exist: this assigns into the stack the parent defines rather than growing it.
instancereqstring
slotreqstringWhich array to write to.
Layer | Blend
forceboolean
= false
Edit even when the asset cannot currently be saved - for example when revision control is configured but disconnected. The change will be made in memory and WILL BE LOST unless the underlying problem is fixed before saving. Only pass this if you intend to discard the work or fix the connection first.

Nearby in Materials:

All 28 tools in Materials — 19 more not listed here.