Notch Notch Manual 0.9.23
 Light | Dark
SetFloat()

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_nameThe property within the node. Starts with <GroupName>.<Property> e.g. 'Transform.Position X'
valueThe 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);
}
Using SetFloat alters the value of the property in the Editor/Document. This is subtly different to SetEnvelopeValue which responds to modifiers and keyframes.