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.
The properties panel's "Expose as graph input" sent the bare parameter
id as the new input's id, so exposing Opacity on a second Blend node
failed with "an input is already called `opacity`". graph.exposed.add
now accepts a bound input without an id and names it after the
parameter, kept unique (opacity, opacity_1, ...), and the menu relies on
that. An explicit id must still be free.
The W3C color-dodge formula keeps a black background black even under a
white foreground, and color-burn keeps a white background white even
under a black foreground. blend_channel checked the foreground first, so
both edge cases came out inverted.
Fixes#135
The main parameter slider already snaps to round values, but the toolbar slider does not, so the same drag cannot land on exact values there.
Apply the same aim-radius smart_aim calculation used by slider to bar_slider, and add a drag test through the existing slider harness that aims near a round value on a bar slider.
Test: bar_slider_drag_reaches_exact_round_values failed before the change and passes after.
A dot is 14 units wide with a port on each edge, and each port's 9 px
hit circle covered the whole dot, so pressing it started a wire (or did
nothing) instead of moving it unless the view was zoomed in. The dot's
body now wins over its ports, and its grab area keeps a 16 px minimum
on screen. Wires still start from just outside the dot.
Fixes#100
A panicking cook or control command should become an error reply and toast, not crash the app and lose unsaved work.
Make guard report a non-empty unknown-panic message for non-string payloads, and wrap control dispatch and session.inspect cooking with guard so panics are caught in the worker, app, and control paths.
Test: guard_reports_unknown_panic_payload_instead_of_empty failed before the change and passes after.
Data maps read as sRGB get the wrong values when a material is exported, shifting normals and scalar maps.
Choose the decode color space from the input node's usage (linear for non-sRGB usages, sRGB otherwise) when reading input bitmaps in export_material, with a regression test using a mid-gray data input.
Test: export_material_decodes_data_inputs_as_linear failed before the change and passes after.
An export that collides with a file already in the destination currently overwrites it without warning, losing the existing file. Rejecting the collision before writing protects existing files and makes the failure explicit.
Check every target path in the destination directory before creating or writing any output, and return a file.export error naming the colliding filename if one already exists. Add a regression test that places a sentinel file at an output name, runs file.export with unique identifiers, and asserts the export fails and the sentinel is unchanged.
Test: export_rejects_existing_file_in_destination_before_writing failed before the change and passes after.
Callers setting a displacement depth expect the height relief to change, but today it is silently ignored unless the HQ flag is also set.
Use the requested displacement depth whenever it is provided, falling back to the view height_scale only when it is absent, and add a regression test rendering with and without displacement and without hq.
Test: render_displacement_applies_without_hq failed before the change and passes after.
* Keep typed graph name and attribute text across frames
Typing a graph name or attribute currently loses the text between frames, so the edit never reaches the engine command on focus loss. Persisting the draft across frames, as the slider and preset name already do, makes the edit commit correctly.
Store the in-progress graph name and attribute text in temporary UI data while editing, like presets_bar does, and commit the stored text on lost_focus. Add a harness test that types a new graph name across several frames, moves focus away, and asserts the renamed graph.
Test: graph_name_typed_across_frames_commits_on_focus_loss failed before the change and passes after.
* Graph properties: a draft field's id salt is a string
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: eliets2 <287273517+eliets2@users.noreply.github.com>
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Restore modified flag when undoing to saved state
Undoing every edit should return the session to its saved, unmodified state so the unsaved-work prompt is not shown spuriously.
Make undo and redo preserve the restored snapshot's modified flag while still marking the graph dirty for cooking, and add a regression test that edits from a clean session and undoes to assert modified is false.
Test: undo_to_unmodified_state_clears_modified_flag failed before the change and passes after.
* Tests: add a node that exists on main
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: eliets2 <287273517+eliets2@users.noreply.github.com>
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Users switching to 4K previews saw stale low-resolution textures in the 2D view.
Include image dimensions in the texture cache key so a size change reloads the texture at the new resolution.
Test: four_k_preview_refreshes_texture_after_size_change 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>
Clients cannot tell a refused non-UTF8 request from a dropped connection, unlike malformed JSON which gets an explicit error reply.
Make the TCP control servers reply with an error for non-UTF8 lines, closing before auth and continuing after auth like bad JSON.
Test: non_utf8_line_before_auth_gets_refusal_reply 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>
A hostile file or binding could supply an out-of-range enum or degenerate-range numeric value that reaches a cook unclamped, breaking the hard-limits guarantee for node parameters.
Make clamp_params bound enum values even with no options and bound numeric values even when min is not below max, using the same hard-span limits as other parameters.
Test: clamp_params_bounds_enum_without_options 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>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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>
* Hash bound input-image resources into graph instance cache keys
A graph instance can show a stale preview image after its bound bitmap resource is replaced, because the instance cache key never changes. Hashing those resources makes the instance re-cook when the bitmap changes.
Include the content hashes of resources referenced by graph.input_images (and their linear flags) in graph_tree_hash, and add a regression test that cooks an instance, replaces the bound resource bytes, and asserts the new image is cooked instead of the cached one.
Test: bound_input_image_resource_change_recooks_instance failed before the change and passes after.
* Address review for pull request 110
---------
Co-authored-by: eliets2 <287273517+eliets2@users.noreply.github.com>
Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>