Toggle Item
Use a Toggle Item () node to customize a context menu or toolbar of the physics interface. This node adds a toggle item that a user can use to turn some functionality on or off.
Right-click a Menu, Context Menu, or Toolbar node to add a Toggle Item node.
You can right-click the Toggle Item node to add an Activation Condition or Input Dependency subnode.
The Settings window includes the following sections:
Command
Select a Command type: Create feature (the default), Internal action tag, or Command handler from code editor.
Use Create feature to place the action to add a new feature under a different menu than the one chosen by the program. Enter the type of feature in the Type field. Select the Restrict to geometric entity levels check box to restrict the toggle item. If the feature is applicable to other entity levels than those restricted here, it displays in its default location in the context menu or toolbar.
Use Internal action tag to add a general action given by its tag that you type in the Action tag field. This option is mainly for internal use, and there is no list of available action tags.
The Command handler from code editor is similar to the Internal action tag option, but the action handler can be defined using the Code Editor.
The remaining two sections are only available if the Command type list is set to Command handler from code editor.
Definition
Enter a title of the toggle item in the Title field and an icon file in the Icon field (or click Browse to pick an icon file from the file system), if the Action type list is set to Action handler from code editor.
If the Toggle Item node is a subnode under a Context Menu node where a weighting order is used, enter an integer in the Weight field to sort the toggle items based on a weight.
Select the Default selected check box if you want the toggle item to be selected (turned on) by default.
Condition to Run
Select the Show confirmation dialog check box if you want to display a confirmation dialog box as a preaction for the toggle item’s action. Type a message for the confirmation dialog box in the Message field and a confirmation answer in the Answer field (default: Yes). The confirmation dialog box also contains a Cancel button by default. You can use this functionality to ask for confirmation before performing the action.