Set Material Parameter
Set a scalar, vector, or texture parameter on a Material Instance and verify by reading it back. Updates the instance so the change is visible without a manual recompile. Leaves the package dirty; call hf_save_object to persist.
hf_set_material_parameterWriteArguments
| Name | Type | Description |
|---|---|---|
materialreq | string | Asset path of a MaterialInstanceConstant. Base Materials cannot have parameters set directly - create an instance instead. |
parameterreq | string | Parameter name. Use hf_list_material_parameters to find the exact name. |
typereq | string | Which kind of parameter this is. scalar | vector | texture |
valuereq | string | scalar: a number. vector: R,G,B,A or (R=..,G=..,B=..,A=..). texture: an asset path, or 'none' to clear. |
force | boolean = 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. |
Related tools
Also in Materials: