nsi-intermediate 0.2.0

Renderer-agnostic intermediate representation for the Nodal Scene Interface – ɴsɪ.
Documentation
//! The ɴsɪ naming-convention draft's mapping, as a table.
//!
//! Generated by `tools/names_from_draft.py` from the draft's *Complete
//! Attribute Mapping*. Do not edit: regenerate it.
//!
//! [The draft]: https://nsi.readthedocs.io/en/latest/naming-convention.html

/// Per row: the shipped node type the row belongs to -- empty for every
/// node -- the shipped name, and the draft's.
pub(super) const ATTRIBUTES: &[(&str, &str, &str)] = &[
    ("", "nicename", "nice-name"),
    (
        "attributes",
        "displacementresolution",
        "displacement-resolution",
    ),
    ("attributes", "displacementshader", "shader.displacement"),
    ("attributes", "quantizedemission", "emission.quantized"),
    ("attributes", "regularemission", "emission.regular"),
    ("attributes", "surfaceshader", "shader.surface"),
    (
        "attributes",
        "visibility.set.subsurface",
        "visibility.subsurface-set",
    ),
    ("attributes", "volumeshader", "shader.volume"),
    ("curves", "nvertices", "vertex-count"),
    ("cylindricalcamera", "clippingrange", "clipping-range"),
    ("cylindricalcamera", "eyeoffset", "eye-offset"),
    ("cylindricalcamera", "fov", "field-of-view.vertical"),
    (
        "cylindricalcamera",
        "horizontalfov",
        "field-of-view.horizontal",
    ),
    ("cylindricalcamera", "shutteropening", "shutter.opening"),
    ("cylindricalcamera", "shutterrange", "shutter.range"),
    ("faceset", "faces", "face-index"),
    ("fisheyecamera", "clippingrange", "clipping-range"),
    ("fisheyecamera", "fov", "field-of-view"),
    ("fisheyecamera", "shutteropening", "shutter.opening"),
    ("fisheyecamera", "shutterrange", "shutter.range"),
    ("global", "bucketorder", "bucket-order"),
    ("global", "exclusiveshading", "exclusive-shading"),
    ("global", "hidemessages", "messages.hide"),
    ("global", "maximumraydepth.diffuse", "diffuse.ray-depth-max"),
    ("global", "maximumraydepth.hair", "hair.ray-depth-max"),
    (
        "global",
        "maximumraydepth.reflection",
        "reflection.ray-depth-max",
    ),
    (
        "global",
        "maximumraydepth.refraction",
        "refraction.ray-depth-max",
    ),
    ("global", "maximumraydepth.volume", "volume.ray-depth-max"),
    (
        "global",
        "maximumraylength.diffuse",
        "diffuse.ray-length-max",
    ),
    ("global", "maximumraylength.hair", "hair.ray-length-max"),
    (
        "global",
        "maximumraylength.reflection",
        "reflection.ray-length-max",
    ),
    (
        "global",
        "maximumraylength.refraction",
        "refraction.ray-length-max",
    ),
    (
        "global",
        "maximumraylength.specular",
        "specular.ray-length-max",
    ),
    ("global", "maximumraylength.volume", "volume.ray-length-max"),
    (
        "global",
        "networkcache.directory",
        "network-cache.directory",
    ),
    ("global", "networkcache.mipmap", "network-cache.mipmap"),
    ("global", "networkcache.size", "network-cache.size"),
    ("global", "networkcache.write", "network-cache.write"),
    ("global", "numberofthreads", "thread-count"),
    (
        "global",
        "quality.causticsamples",
        "quality.caustic-samples",
    ),
    (
        "global",
        "quality.iprglobalupdate",
        "quality.preview.global-update",
    ),
    (
        "global",
        "quality.iprinterpolate",
        "quality.preview.interpolate",
    ),
    (
        "global",
        "quality.iprspeedmultiplier",
        "quality.preview.speed-multiplier",
    ),
    (
        "global",
        "quality.samplevolumeemission",
        "quality.volume-emission-sampling",
    ),
    (
        "global",
        "quality.shadingsamples",
        "quality.shading-samples",
    ),
    ("global", "quality.volumesamples", "quality.volume-samples"),
    ("global", "referencetime", "reference-time"),
    ("global", "renderatlowpriority", "low-priority"),
    ("global", "show.atmosphere", "shading.atmosphere"),
    ("global", "show.displacement", "shading.displacement"),
    ("global", "show.instancesnode", "shading.instances-node"),
    (
        "global",
        "show.multiplescattering",
        "shading.multiple-scattering",
    ),
    ("global", "show.osl.subsurface", "shading.osl-subsurface"),
    ("global", "texture.missingcolor", "texture.missing-color"),
    (
        "global",
        "texture.missingcolorerrors",
        "texture.missing-color-errors",
    ),
    ("global", "texturememory", "texture-memory"),
    ("instances", "disabledinstances", "disabled-index"),
    ("instances", "modelindices", "object-index"),
    ("instances", "sourcemodels", "objects"),
    ("instances", "transformationmatrices", "matrices"),
    ("mesh", "clockwisewinding", "clockwise"),
    ("mesh", "nholes", "hole-count"),
    ("mesh", "nvertices", "vertex-count"),
    ("mesh", "outlinecreasethreshold", "outline-crease-threshold"),
    ("mesh", "quadraticmotion", "quadratic-motion"),
    ("mesh", "referencetime", "reference-time"),
    (
        "mesh",
        "subdivision.cornersharpness",
        "subdivision.corner.sharpness",
    ),
    (
        "mesh",
        "subdivision.cornervertices",
        "subdivision.corner.index",
    ),
    (
        "mesh",
        "subdivision.creasesharpness",
        "subdivision.crease.sharpness",
    ),
    (
        "mesh",
        "subdivision.creasevertices",
        "subdivision.crease.index",
    ),
    (
        "mesh",
        "subdivision.smoothcreasecorners",
        "subdivision.corner.automatic",
    ),
    ("nurbs", "nu", "u.count"),
    ("nurbs", "nv", "v.count"),
    ("nurbs", "trimcurves.knot", "trim-curves.knot"),
    ("nurbs", "trimcurves.max", "trim-curves.max"),
    ("nurbs", "trimcurves.min", "trim-curves.min"),
    ("nurbs", "trimcurves.n", "trim-curves.point-count"),
    ("nurbs", "trimcurves.ncurves", "trim-curves.curve-count"),
    ("nurbs", "trimcurves.order", "trim-curves.order"),
    ("nurbs", "uknot", "u.knot"),
    ("nurbs", "umax", "u.max"),
    ("nurbs", "umin", "u.min"),
    ("nurbs", "uorder", "u.order"),
    ("nurbs", "vknot", "v.knot"),
    ("nurbs", "vmax", "v.max"),
    ("nurbs", "vmin", "v.min"),
    ("nurbs", "vorder", "v.order"),
    ("outputdriver", "drivername", "driver-name"),
    ("outputdriver", "embedstatistics", "embed-statistics"),
    ("outputdriver", "imagefilename", "filename"),
    ("outputlayer", "backgroundlayer", "background.layer"),
    ("outputlayer", "backgroundvalue", "background.value"),
    ("outputlayer", "colorprofile", "color-profile"),
    ("outputlayer", "cryptomatte.enable", "cryptomatte"),
    ("outputlayer", "filter", "filter.name"),
    ("outputlayer", "filterwidth", "filter.width"),
    ("outputlayer", "layername", "layer-name"),
    ("outputlayer", "layertype", "layer-type"),
    ("outputlayer", "lightdepth", "light-depth"),
    ("outputlayer", "lightset", "light-set"),
    ("outputlayer", "lightsetname", "light-set-name"),
    ("outputlayer", "outputdrivers", "output-drivers"),
    ("outputlayer", "scalarformat", "scalar-format"),
    ("outputlayer", "sortkey", "sort-key"),
    ("outputlayer", "variablename", "variable-name"),
    ("outputlayer", "variablesource", "variable-source"),
    ("outputlayer", "withalpha", "with-alpha"),
    ("particles", "quadraticmotion", "quadratic-motion"),
    ("particles", "reverseorientation", "reverse-orientation"),
    ("perspectivecamera", "clippingrange", "clipping-range"),
    (
        "perspectivecamera",
        "depthoffield.aperture.angle",
        "depth-of-field.aperture.angle",
    ),
    (
        "perspectivecamera",
        "depthoffield.aperture.enable",
        "depth-of-field.aperture.enable",
    ),
    (
        "perspectivecamera",
        "depthoffield.aperture.sides",
        "depth-of-field.aperture.sides",
    ),
    (
        "perspectivecamera",
        "depthoffield.enable",
        "depth-of-field.enable",
    ),
    (
        "perspectivecamera",
        "depthoffield.focaldistance",
        "depth-of-field.focal-distance",
    ),
    (
        "perspectivecamera",
        "depthoffield.focallength",
        "depth-of-field.focal-length",
    ),
    (
        "perspectivecamera",
        "depthoffield.focallengthratio",
        "depth-of-field.focal-length-ratio",
    ),
    (
        "perspectivecamera",
        "depthoffield.fstop",
        "depth-of-field.focal-stop",
    ),
    ("perspectivecamera", "fov", "field-of-view"),
    ("perspectivecamera", "shutteropening", "shutter.opening"),
    ("perspectivecamera", "shutterrange", "shutter.range"),
    (
        "perspectivecamera",
        "unitlengthmillimeters",
        "unit-length-millimeters",
    ),
    ("procedural", "boundingbox", "bounding-box"),
    ("root", "geometryattributes", "attributes"),
    (
        "screen",
        "importancesamplefilter",
        "quality.importance-sample-filter",
    ),
    ("screen", "outputlayers", "output-layers"),
    ("screen", "oversampling", "quality.pixel-samples"),
    ("screen", "pixelaspectratio", "pixel-aspect-ratio"),
    ("screen", "prioritywindow", "priority-window"),
    ("screen", "screenwindow", "screen-window"),
    ("screen", "staticsamplingpattern", "static-sampling-pattern"),
    ("shader", "materialxnodedef", "materialx.node-definition"),
    ("shader", "materialxversion", "materialx.version"),
    ("shader", "shaderfilename", "filename"),
    ("shader", "shaderobject", "object"),
    ("transform", "geometryattributes", "attributes"),
    ("transform", "shaderattributes", "shader-attributes"),
    ("transform", "transformationmatrix", "matrix"),
    ("vdbparticles", "enablepscale", "use-point-scale"),
    ("vdbparticles", "pointsgrid", "point-grid"),
    ("vdbparticles", "vdbfilename", "filename"),
    (
        "vdbparticles",
        "velocityreferencetime",
        "velocity.reference-time",
    ),
    ("vdbparticles", "velocityscale", "velocity.scale"),
    ("vdbparticles", "widthscale", "width-scale"),
    ("volume", "colorgrid", "grid.color"),
    ("volume", "densitygrid", "grid.density"),
    ("volume", "emissiongrid", "grid.emission"),
    ("volume", "emissionintensitygrid", "grid.emission-intensity"),
    ("volume", "temperaturegrid", "grid.temperature"),
    ("volume", "vdbfilename", "filename"),
    ("volume", "velocitygrid", "grid.velocity"),
    ("volume", "velocityreferencetime", "velocity.reference-time"),
    ("volume", "velocityscale", "velocity.scale"),
];

/// The node types the draft renames: shipped, then the draft's.
pub(super) const NODE_TYPES: &[(&str, &str)] = &[
    ("cylindricalcamera", "cylindrical-camera"),
    ("faceset", "face-set"),
    ("fisheyecamera", "fisheye-camera"),
    ("outputdriver", "output-driver"),
    ("outputlayer", "output-layer"),
    ("perspectivecamera", "perspective-camera"),
    ("vdbparticles", "vdb-particles"),
];