Commit graph

1958 commits

Author SHA1 Message Date
Keavon Chambers
a8e209e44c
Remove the old node macro and fix/clean up several raster nodes (#2650)
* Fix several broken raster nodes and clean up leftover old node system code

* Migrate Brightness/Contrast to the new node macro, and fix it

* Remove last usages of old_node_fn

* Remove old_node_fn
2025-05-17 21:24:32 -07:00
Keavon Chambers
77f8bfd9ed Improve clarify of type errors and tooltip diagnostics 2025-05-17 16:13:05 -07:00
0SlowPoke0
6e7f218068
Add Path tool support for Ctrl-dragging to pull out zero-length handles with angle locking (#2620)
* implement check-drag and angle-lock

* track bool

* flip-smooth-sharp

* fixed bugs

* fixed flip-smooth jump bug and random angle locking bug

* ctrl-alt 90 case

* aligned flip-smooth sharp and fixed arbitrary handle-length when flipped

* code-review change

* 0.5 instead of 0.8

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-05-17 13:23:11 -07:00
Priyanshu
54b4ef145c
Refactor the 'Scatter Points' node to use Kurbo instead of Bezier-rs (#2634)
* it works!

* clean up

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-05-13 06:26:43 +00:00
Keavon Chambers
5861e635fb Copy Poisson-disk algorithms from Bezier-rs into gcore vector algorithms 2025-05-12 22:34:37 -07:00
Keavon Chambers
d3b5dc5712
Clean up 'Image' node by removing old 'Cull' node in sub-network (#2643)
* Clean up 'Image' node by removing old 'Cull' node in sub-network

* Fix gamma correction on Decode Image node
2025-05-12 18:40:48 -07:00
Priyanshu
0022680336
Avoid memory allocation when precomputed segments lengths is provided. (#2637)
* Avoid allocating a Vec when precomputed segments lengths is provided.

* improved using option type.

* we don't even need option type as Vec::new() doesn't allocate.

* clean up
2025-05-11 08:21:41 -07:00
mTvare
c9984a8f1a
Make Select tool hover overlay in 'shallow select' mode visualize the next deeper object (#2639)
* Fix overlay behaviour on hovering over a layer

* Add the deepen overlay code

* cleanup
2025-05-11 07:53:38 -07:00
mTvare
4487020efb
Fix skew triangles showing up when transform cage isn't selected (#2638)
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-05-09 00:49:48 -07:00
Keavon Chambers
db34ac3f53 Refactor some vector nodes to use loops instead of one_instance, as a start to #1834 part 6 2025-05-08 23:56:10 -07:00
Keavon Chambers
a6ff221c1e Fix overlay clearing regression from #2521 with high-DPIs
Closes #2628
2025-05-08 16:48:49 -07:00
Priyanshu
916cca4a63
Fix a comment introduced in the previous commit (#2631)
fix comment
2025-05-06 10:03:31 +00:00
Priyanshu
1427fb93f9
Refactor the 'Sample Points' node to use Kurbo instead of Bezier-rs (#2629)
* fix naming

* refactor sample_points node/function.

* avoid recalculating segments length to find point on bezpath.

* cleanup

* rename few variables

* fix transformation and use precomputed segment lengths

* write comments

* set POSITION_ACCURACY and PERIMETER_ACCURACY to smaller value to get better approximate euclidean position on a path

* fix segment index when t value is 1.0

* Improve comments

* move sampling points code into a separate function

* it works! finding the segment index is linear now!

* small fix and improve variable names & comment

* Naming

* evaluate segment at t as euclidean distance. fix.

* improve comment & variable name

---------

Co-authored-by: indierusty <priyaayadav@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-05-06 09:25:45 +00:00
kythyria
9ef9b205d9
Auto-generate enum type widget boilerplate for radio buttons and dropdown menus (#2589)
* First draft of factoring out the dropdown boilerplate

* Add proc macro for enum boilerplate

* Detect whether to say `crate` or the name

* Clean up the input and naming of the enum macro

* Rename a file

* Do the rename of code too

* Use the attribute-driven selection of radio vs dropdown

* Add a metadata struct and tooltips

* Move the new traits to a better place.

* Use ChoiceType, part 1

* Use ChoiceType, part 2

* Introduce a builder API for choice widgets

* Start using the new new API

* DomainWarpType should be a dropdown still

* Handle the case where a node property can never have a socket

* Rustfmt

* Code review

* Update stable node IDs in test

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-05-01 04:14:26 -07:00
mTvare
9303953cf8
Update #[min/max] node macro attributes to #[soft/hard]_[min/max] and make them clamp their input data (#2464)
* Fix min and max macro not enforcing limits when data flows

* Use trait based clamping

* Remove min/max from testing

* cargo fmt

* Resolve into min, and hard_min

* cargo fmt

* fix traits

* cargo fmt

* fix tests

* rename as soft_x

* Add validation code

* Clean up (not compiling because of DVec2 clamping)

* Avoid needing to add trait bounds to node definitions

* Code review

---------

Co-authored-by: Dennis Kobert <dennis@kobert.dev>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-04-30 23:52:27 -07:00
Sidharth-Singh10
2fc4896d01
Add tests for the Freehand tool (#2599)
* Add tests for freehand tool

* add test: line weight affects stroke width

* refactor
2025-04-30 19:53:59 +00:00
seam0s-dev
1a81e45673
Add the settings popover menu for the Overlays toggle (#2523)
* Added granular overlays control based on features

* Added basic support for pivot, path, anchors and handles overlay settings

* Added more overlay checks on anchors and handles

* Add new settings over measurements, hover and selection overlays

* Fix errors introduced while rebasing

* Disable anchors and handles functionality with their overlays, extended selection outline check

* Add check to enable/disable outlines on selected layers

* Toggle handles checkbox in sync with anchors checkbox

* Refactor overlays checks

* Remove debug statements

* Update select_tool.rs to resolve conflict

* Minor fix to reflect anchor checkbox state on the handles

* Minor fix to make anchors checkbox work

* Rearrange menu items, and code review

* Fix pivot dragging

* Add handles overlay check when drawing with pen tool

* Fix constrained dragging when transform cage is disabled

* Fix deselecting user selection when anchors are disabled

* Minor fix for disabling anchors

* Remove All from OverlaysType

* Remove debug statements

* Fix editor crash when selecting other layers with path tool and anchors disabled

* Minor fix on overlays check for all overlays

* Add proper code formatting

* Nits

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-04-30 04:15:46 -07:00
Adam Gerhant
1f7a9188ba
Improve the speed of SVG importing due to node positioning (#2625)
Fix slow svg import

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-04-30 03:38:09 -07:00
Mohamed Osama
0a65e570a9
Add snapping for a line's midpoint when it's being drawn (#2594)
* line midpoint snapper

* Add to snap option menu

* remove being_drawn_line_midpoint

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-04-30 05:12:04 +00:00
Priyanshu
d5cb380328
Refactor the 'Position on Path' and 'Tangent on Path' nodes to use the Kurbo API (#2611)
* rough refactor of Position on Path node

* refactor

* refactor 'Tangent on Path' node implementation to use kurbo API

* Code review

---------

Co-authored-by: indierusty <priyaayadav@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-04-29 21:51:10 -07:00
Boyu Dai
12896a2407
Fix node deletion being too greedy (#2619)
fix too greedy node deletion search

Co-authored-by: CaligulaAlucard <caligulaalucard@localhost.localdomain>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-04-30 04:22:17 +00:00
mTvare
90be1f42c6
Fix 'Shallow Select' mode behavior for selection context transference (#2604)
* Fix ancestor always returning None during shallow select

* Fixes

* fix shift remove on both

* cleanup

* one more cleanup

* final(?) fix

* some cleanup

* more stuff

* make shallow the default

* fixes

* fix

* fix

* fix

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-04-30 03:24:48 +00:00
Calvin
23b2c5bdf2
New node: Blur (#2477)
* Implementation of gaussian blur and box blur with linear/nonlinear colorspace in raster category

* styling/formatting

* Partial code review

* remove image crate, use conversion functions from color.rs

* fix box blur checkmark, fix linear/gamma conversion

* mult/unmult alpha before/after blur

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-04-30 02:47:46 +00:00
Adesh Gupta
da38f672ae
Insert point on segment by clicking once (no more sliding) and Alt+click to delete a segment (#2495)
* segment overlay change

* Segment split and delete

* Cleanup

* graceful handling of edge cases

* Moved constants to conts.rs and tuned the threshold

* Remove going into another state

* Insert point mode cleanup

* Linting fix

* Code review

* Added hints

* Added field for delete segment

* Change controls and fix too far logic

* Fixes

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-04-30 01:03:24 +00:00
Mohamed Osama
478ace3349
Fix a layer's transform being reset when it's reordered within its same parent (#2624)
Fix layer transform reset when being reordered within the same group/parent
2025-04-29 15:48:08 -07:00
Keavon Chambers
80b8df8d42 FIx the 'Morph' node to not fail on topology changes like holes 2025-04-29 04:49:08 -07:00
Sidharth-Singh10
0c3cae2ba5
Add Spline tool tests for drawing within a transformed artboard (#2575)
* Add Spline tool tests for drawing within a transformed artboard

* Refactor spline tool test to use click_tool and add draw_spline helper method

* refactor asserting point positions

* Fix decimal fomat

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-04-25 14:01:48 +00:00
Keavon Chambers
d445bffe31 Add donation callouts in-app and on the site 2025-04-25 00:13:24 -07:00
Rahat
2dee47a6ee
Add Spline tool test for drawing with PTZ applied to the canvas view (#2573)
* Adding tests for spline PTZ

* Some refactoring

* Feedback applied from James

* Unnecessary changes

* refactor with current merged pr

* Code refactoring based on guidelines

* cli failing
2025-04-24 20:39:33 +01:00
Keavon Chambers
e60a9c36d8 Update the website roadmap 2025-04-24 06:11:37 -07:00
Keavon Chambers
471ef87801 Add reference point input to the Mirror node 2025-04-24 05:33:20 -07:00
0SlowPoke0
d39308c048
Add Path tool feature for angle locking upon pressing Ctrl while dragging handle over anchor (#2612)
* almost_fixed

* fix need to refactor

* fixed issed need to refactor

* refactor-done fixed issue

* move function to common_functionality

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-04-23 20:39:14 -07:00
Mateo
3d37ef79ac
Add shape fill overlays when closing a path (Pen tool) or filling it (Fill tool) (#2521)
* Make the Pen tool show a path being closed by drawing a filled overlay when hovering the endpoint

* Add to_css to color.rs

* Check before unwrapping layer

* Close if in the right place

* Fix typo

* Format code

* Support discontinuous paths for closing preview

* Code review

* Denser fill lines

* Fill tool preview with strip lines only and revert pen shape-closing opacity

* Small adjustments to fill preview

* Fix line width of fill preview

* Use a pattern to preview the fill tool and fix canvas clearing

* Update pattern

* Simplify code

* Format code

* Use secondary color to preview fill if shift is pressed

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-04-23 18:33:08 -07:00
0SlowPoke0
a4a0e110d7
Improve Pen tool behavior to less aggressively delete single-point layers (#2605)
* add single-anchor-place

* clippy_changes

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-04-23 11:45:51 +00:00
Keavon Chambers
ac9fb2b02d
Improve instancing nodes (make them output group data, add 'Instance Repeat', fix Flatten Vector Elements click targets, and more) (#2610)
* Improve instancing nodes (make them output group data, add 'Instance Repeat', fix Flatten Vector Elements click targets, and more)

* Fix test?

* Fix more tests?

* Fix moar test??

* Clean up instance method naming
2025-04-22 17:55:57 -07:00
Priyanshu
a29802de36
Refactor the Solidify Stroke node implementation to use the Kurbo API (#2608)
* impl append_bezpath method to push a kurbo bezier path to vector data.

* refactor stroke_bezier_paths method and StrokePathIter iterator implementation

* refactor

* impl VectorData method to get strokes iterator of kurbo bezpath

* impl solidify stroke node

* refactor

* use StrokeOptLevel::Optimized for generation stroke fill

* add miter limit and dashes

* fix naming

---------

Co-authored-by: indierusty <priyaayadav@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-04-22 08:32:58 +00:00
Keavon Chambers
5e0e11b4c1 Update the UI colors of the node graph data types 2025-04-20 17:37:21 -07:00
James Lindsay
704dad4f76
Fix angle logic in the Grid node to allow slanted isometric grids (#2602)
* Fix angles

* Fix hardcoded index

* More information on monitor nodes
2025-04-20 14:16:27 -07:00
Priyanshu
dd1feee734
Replace Bezier-rs use in the 'Offset Path' node with a Kurbo algorithm (#2596)
* minimally replace bezier-rs use in Offset Path node implementation with kurbo's API

* fix kurbo import

* refactor

* Code review

---------

Co-authored-by: indierusty <priyaayadav@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-04-20 04:04:28 +00:00
Keavon Chambers
a376832480
Fix and improve robustness of node/parameter tooltip plumbing; simplify properties row widget boilerplate (#2600)
* WIP

* WIP2

* Further cleanup
2025-04-19 20:25:36 -07:00
Sidharth-Singh10
6196dbff95
Add Gradient tool test for select and delete removes a stop (#2571)
* Add Gradient tool test for select and delete removes a stop

* refactor fills and double click into functions

* refactor
2025-04-19 16:00:59 -07:00
Rahat
b45f7ef0c7
Add Line tool tests for drawing within a transformed artboard (#2572)
* Adding tests for artboard with transform

* Hypercube changes suggested
2025-04-19 17:44:27 +01:00
Rahat
1a5bef1d13
Add layer tree tests for moving layers with transform (#2585)
testing layer tree 5th checkpoint implementation
2025-04-19 00:43:17 -07:00
Sidharth-Singh10
73d12bcb82
Add tests for Spline tool to support continuing a previously drawn spline (#2591)
* Add tests for Spline tool to support continuing a previously drawn spline

* refactor
2025-04-18 22:24:35 +00:00
Rahat
0877c75959
Add layer tree tests for folder movement checking into child (#2580)
* testing parent child folder

* changes
2025-04-18 14:41:48 -07:00
ilya sheprut
adfcff7599
New node: Arc (#2470)
* init

* add closed and slice options

* Make it work beyond -360 to 360 degrees

* Switch "closed" and "slice" to ArcType enum

* Update default ranges

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-04-18 09:42:07 +00:00
0SlowPoke0
33de539d6d
Fix Pen tool unable to combine multiple selected paths by extending their endpoints or mesh points (#2570)
* fixed issue

* merge-layers

* node-graph-autopanning-wire

* store the layer whne created instead of querying

* fix layers temporarily geting deselected while exteneding path

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-04-18 00:18:39 -07:00
mTvare
29e8e8bdac
Fix Shift-drag axis color inconsistency and pivot not being draggable with a zero-width bounding box (#2593)
* Fix axis colors not being consistent and pivot not being draggable with zero width boxes

Fixes #2311

* Even for path
2025-04-17 13:45:08 -07:00
Keavon Chambers
41fe46591a Update the parameter expose button in the Properties panel and fix undo history when it's clicked 2025-04-17 06:29:38 -07:00
Utsav Singh
7cb16a8bec
Fix Path tool behavior with Shift-dragging an already selected point, where it wrongly got deselected (#2395)
* Send path tool FSM to Dragging state on MouseDown if clicking selected point

* Cleanup

* Store selected point state before new selection is made and setup deselect logic

* update previously saved point data on every point selection

* Decide whether to deselect or select on extended_select if node not already selected,  when DragStop state is reached instead of inside the  mouse_down function.

* Fix broken merge and remove leftover debug statements

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-04-17 02:57:56 -07:00