#[non_exhaustive]pub enum EdgeKind {
Show 21 variants
SceneMember,
AttributeBinding,
SurfaceShader,
DisplacementShader,
VolumeShader,
LensShader,
BackgroundLayer,
Bounds,
SubsurfaceSet,
ExclusiveShading,
FaceSet,
Weld,
Other {
to_attribute: String,
},
InstanceSource,
SetMember,
LightSet,
ShaderAttributes,
Screen,
OutputLayer,
OutputDriver,
ShaderNetwork {
from_port: String,
to_port: String,
},
}Expand description
What an ɴsɪ connection means, once classified.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
SceneMember
X -> .root "objects", or a transform chain link. Membership and
hierarchy share one ɴsɪ attribute; which one an edge is depends
on whether the destination is .root, so the recorder resolves
that when it walks the graph rather than here.
AttributeBinding
attributes -> geo "geometryattributes". The attributes node has
no counterpart in either target renderer and is dissolved at
flush time.
SurfaceShader
shader -> attributes "surfaceshader". Becomes the shape’s
material.
DisplacementShader
shader -> attributes "displacementshader".
VolumeShader
shader -> attributes "volumeshader".
LensShader
shader -> camera "lensshader". ɴsɪ: “a lens shader is an osl
network connected to a camera through the lensshader
connection”.
BackgroundLayer
outputlayer -> outputlayer "backgroundlayer".
Bounds
geometry -> attributes "bounds".
SubsurfaceSet
set -> attributes "visibility.set.subsurface".
ExclusiveShading
set -> .global "exclusiveshading".
FaceSet
set -> geometry "facesets". ɴsɪ’s own Listing 3.2.
Weld
weld -> geometry "weld". The geometry’s weld.* table declares
boundary uses in that weld node’s namespace; see
Scene::weld_table.
Other
A connection to some other attribute, carried but never interpreted.
ɴsɪ permits connecting a node to an arbitrary attribute – the
specification’s own §4.8 connects one attributes node to
another’s visibility with a "value" argument – so the set of
legal destinations is open and cannot be enumerated. Rejecting
what is not listed made legal scenes unrecordable; interpreting
it would be the guess this module exists to refuse. So it is
kept, with its name, and resolution ignores it.
InstanceSource
geo -> instances "sourcemodels".
SetMember
node -> set "members". A set node groups nodes so one
connection stands for many.
LightSet
set -> outputlayer "lightset". ɴsɪ’s documented light-set
workflow connects lights to a set, then the set here.
ShaderAttributes
shaderattributes -> geometry|transform "shaderattributes".
Screen
screen -> camera "screens".
OutputLayer
outputlayer -> screen "outputlayers".
OutputDriver
outputdriver -> outputlayer "outputdrivers".
ShaderNetwork
An attribute-to-attribute shader network edge, naming ports on both ends.
This maps 1:1 onto OSL’s ConnectShaders, which is unsurprising:
ɴsɪ was designed around OSL. Renderers whose references point at
whole objects rather than attributes need an adapter here.
Implementations§
Source§impl EdgeKind
impl EdgeKind
Sourcepub fn to_attribute(&self) -> &str
pub fn to_attribute(&self) -> &str
The ɴsɪ destination attribute this class came from.
Inverse of classify for every class but
EdgeKind::ShaderNetwork, whose destination is a port name the
caller already holds. The two must change together.
Trait Implementations§
impl Eq for EdgeKind
impl StructuralPartialEq for EdgeKind
Auto Trait Implementations§
impl Forget for EdgeKind
impl Freeze for EdgeKind
impl Move for EdgeKind
impl RefUnwindSafe for EdgeKind
impl Send for EdgeKind
impl Sync for EdgeKind
impl Unpin for EdgeKind
impl UnsafeUnpin for EdgeKind
impl UnwindSafe for EdgeKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.