diff --git a/book/src/api/basics/cube_tree_named_outputs.png b/book/src/api/basics/cube_tree_named_outputs.png new file mode 100644 index 0000000..a029c08 Binary files /dev/null and b/book/src/api/basics/cube_tree_named_outputs.png differ diff --git a/book/src/api/basics/tree-functions.md b/book/src/api/basics/tree-functions.md index c77ba00..888bcec 100644 --- a/book/src/api/basics/tree-functions.md +++ b/book/src/api/basics/tree-functions.md @@ -41,6 +41,19 @@ def cube_tree(): ![](./cube_tree_int.png) +By default, each output is named 'Result'. To customize the name, return a dictionary. + +```python +@tree("Cube Tree") +def cube_tree(): + return { + "My Cube": cube(), + "Scale Constant": 5 + } +``` + +![](./cube_tree_named_outputs.png) + ## Group Input All arguments in a tree function must be annotated with a valid socket type. These types are provided by Geometry Script, and are not equivalent to Python's built-in types. Let's add a size argument to our Cube Tree.