-
Notifications
You must be signed in to change notification settings - Fork 2.7k
feat(ui): inpaint mask extraction to raster layer #8662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
||
| return ( | ||
| <MenuItem onClick={onExtract} icon={<PiSelectionBackgroundBold />} isDisabled={isBusy}> | ||
| Extract masked area to new layer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should use translation and get the title from en.json
Also, the current title looks a bit too long in the menu. Maybe something simpler like "Extract Region" or "Create Raster Layer".
.../src/features/controlLayers/components/InpaintMask/InpaintMaskMenuItemsExtractMaskedArea.tsx
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From a user standpoint, it's not clear that the operation is restricted to the bounding box or why that would be the case. If I have a mask that exists exclusively outside of the bbox, then this operation returns an empty raster layer without any warnings. Perhaps we can piggyback off of the Merge Visible feature to create a new raster layer of the entire canvas, and then cut that down to match the inpaint mask dimensions and alpha.
Summary
This PR introduces a new feature: Extract Inpaint Mask as a Raster Layer.
The feature allows users to extract the portion of all visible raster layers that falls within the painted Inpaint Mask. The extracted region is composited, masked, and added as a new raster layer.
The new raster layer is currently created at the top of the raster layer stack.
In an ideal workflow, it could appear directly above the active raster layer, but Invoke currently supports only one active raster layer at a time. Changing this behavior may introduce unnecessary complexity; maintainers may consider it separately.
Related Issues / Discussions
QA Instructions
Generate or import an image into the canvas so that raster layers are present.
Add an Inpaint Mask layer and paint on the mask.
In the Layer Panel, right-click the Inpaint Mask layer to open its context menu.
Select Extract Masked Area.
Verify that:
Merge Plan
Checklist
What's Newcopy (if doing a release after this PR)