SetFloat()
Purpose #
Sets the value of a float property in a node. To set the colour property of a material, please use the SetString() function and the example here.
Syntax #
void SetFloat(String property_name, float value);
Parameters
property_name | The property within the node. Starts with <GroupName>.<Property> e.g. 'Transform.Position X' |
value | The float value the property is to be set to |
Example #
function Update()
{
layer = Document.FindLayer("My Layer");
node = layer.FindNode("Frame Buffer");
node.SetFloat('Transform.Position X', 1.3);
}
UsingSetFloat
alters the value of the property in the Editor/Document. This is subtly different toSetEnvelopeValue
which responds to modifiers and keyframes.