napari.layers.LayerLock#

class napari.layers.LayerLock(*values)[source]#

Bases: Flag

Flags describing which UI operations are locked on a layer.

Composable so future lock dimensions can be added without breaking the Layer.locked API. bool(value) is truthy when any flag is set.

  • NONE: no operations are locked.

  • DELETION: layer is protected from UI-driven delete; convert and stack split/merge are also blocked because they delete the original layer.

  • ALL: every defined lock dimension is engaged.

Attributes

NONE

DELETION

ALL

Details