Loading a mesh should fail with a package error instead of allocating unbounded vertex buffers first, matching the existing triangle limit intent.
Add a vertex-count bound checked while parsing OBJ and glTF positions so excess vertices are rejected before the full mesh is collected, with a regression test using an OBJ whose vertex count exceeds the bound but whose triangle count does not.
Test: obj_with_excess_vertices_is_rejected failed before the change and passes after.
A glTF file with NaN or infinite normals currently loads as a mesh with zero normals instead of being rejected like non-finite positions, UVs and OBJ normals.
Check raw glTF normals for finiteness before transforming them and return an error for non-finite values, matching the existing finish() checks.
Test: gltf_non_finite_normals_are_rejected failed before the change and passes after.
Co-authored-by: eliets2 <287273517+eliets2@users.noreply.github.com>
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
Replace the legacy Rust procedural library with clean-room native primitives, typed function execution and FX-Map graphs. Save supported content as native SBS and organize the model, evaluators, codecs and editors into focused modules.
Add shared graph editing behavior, flat filtered node menus, frame and comment editing, named Explorer outputs and an original atomic sample. Document the tested scope and remaining interoperability work.
Restore tracked files to 91bb53f07a, immediately before the batch, at the maintainer request. Preserve the existing history and earlier work, including PR #38. Revert the 50 reviewed PR merges and the version bump in 441092c. The published 0.1.2 release is unchanged.
Upstream's ResourceBytes and decode limits kept; decode keeps the linear flag, and the
decoded-image memo is now keyed by (content hash, linear) so sRGB and data reads of the
same file don't collide.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
decode() decoded the whole image before checking its size, so an oversized
image allocated first and was refused after. The dimensions are now read from
the header and refused before decoding, and the decoder gets width and height
limits. write_atomic syncs the temp file before the rename and uses a
per-process, per-call temp name so concurrent saves of one path do not collide.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Out-of-range indices were filtered one at a time, which shifted every later
triangle (and a glTF index count that was not a multiple of 3 shifted later
primitives). Importers now keep or drop whole triangles. Non-finite positions,
normals and UVs are rejected before normals, tangents and bounds are computed
from them; a NaN position used to hang the import.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
decode() sRGB-decoded every 8/16-bit color bitmap, so an RGB normal map
(0.5, 0.5, 1) became (0.214, 0.214, 1). decode now takes a linear flag. The
Bitmap node gets a Color space choice (sRGB by default, so existing files cook
the same) and graph input preview images can be bound as linear data maps
(graph.input.bind linear: true, stored in input_images_linear).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
load_package read a resource entry once per resource that named it, so a tiny
deflated entry plus thousands of resources could allocate hundreds of GB. Each
distinct entry is now read once and shared, the resource count and total bytes
are capped, and a missing or over-cap entry is an error instead of silently
empty data. save_package gives colliding sanitized file names a numeric suffix.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Resources carry a content hash (ResourceBytes); the decoder memo is keyed on it and pruned.
Graphs that use themselves, directly or through other instanced graphs, give an explicit error.