Notch Notch Manual 0.9.23
 Light | Dark
SetString()

SetString()

Purpose #

Sets the value of a string property in a node. This can also be used to set the colour parameter of a material.

Syntax #

void SetString(String property_name, String value);

Parameters

property_nameThe property within the node. Starts with <GroupName>.<Property> e.g. 'Transform.Position X'
valueThe string value the property is to be set to

Example #

function Update()
{ 
    layer = Document.FindLayer("My Layer");
    node = layer.FindNode("MyTextNode");
    node.SetString("Attributes.Text String", "Dormant");
}
function Update()
{
    layer = Document.FindLayer("My Layer");
    node = layer.FindNode("MyShape3DNode");
    node.SetString("Material.Colour", "0,0.1,0.4,1.0");
}