Page MenuHome

Python: Expose WM is_interface_locked to python.
ClosedPublic

Authored by Omar Emara (OmarSquircleArt) on Tue, Feb 4, 12:34 PM.

Details

Summary

This patch exposes the Window Manager is_interface_locked as a read
only property to python.

This property is needed to allow script writers to detect if a job is
running with locked interface like the Alembic exporter.

Diff Detail

Repository
rB Blender

Event Timeline

Dalai Felinto (dfelinto) requested changes to this revision.Tue, Feb 4, 1:08 PM

From the design point of view could you provide a few (three?) use cases for this functionality?

Besides, the patch is not really doing anything, so not much to look at here. We would need to agree on the design first anyways, so don't worry about that now.

D6703 contains an extended discussion of the reasoning behind this patch. Let me recap.

Jobs lock the UI because they don't want the user to alter the scene while running. However, the user might register a handler or a timer that alter the scene. Such handlers and timers don't respect jobs and can run at any time. This might cause crashes or unexpected scene states. This patch gives script writers the ability to detect if a job is running and make decisions based on this to respect jobs. Animation Nodes add-on is one such script, and we would like to patch it to account for running jobs.

Which aspect of the design do you want to discuss?

Brecht Van Lommel (brecht) requested changes to this revision.Fri, Feb 14, 5:49 PM

I think the functionality is fine, but there should be a description for this property, that explains what an add-on should do when this returns true.

This revision now requires changes to proceed.Fri, Feb 14, 5:49 PM
  • Add description to the Is Interface Locked property.
This revision is now accepted and ready to land.Mon, Feb 17, 12:15 PM