Skip to content

OpacityLock

Namespace Nfty.Core.Editing in assembly Nfty.Core.

public enum OpacityLock

Whether a paint command may write partial alpha. Locked does not mean "no alpha": erasing is how a sprite gets its shape and layers have to composite over one another, so a fully opaque rectangle per layer would make stacking meaningless. It means binary alpha — every painted pixel comes out fully opaque or fully erased, nothing between.

Remarks

OpacityLock.Locked is the zero value on purpose: it is what default yields, so a command constructed without saying anything about opacity gets the safe mode. This is an editor setting and nothing else — no manifest field, no schema change, no archive affected.

Values

  • Locked = 0 - Binary alpha. Every pixel a command writes is snapped to fully opaque (255) or fully erased (0); the pixels it does not touch, and everything Undo restores, are left exactly as they were.
  • Unlocked = 1 - Partial alpha is written through as the command computed it. Semi-transparent pixels do not voxelize cleanly, which is why this is never the default.