Feature(UI): add extract masked area from raster layers #8667
+155
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces a new feature: Extract Masked region as 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 and added as a new raster layer. Compared to my previous attempt, is not limited to bbox and uses mask layer bounds.
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 mask the region you would like to extract.
In the Layer Panel or on masked area, right-click the Inpaint Mask layer to open its context menu.
Select
Extract Region.Verify that:
Merge Plan
This feature is self-contained and should not introduce merge conflicts.
It reuses existing Invoke canvas and image manipulation infrastructure.
Checklist
What's Newcopy (if doing a release after this PR)