#[non_exhaustive]pub struct AttributeValue<'a> {
pub node: &'a str,
pub name: &'a str,
pub arg: Option<&'a OwnedArgument>,
pub priority: i32,
}Expand description
The winning definition of one attribute, gathered along a path.
Returned by Scene::attribute_value.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.node: &'a strThe node the winning definition sits on.
Usually an attributes node. For a shader attribute it can be
the geometry itself, which ɴsɪ ranks above every container.
name: &'a strThe attribute that actually won, which is not always the one
asked for: in Scene::attribute_value a visibility.<ray>
query falls back to the less specific visibility, and this is
how a backend tells the two apart.
Scene::shader_attribute_value performs no such fallback, so
there it always matches the query.
arg: Option<&'a OwnedArgument>The definition itself, or None when the winning node carries
only <name>.priority.
3Delight reads a lone ATTR.priority as a definition of ATTR
at its ɴsɪ default, and it wins on the strength of that
priority; Scene::attribute_value has the rendered evidence.
This crate does not carry ɴsɪ’s per-attribute defaults, so it
names the winner and leaves the value to the backend: None
means the default of AttributeValue::name, never
undefined.
priority: i32The ATTR.priority that selected it; 0 when none is set.