Model
self:set_blendshape_value
Shared
Sets the value of a blendshape on a specific component
Syntax
local status = self:set_blendshape_value(component, blendshape, value)Parameters
| Type | Name | Description |
|---|---|---|
string | component | Path of the component containing the blendshape |
string | blendshape | Name of the blendshape to update Supports * as a wildcard to match multiple blend shapes by pattern |
float | value | Value to apply to the blendshape |
Returns
| Type | Name | Description |
|---|---|---|
bool | status | true on successful execution, or false on failure |
Examples
local entity = model.create("character")
--Set a single blendshape value
entity:set_blendshape_value("Skeleton3D/Head", "smile", 1.0)
--Set blendshape values using a wildcard
entity:set_blendshape_value("Skeleton3D/Head", "eye_*", 0.5)
--Reset a blendshape to default
entity:set_blendshape_value("Skeleton3D/Head", "sad", 0.0)