Page MenuHome

Add Background flag for python add-on
Needs RevisionPublic

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



This flag background allow to keep autosave on when modal operator is running.
Can solve probleme like described here :

Diff Detail

Event Timeline

Flores Arnaud (Viop) edited the summary of this revision. (Show Details)
Campbell Barton (campbellbarton) requested changes to this revision.EditedApr 29 2020, 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).


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.Apr 29 2020, 10:53 AM