Accessing node data

What is a graph "node"?

A node represents an operation in InstantTerra, i.e. the generation of a terrain using a noise or even an erosion simulation.

These nodes and their parameters are accessible directly via the API.

# Create an instance
from wysilab import InstantTerra
it = InstantTerra()

# Get the current graph and the list of nodes
graph = it.project.graph
list_of_node = graph.get_all_nodes()

# Get the first node of the graph
my_node = list_of_node[0]

Changing a node name = "New name"

To change or retrieve a node name, use the attribute name.

Changing a node comment

my_node.comment = "This is a commentary"

To change or retrieve a node comment, use the attribute comment.

Retrieving the node type


To retrieve the node type, use the attribute type.

Retrieving the parameters' list

# Returns the list of node parameters
list_of_parameters = my_node.get_parameter_list()

The method get_parameter_list() returns the list of node parameters.

Determining if a parameter exists

# Returns True if the parameter exist

See has_parameter(parameter_name) in the documentation.

Retrieving or setting a parameter value

# Get the value of the parameter

# Set the value of the parameter
my_node.set_parameter("offset_x", "1.0")

See get_parameter(parameter_name) and set_parameter(parameter_name) in the documentation.


If the parameter name does not exist o

r if the set value is not valid, Python returns an error message with the description of the problem.

Copyright © 2021 · All Rights Reserved · Wysilab