File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
book/src/api/advanced-scripting Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -72,4 +72,21 @@ def point_terrain():
7272 w = 0
7373 )
7474 ).mesh_to_points()
75+ ```
76+
77+ ## Input Group Prefix
78+
79+ 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.
80+
81+ To do this, use square brackets next to the annotation with a string for the prefix.
82+
83+ ``` python
84+ def mountain_or_canyon (
85+ mountain_inputs : TerrainInputs[" Mountain" ], # Prefixed with 'Mountain'
86+ canyon_inputs : TerrainInputs[" Canyon" ], # Prefixed with 'Canyon'
87+ is_mountain : Bool
88+ ):
89+ return terrain_generator(
90+ inputs = switch(switch = is_mountain, true = mountain_inputs, false = canyon_inputs)
91+ )
7592```
You can’t perform that action at this time.
0 commit comments