#[non_exhaustive]pub enum GltfScaleRewriteError {
Show 18 variants
Capability {
violations: Vec<GltfCapabilityViolation>,
count: usize,
},
Plan(ScaleError),
Load(LoadError),
Write(WriteError),
UnhandledLengthField {
location: String,
},
ConflictingRewriteRule {
accessor_index: usize,
},
UnrewritableAccessor {
accessor_index: usize,
location: String,
},
ConflictingNodeTransform {
location: String,
},
NonAffineNodeMatrix {
location: String,
value: f64,
expected: f64,
},
ImagePayloadOverlap {
location: String,
accessor_index: usize,
},
UnreassemblableContainer {
reason: &'static str,
},
ValueNotRepresentable {
location: String,
value: f64,
},
ConflictingRestBindFactor {
accessor_index: usize,
element: usize,
first_location: String,
first_factor: f64,
second_location: String,
second_factor: f64,
},
ClosureMismatch {
planned: Vec<usize>,
derived: Vec<usize>,
},
ParentChainDisagreement {
source_node_index: usize,
},
AmbiguousSourceNodeProjection {
bone: BoneId,
},
UnusableSourceHierarchy {
reason: &'static str,
},
ArtifactProofFailed {
claim: &'static str,
observed: f64,
tolerance: f64,
raw_json_differences: Option<GltfRawJsonDifferenceSummary>,
},
}Expand description
Typed, fail-closed rejection from rewrite_linear_units or
prove_rewritten_artifact.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Capability
The source’s raw capability manifest declares a domain the rewrite cannot preserve or convert.
Fields
violations: Vec<GltfCapabilityViolation>Deterministically ordered typed violations.
Plan(ScaleError)
Shared core planning or proof rejected the request.
Load(LoadError)
The source or the rewritten artifact could not be read.
Write(WriteError)
The rewritten container could not be emitted.
UnhandledLengthField
A length-bearing member has no registered field handler, so its value would be left in the source unit while everything around it moved.
ConflictingRewriteRule
Two logical uses of one accessor disagree on how it converts.
UnrewritableAccessor
An accessor selected for rewriting is not the dense f32 layout the
preflight vouched for.
ConflictingNodeTransform
A node declares matrix alongside a TRS member. glTF 2.0 forbids the
combination, and the gltf crate accepts it, so the conversion would
otherwise emit two rewrites for one node’s single transform.
NonAffineNodeMatrix
A node matrix is not TRS-decomposable: its last row is not
(0, 0, 0, 1), so it carries a projective component that transforms
as 1/q rather than staying dimensionless under U M U^-1.
Fields
ImagePayloadOverlap
An image reads a buffer view overlapping an accessor the conversion
rewrites, so converting would corrupt the image payload.
#280’s inspect_accessor_layouts ranges accessors only, so an image
buffer view is invisible to its disjointness proof.
Fields
UnreassemblableContainer
The source container cannot be reassembled without inventing a buffer-to-chunk mapping.
ValueNotRepresentable
One converted element has no usable f32 image: the product is not
finite, or a nonzero product flushed to zero.
Fields
ConflictingRestBindFactor
Two logical uses of one accessor demand different rest/bind factors, so no single rewrite of that accessor can satisfy both.
This is a fail-closed domain #280 does not produce. Its aliasing guard
is a two-value classification — scale-bearing versus dimensionless —
and fires only on the cross; the scale-bearing/scale-bearing cross is
accepted, correctly, because a whole-document conversion multiplies
every such use by the same q. Under a rest/bind reparameterization
the multiplier differs per node and per skin slot, so the same sharing
makes “rebase affected translation animation values” and “preserve
declared unaffected payloads” simultaneously unsatisfiable. The
manifest is clean and the file is valid glTF; it is the plan that
makes the sharing unsatisfiable.
Splitting the accessor is not the remedy: it would change the
accessors and bufferViews array lengths and destroy the array
identities the artifact proof pins. Both claimants are named so the
source can be fixed instead.
Fields
ClosureMismatch
The affected closure derived from the raw node hierarchy is not the
closure animsmith_core::scale::plan_scale planned.
The plan walks SourceNodeAsset::parent_source_node_index; this crate
walks /nodes/*/children. animsmith_core requires the projection to
agree with the normalized skeleton, but it never sees the raw child
arrays, so a projection that contradicts the JSON it was derived from
plans, builds and proves cleanly there.
Fields
ParentChainDisagreement
A node’s parent in the normalized skeleton is not its parent in the raw node hierarchy, so the two disagree about which nodes inherit the factor being removed.
AmbiguousSourceNodeProjection
Two source nodes claim the same normalized animsmith_core::BoneId,
so the plan’s bone-keyed closure cannot be resolved back to a unique
source node to rewrite.
UnusableSourceHierarchy
The raw node hierarchy cannot support the requested closure.
ArtifactProofFailed
An artifact-level proof claim failed.
Fields
raw_json_differences: Option<GltfRawJsonDifferenceSummary>Bounded, value-free locations for a raw JSON preservation failure.
Every other artifact proof claim carries None because its
existing typed fields already identify the failed obligation.
Trait Implementations§
Source§impl Debug for GltfScaleRewriteError
impl Debug for GltfScaleRewriteError
Source§impl Display for GltfScaleRewriteError
impl Display for GltfScaleRewriteError
Source§impl Error for GltfScaleRewriteError
impl Error for GltfScaleRewriteError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()