Repository navigation
Timeline & Graph: Constrain proportions on shape size, unified graph curves, Shift tangent snap, and New Layer context menu - #236
asheekaasheeka wants to merge 1 commit into
Conversation
asheekaasheeka
commented
Oct 8, 2026
- Constrain Proportions on Shape Layer Path Size
- File: crates/ui-egui/src/panels/timeline.rs
- Details:
- Added is_prop_linkable and is_prop_constrained helper functions.
- Linked properties now include size on LayerSource::Shape in addition to scale and mask feather.
- Displays the chain link toggle icon next to Width/Height values.
- When linked (default), scrubbing/typing Width proportionally scales Height and vice versa via constrained().
- Added unit test scale_and_shape_size_are_linkable_and_constrained_by_default.
- Continuous Rasterization for Shape and Text Layers
- File: crates/project/src/build.rs
- Details:
- build::layer() now initializes collapse: matches!(source, LayerSource::Text | LayerSource::Shape) on Switches.
- Newly created text and shape layers have Continuous Rasterization enabled by default, preventing pixelation/blurriness when scaled up.
- Added unit test shape_and_text_layers_default_to_continuous_rasterization.
- Unified Graph Editor Curves when Constrain Proportions is Active
- Files: crates/ui-egui/src/panels/graph.rs, crates/ui-egui/src/panels/graph_tools.rs
- Details:
- curves() checks super::timeline::is_prop_constrained(). If true, dims is set to 1, producing a single unified curve with unified color and handles instead of separate red/green curves.
- When dragging the tangent handle on a constrained curve, "dim" is omitted from keys.setEase params, updating speed and influence across all dimensions synchronously.
- When dragging keyframe values on a constrained curve, "dim" is omitted from keys.transform params, scaling all dimensions together.
- In transform_box(), params["dims"] is omitted when any selected key is constrained, transforming all components together.
- Tangent Handle Horizontal Snap with Shift in Graph Editor
- File: crates/ui-egui/src/panels/graph.rs
- Details:
- When dragging Bezier tangent handles (hresp.dragged()), holding Shift snaps the tangent slope to horizontal (sp = 0.0), keeping the handle level with the keyframe.
- When Shift is released, the handle rotates freely to any angle.
- "New Layer" Context Menu on Right-Click in Timeline
- File: crates/ui-egui/src/panels/timeline.rs
- Details:
- Extracted new_layer_items(ui, actions) with Text, Solid, Light, Camera, Null, Shape, and Adjustment Layer creation actions.
- Added timeline_empty_context_menu(ui, actions) bound to outline_empty.context_menu(...) (layer list empty area) and empty.context_menu(...) (track graph empty area).
- Fixed closure borrow ordering in layer_menu to avoid Rust borrow checker conflicts.
…curves, Shift tangent snap, and New Layer context menu
1. Constrain Proportions on Shape Layer Path Size
- File: crates/ui-egui/src/panels/timeline.rs
- Details:
- Added is_prop_linkable and is_prop_constrained helper functions.
- Linked properties now include size on LayerSource::Shape in addition to scale and mask feather.
- Displays the chain link toggle icon next to Width/Height values.
- When linked (default), scrubbing/typing Width proportionally scales Height and vice versa via constrained().
- Added unit test scale_and_shape_size_are_linkable_and_constrained_by_default.
2. Continuous Rasterization for Shape and Text Layers
- File: crates/project/src/build.rs
- Details:
- build::layer() now initializes collapse: matches!(source, LayerSource::Text | LayerSource::Shape) on Switches.
- Newly created text and shape layers have Continuous Rasterization enabled by default, preventing
pixelation/blurriness when scaled up.
- Added unit test shape_and_text_layers_default_to_continuous_rasterization.
3. Unified Graph Editor Curves when Constrain Proportions is Active
- Files: crates/ui-egui/src/panels/graph.rs, crates/ui-egui/src/panels/graph_tools.rs
- Details:
- curves() checks super::timeline::is_prop_constrained(). If true, dims is set to 1, producing a single unified
curve with unified color and handles instead of separate red/green curves.
- When dragging the tangent handle on a constrained curve, "dim" is omitted from keys.setEase params, updating speed
and influence across all dimensions synchronously.
- When dragging keyframe values on a constrained curve, "dim" is omitted from keys.transform params, scaling all
dimensions together.
- In transform_box(), params["dims"] is omitted when any selected key is constrained, transforming all components
together.
4. Tangent Handle Horizontal Snap with Shift in Graph Editor
- File: crates/ui-egui/src/panels/graph.rs
- Details:
- When dragging Bezier tangent handles (hresp.dragged()), holding Shift snaps the tangent slope to horizontal (sp =
0.0), keeping the handle level with the keyframe.
- When Shift is released, the handle rotates freely to any angle.
5. "New Layer" Context Menu on Right-Click in Timeline
- File: crates/ui-egui/src/panels/timeline.rs
- Details:
- Extracted new_layer_items(ui, actions) with Text, Solid, Light, Camera, Null, Shape, and Adjustment Layer creation
actions.
- Added timeline_empty_context_menu(ui, actions) bound to outline_empty.context_menu(...) (layer list empty area)
and empty.context_menu(...) (track graph empty area).
- Fixed closure borrow ordering in layer_menu to avoid Rust borrow checker conflicts.
|
Thank you for all of this! There are some genuinely nice ideas here. If you're not on our Discord yet, please join us: https://discord.gg/artcraft Please rebase onto main and split it into separate PRs:
The Shift tangent snap and the Shape Size chain link are welcome as their own PRs, with tests. |
|
@asheekaasheeka Thanks again! The head hasn't changed since the earlier review, and it now conflicts in If you're not there yet, come hang out with us on Discord: https://discord.gg/artcraft Generated by Claude Code |