Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
submodels [2026/07/12 03:13]
hermann
submodels [2026/07/12 06:38] (current)
hermann
Line 109: Line 109:
 Select //export functor inputs and outputs// on the [[model_presentation#​functor_action_bar|functor action bar]] and choose the inputs or outputs that will be exported. It is possible to define the input and output names and their corresponding descriptions. It is also possible to mark an exported input as advanced or optional. Optional inputs can also define an optional value that will be assigned to the port if no explicit value is provided. Select //export functor inputs and outputs// on the [[model_presentation#​functor_action_bar|functor action bar]] and choose the inputs or outputs that will be exported. It is possible to define the input and output names and their corresponding descriptions. It is also possible to mark an exported input as advanced or optional. Optional inputs can also define an optional value that will be assigned to the port if no explicit value is provided.
  
-Choose //Submodel Options// on the model toolbar and then click //Apply Changes / Edit Submodel Properties//​. That brings up the submodel editor dialog where you can define ​new namedescriptiondocumentation URL, and icon for the submodel, or reorder its inputs and outputs (or even remove some of them). Clicking ​//Ok// propagates the changes ​to all parts of your model (and dependent submodels) where the submodel ​is used.+> **Note:** Any port from the integer family of types can be declared ​light enumwhich presents it in the GUI as a labeled dropdown instead of a free-form numeric fieldvia the //Make port available as an enum value// control. This is not specific ​to submodels — it can be set on any carrier functor ​of an integer value type in any model, provided ​the carrier has an editor. When such a carrier'​s port is exported as a submodel ​input, its light enum configuration carries over into the submodel'​s interface.
  
-An individual input port can also be presented in the GUI as a labeled dropdown instead of a free-form numeric fieldThis is a script-only customization — there is no dialog ​control ​for it — set via the ''​@lightenum''​ property described in [[ego_script#​declaring_input_ports|Declaring input ports]] in the EGO Script reference.+Choose //Submodel Options// on the model toolbar and then click //Apply Changes / Edit Submodel Properties//​That brings up the submodel editor ​dialog ​where you can define a new name, description,​ documentation URL, and icon for the submodel, or reorder its inputs and outputs (or even remove some of them). Clicking //Ok// propagates ​the changes to all parts of your model (and dependent submodels) where the submodel is used.
  
 The submodel editor dialog also lets you set the submodel'​s **group**, which controls where it appears in the [[functor_library|Functor Library]]. A group name can contain subgroups by separating them with a colon (''":"''​);​ for example, ''"​Elevation Graph:​Tools:​Debug"''​ places the submodel in a //Debug// subgroup, itself inside a //Tools// subgroup, inside an //Elevation Graph// group. This is specific to submodels: an ordinary functor'​s placement in the Library is fixed by its own definition and cannot be changed by the user, but a submodel'​s group — and therefore whether it appears in a subgroup — is under the control of whoever creates or edits it. The submodel editor dialog also lets you set the submodel'​s **group**, which controls where it appears in the [[functor_library|Functor Library]]. A group name can contain subgroups by separating them with a colon (''":"''​);​ for example, ''"​Elevation Graph:​Tools:​Debug"''​ places the submodel in a //Debug// subgroup, itself inside a //Tools// subgroup, inside an //Elevation Graph// group. This is specific to submodels: an ordinary functor'​s placement in the Library is fixed by its own definition and cannot be changed by the user, but a submodel'​s group — and therefore whether it appears in a subgroup — is under the control of whoever creates or edits it.