Geometry Nodes and enumerated lists:
I was thinking of developing a complex node system with user selection enabling or disabling node groups much like an enumerated list in a script would allow a single user selection to perform various functions.
As such I thought I'd start small by just having a selection to create the primitives:
This quickly led to 2 issues that I'm wondering if perhaps there's a better way to achieve the overall goal.
1st: While technically there could be a string input if the user does not know all available options and enter an input case sensitive correctly there would be no feedback of the issue input not in list. Since I do not see a way to make a selection list the user input can only be an arbitrary number which while the user can scroll through and see feed back does not allow anticipation of the result and requires a user to scroll through the full range to even know what is possible.
2nd: Even a small sample of available inputs begins to create a fairly extensive tree simply testing an input value
Is there a more efficient solution to testing an input within a range (list) and providing a specific output based on an individual input?
After rearranging and grouping the nodes I have an arrangement that can to some extent be easily modified.
An outer node group is providing a macro level access for visibility.
Within the outer node group sub node groups are connected which are largely just duplicated of a template. Each subgroup providing access to an index value (tested against the modifier input value) and string to be used for identification.
Then passing outputs only when the modifier input value is equal to the index of the sub group.
Because the subgroups pass all incoming requirements to the parent group the only required change internally is the actual geometry to build.
- note confirmed geometry is not saved. --The concern I have with using a collection of premade geometry is going to be file size given the choice selections will not just be primitives.
Ideally I would still prefer a drop down text selection as the modifier value input but may have to postpone or scratch that idea unless I just want to have a script that creates only the desired node group. The problem with having a script only create the desired node group becomes lack of visual feedback to the user.
Hybrid of @quellenform solution
Main object node tree:
Individual obj node tree:
I have included a driver from the main object geo node index selection for each object in the collection to disable geometry if the index is not selected. While having the collection hidden does prevent the underlying nodes (and geometry they create) from being passed to the gpu and evaluated for shading etc, it does not prevent them from being evaluated by the cpu and loaded into ram.
Ultimately it will include a trade off between when computation time occurs, adding the driver will add some minor overhead for its evaluation and available processing and memory on the end device as to which method works best but I believe saving some ram (~ 20 % of what blender was using in this example) for other process may end up being useful. Thanks to all for their inputs.