Feature/paint boolean ops - #8917
Conversation
b432be2 to
7168ed1
Compare
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
27c66df to
aec01e3
Compare
There was a problem hiding this comment.
Everything (almost) works! Amazing addon. I'm super impressed with the code inside and how this handles the edge cases.
Bugs:
- Alt drag should duplicate an object and drag the duplicate only, but alt drag on a shape with a hole, duplicates and drags both parts.
- if you click an object and then deselect it by clicking itself with shift (or sometimes ctrl) held down, the boolean operations will be grayed out the next time you click a shape. This doesn't always happen, but it is reproducible.
Ux change:
Personally the functionality of combine/release/expand is not clear without reading the PR description. In the addon description could you describe the different boolean features? Also maybe the tool tip could give some info.
This comment was marked as off-topic.
This comment was marked as off-topic.
This is actually a Scratch bug - If you import any SVG with a compound share, alt dragging it will show a similar issue - It's also present in Penguin Mod and other costume editors. However, I hate that bug too and I've found a solution so I've included a patch to Scratch's paint editor bug in this addon (can be turned off if wanted with a toggle)
I've not been able to reproduce this one myself yet.
Agreed... I just didn't want to over-do it with lots of explanation text. I'll have a think |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
…ubtract default to punch-through
This PR is completely unrelated to PenguinMod, he stated he wasn't aware of the mod till now. This is a completely original implementation. Please stop bugging him. |
1919d89 to
5fcb8a4
Compare
pufferfish101007
left a comment
There was a problem hiding this comment.
This is very exciting. I've left some comments, primarily regarding code style. I think the standard is for class selectors to be written as [class*="class_class-name_"] with a trailing underscore but I didn't make a comment for every occurrence. I trust that the various algorithms work!
- Remove dead #PRE_BLUR and #DEBUG flags and their branches - Remove redundant bare block scopes - Add style.css for dropdown static styles (move from inline cssText) - Replace all setTimeout(updateButtonStates,50) with deferUpdateButtonStates() using double-rAF - Add comment explaining why the defer is needed - Remove '-- Private --' comment that was inaccurate - Add RDP comment explaining 1e-10 guard and fallback - Use class*= with trailing _ for CSS module selectors - Update mode-tools selectors to use trailing _
776e9ec to
453a110
Compare
|
I tested it and It felt like PenguinMod's. |
pufferfish101007
left a comment
There was a problem hiding this comment.
Thanks for doing the menu collapsing - it really makes a difference for small screens. It is not cleared up when the addon is dynamically disabled but that doesn't affect normal reusability at all, and will probably be a very rare occurrence in the wild.
Overall looks good to me; as usual, my approval doesn't count towards the required number, but I'll give an approving review anyway.
|
I have just noticed that @Samq64's concerns re. compact editor compatibility from #8917 (comment) haven't been addressed |
|
Wihtout With |
I have separated off the toolbar integrating code from the main addon code which is a big code quality improvement. And have reworked that scripting to be more resilient. It should now collapse and expand robustly as well as react to enabling / disabling consistently. Thanks for your bug reports! |
|
I have not re-tested yet but one more minor thing from yesterday: with |
This isn't an issue with this extension, but would require a change to the editor-compact addon I believe? |
mxmou
left a comment
There was a problem hiding this comment.
I have a few suggestions for the addon's presentation on the settings page.
|
Thanks, I have made the requested wording changes in 392da5b. The description and info text now use full sentences, the Expand text uses Scratch's outline wording and explains the fill edge, and there is a notice that the buttons may move into the More menu on smaller screens. I also brought the tooltips into line with the same wording. JSON and whitespace checks pass. |
|
Just noticed that the PR description mentions the "Open / Close Path" tool, which isn't mentioned in the addon description. Could some explanation of that be added too, preferably with a more scratch-friendly name? |
|
I made a small change to have the correct bounding box drawn after a boolean operation |
…name from Open/Close Path, add tooltips
Quite right - I've changed the label and added tooltips |
|
So nearly there! Unfortunately it looks like d2f7547 sometimes overcompensates (by quite a lot!) 2026-08-03.19-26-10.mp4(I checked and that commit is the culprit) If I fully ungroup all of the subgroups by pressing the ungroup button again, the bug doesn't occur. |
Oh wow - you are great at finding gotchas! - This wasn't a bug in the latest commit, but it did reveal a bug that I hadn't tracked down previously but had seen... that when you combine shapes, sometimes it just didn't look right... It was combining shapes with nested groupings, the nested transformations were not being undone so some of the inner shapes got transported far away! hence the weird selection you saw! I've patched this and WOW does the combine look so much better now! Thanks for spotting that! |
|
Hopefully final things (all of which I'm happy to push):
|
Done |
Changes
Adds a new Boolean shape operations addon to the vector costume editor.
A Shaping section is injected into the editor toolbar with two layout modes: inline (wide toolbar, five buttons sit directly in the bar) and collapsed (narrow toolbar, a single trigger button opens a hover dropdown panel).
Operations added:
Additional details:
Reason for changes
The vector costume editor has no boolean shape tools. Creating complex shapes — cutouts, compound letters, logos, overlapping fills — requires tediously cutting paths by hand with the Reshape tool. Every professional illustration app (Illustrator Pathfinder, Inkscape Path menu, Figma boolean groups) provides these operations as first-class features. This addon brings the full set directly into the editor toolbar.
Tests
Tested in Chrome: