Description

Untitled

The Modal Operator node lets you create a modal. A modal operator is an operator that keeps running until the user stops it. During this time you can react to the user's keypresses to perform different actions. This node also allows you to draw text on the screen while the modal is running.

Inputs

Disable: Disables the modal when this is enabled

Outputs

Before Modal: Runs before the modal operator starts

Modal: Run constantly while the modal is running. In here you can react to the users keypresses and use the modal event nodes.

Draw Text: Shown when Draw Text is enabled. Make sure to only attach nodes here that are related to drawing text, not ones that interact with the modal or are reacting to keypresses by the user. These should go into the Modal output

After Modal: Runs after the modal has been ended

Settings

Name: Name of the modal

Description: Description of the modal operator

Cursor: The cursor shown while the modal is running. If you enable Keep Interactive some blender areas may overwrite this and the cursor will switch back and forth

Keep Interactive: If this is turned off every other interaction with blender is blocked. This means that you can’t press buttons or navigate the viewport. You can manually allow certain actions with the return modal node. When this is enabled, all other blender interactions are allowed but some may have priority over you catching the shortcuts, meaning when you use a certain shortcut in your modal, the default blender action for that shortcut can still run.

Draw Text: Enables a Draw Text output on the node. In here you can use the draw text nodes to draw text on the screen while the modal is running. When draw text is enabled you will see a space option. From here on the modal operator will only work in this space

Default Escape: When this is enabled you can end the modal by pressing ESC or Rightclick any time. If you disable this you need to add your own option to escape the modal, otherwise, there will be no way to stop it!

<aside> ❗ Make sure to always have some ability to end your modal, either with the Default Escape option or by using a Return Modal node for some other event. If you forget to add this option you will have to restart blender to end the modal.

</aside>

Properties: See the operator node for more information on operator properties