1. Home
  2. Docs
  3. Quick Scripts
  4. Modal Operators (Advanced)

Modal Operators (Advanced)

If you are creating your modal operator script, this topic is for you!

Using modal operators scripts with Quick Scripts Addon is a little bit different than running simple operators.

here is a basic example of a modal operator script ready to be used with Quick Scripts Addon:

This is how your modal script should be structured. you should have your modal operator class and a way to register it as usual.

but somethings HAVE to be done:

A important thing is that your register function should be called directly in the script (Not in “if __name__ == __main__:” statements).

And the most important thing is that you HAVE to add a “test call” at the end of the script exactly like in the picture above, with the comment “# teste call” above your operator call line, like in this example:

This comment “# test call” before the line you are calling the operator is telling Quick Scripts that the next line will be the command to call your modal operator, meaning that you cannot add anything other than your operator call at the end of your script.

Was this article helpful to you? Yes No

How can we help?