Document input group prefixes

pull/10/head
Carson Katri 2022-11-19 15:04:36 -05:00
rodzic 66ade0a739
commit 391d74ec61
1 zmienionych plików z 17 dodań i 0 usunięć

Wyświetl plik

@ -72,4 +72,21 @@ def point_terrain():
w=0
)
).mesh_to_points()
```
## Input Group Prefix
If you use the same `InputGroup` multiple times, you need to provide a prefix. Otherwise, inputs with duplicate names will be created on your tree.
To do this, use square brackets next to the annotation with a string for the prefix.
```python
def mountain_or_canyon(
mountain_inputs: TerrainInputs["Mountain"], # Prefixed with 'Mountain'
canyon_inputs: TerrainInputs["Canyon"], # Prefixed with 'Canyon'
is_mountain: Bool
):
return terrain_generator(
inputs=switch(switch=is_mountain, true=mountain_inputs, false=canyon_inputs)
)
```