MetadataTraits¶
Namespace Nfty.Core.Output in assembly Nfty.Core.
Which traits an asset publishes, and in which SHAPE of metadata.
Remarks¶
Shape 1 (what every Set cooked before this existed carries): one attribute per present layer plus Type. A rolled color is invisible, and a layer the roll left out is invisible too, so two assets differing only in a hue publish identical traits.
Shape 2 (new cooks): additionally a "{Layer} Color" attribute right after each Dynamic or Static layer's own (named by ColorName from the UNROUNDED rolled color; Custom layers carry none), and an explicit MetadataTraits.Absent value for each OPTIONAL layer the roll left out. One function builds this list, so the OpenSea file, the rich file's rarity rows and the collection rarity table cannot spell a trait two ways.
The shape is recorded in set.json (SetManifest.MetadataShape, absent = 1) so extend writes new items in the Set's own shape and never rewrites an already-published file's attributes: a Set is one shape throughout, which keeps its rarity table consistent. Neither names nor shapes ever enter the DNA.
Fields¶
Absent¶
The value an optional layer is published under when the roll left it out.
CurrentShape¶
The shape new cooks write: color traits and explicit MetadataTraits.Absent.
LegacyShape¶
The shape every Set cooked before color traits carries; also what a missing field means.
Methods¶
Attributes(GeneratedAsset, int)¶
The attributes an asset publishes, in order, excluding the leading Type.
Parameters
asset(GeneratedAsset) - The asset.shape(int) - The Set's metadata shape.
Returns. One per present layer; in shape 2 also color traits and MetadataTraits.Absent entries.