Python API Updates

Indicates a feature suggested and voted up by users on the Flame Feedback portal.

Morph

The following attributes can be used to modify parameters in the Morph node:

Example:

# Set the Reference colour of a Morph node to Green
m = flame.batch.create_node("Morph")
m.reference_colour = (0.0, 1.0, 0.0)

The following function can be used in the Morph node:

PyNode

The following attributes can be used to modify parameters in a PyNode:

Examples:

# Set the colour of the current Schematic node to Red
flame.batch.current_node.get_value().schematic_colour = (0.6, 0.0, 0.0)
# Set the colour of the current Schematic node to a colour associated to a label.
flame.batch.current_node.get_value().schematic_colour_label = "In Progress"

The following function can be used on a PyNode node:

Example:

# Clear the colour of all Schematic node in the current Batch Group
for node in flame.batch.nodes:
     node.clear_schematic_colour()


Render node

The status of the Apply Colour Coding button can be set through the Python API.

Examples:

The following examples show how to set tags on a Render node.

# Add Tags on a Render node.
r = flame.batch.create_node("Render")
r.tags = ["TagA","TagB"]
# Append a Tag to existing Tags.
all_tags = <PyNode>.tags.get_value()
all_tags.append("TagC")
<PyNode>.tags = all_tags
# Clear all Tags on a Render node.
<PyNode>.tags = []


Write File node

The following attribute can be used to modify parameters in a Write File node:

For more information, see Python API Documentation.