Scripting API

Scripting API

ColorUsageAttribute

Class in Abyss.Core, from Abyss.Core.

Shows a Vector4 or Vector3 field as a color: a swatch that opens the editor's picker, rather than its numbers. The field holds the color as a screen shows it — red, green and blue from 0 to 1, #FF8000 as (1, 0.5, 0) — and a Vector4 its alpha last, 1 opaque; past 1 for an HDR color's light.

public sealed class ColorUsageAttribute : Attribute

Remarks

The Debug view still shows the numbers.

Constructors

ColorUsageAttribute

public ColorUsageAttribute(bool showAlpha = true, bool hdr = false)

Shows a Vector4 or Vector3 field as a color: a swatch that opens the editor's picker, rather than its numbers. The field holds the color as a screen shows it — red, green and blue from 0 to 1, #FF8000 as (1, 0.5, 0) — and a Vector4 its alpha last, 1 opaque; past 1 for an HDR color's light.

Parameters

  • showAlpha: Whether its alpha is shown and picked: a Vector4's only, and true unless said not.
  • hdr: Whether it is an HDR color, picked with an intensity past 1.

The Debug view still shows the numbers.

Properties

ShowAlpha

public bool ShowAlpha { get; }

Whether its alpha is shown and picked.

Hdr

public bool Hdr { get; }

Whether it is an HDR color.