Converts the data contained in the tree to a chosen data type.
The default data type is Text. To choose a different data type, right-click on the output port and select Revert to Generic Data Type, then right-click on it again and select a data type.
If the chosen data type is Text, Integer, Real, or Boolean, this node interprets the tree’s content as that data type. For example:
Data type | Tree | Output |
---|---|---|
Integer | Tree with content 1024 | 1024 |
Boolean | Tree with content true | true |
If the chosen data type is 2D Point, 3D Point, 4D Point, or Color, this node interprets the tree’s content or children as the components of that data type. For example:
Data type | Tree | Output |
---|---|---|
2D Point | Tree created from XML <location><x>1.2</x><y>3.4</y></location> | 1.2, 3.4 |
3D Point | Tree created from JSON {"coordinates": {"x":1.2, "y":3.4, "z":5.6}} | 1.2, 3.4, 5.6 |
4D Point | Tree created from XML <point><x>1.2</x><y>3.4</y><z>5.6</z><w>7.8</w></point> | 1.2, 3.4, 5.6, 7.8 |
4D Point | Tree with content 1.2, 3.4, 5.6, 7.8 | 1.2, 3.4, 5.6, 7.8 |
Color | Tree created from JSON {"foreground": {"r":1, "g":0, "b":0, "a":1}} | opaque red |
Color | Tree with content 1.0, 0.0, 0.0, 1.0 | opaque red |
Color | Tree with content #00FF00 | opaque green |
The tree’s name doesn’t matter. This node only looks at the tree’s content and descendants.
Keywords: conversion