Page MenuHome

Add Background flag for python add-on
Needs RevisionPublic

Authored by Flores Arnaud (Viop) on Mar 12 2020, 4:17 PM.

Details

Summary

This flag background allow to keep autosave on when modal operator is running.
Can solve probleme like described here : https://devtalk.blender.org/t/how-to-read-mouse-keyboard-continuously/2212/5

Diff Detail

Event Timeline

Flores Arnaud (Viop) edited the summary of this revision. (Show Details)
Campbell Barton (campbellbarton) requested changes to this revision.EditedWed, Apr 29, 10:53 AM

Having this distinction seems reasonable, however there would be more control if this is an argument to WM_event_add_modal_handler (and the Python wrapper).

eg:

context.window_manager.modal_handler_add(self, background=True)

Then the flag can be stored in the operator wmOperator.flag.


Note that I assume this will be used for other things besides auto-save in the future.

This revision now requires changes to proceed.Wed, Apr 29, 10:53 AM