Vital.sandbox
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

TypeNameDescription
stringcomponentPath of the component containing the blendshape
stringblendshapeName of the blendshape to update
Supports * as a wildcard to match multiple blend shapes by pattern
floatvalueValue to apply to the blendshape

Returns

TypeNameDescription
boolstatustrue on successful execution, or false on failure

Examples

Set various blendshape's value on a model
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)

On this page