forked from 1b-agent/opencadstudio-upstream
ADJUST: images and underlays, -IMAGEADJUST and PDF/DWF/DGNADJUST
ADJUST gathers raster images or PDF/DWF/DGN underlays (other objects are dropped silently, pickfirst is used, a mixed set is refused), then asks the image option (Brightness default) or the underlay option (last used), with value prompts that offer the image's own value or the session's last underlay fade/contrast, and Monochrome Yes/No. Invalid values re-prompt. One undo step. -IMAGEADJUST, PDFADJUST, DWFADJUST and DGNADJUST take one kind each. Raster image Brightness/Contrast/Fade move to an Image Adjust section as whole numbers with 0-100 validation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b1d4c9bd9b
commit
a0a83ad681
32 files changed
+841
-311
No files matched your search
@@ -507,6 +507,32 @@ impl OpenCADStudio {
|
||||
StepInput::SelectionComplete(kept)
|
||||
}
|
||||
|
||||
/// Keeps only the kinds of object the active command takes, dropping
|
||||
/// the rest of a completed selection silently.
|
||||
fn filter_command_entity_selection(&mut self, input: StepInput) -> StepInput {
|
||||
let StepInput::SelectionComplete(handles) = input else {
|
||||
return input;
|
||||
};
|
||||
let i = self.active_tab;
|
||||
let Some(keep) = self.tabs[i]
|
||||
.active_cmd
|
||||
.as_ref()
|
||||
.and_then(|command| command.selection_entity_filter())
|
||||
else {
|
||||
return StepInput::SelectionComplete(handles);
|
||||
};
|
||||
let (kept, dropped): (Vec<Handle>, Vec<Handle>) = handles
|
||||
.into_iter()
|
||||
.partition(|h| self.tabs[i].scene.document.get_entity(*h).is_some_and(keep));
|
||||
for handle in &dropped {
|
||||
self.tabs[i].scene.deselect_entity(*handle);
|
||||
}
|
||||
if !dropped.is_empty() {
|
||||
self.refresh_properties();
|
||||
}
|
||||
StepInput::SelectionComplete(kept)
|
||||
}
|
||||
|
||||
/// Drops locked point clouds from a completed selection when the active
|
||||
/// command would move them, saying which were locked and how many went.
|
||||
fn filter_locked_point_cloud_selection(&mut self, input: StepInput) -> StepInput {
|
||||
@@ -562,6 +588,7 @@ impl OpenCADStudio {
|
||||
let input = self.filter_associative_dimension_selection(input);
|
||||
let input = self.filter_block_reference_selection(input);
|
||||
let input = self.filter_locked_point_cloud_selection(input);
|
||||
let input = self.filter_command_entity_selection(input);
|
||||
// XCLIP / CLIP learn which chosen references carry a clip already.
|
||||
{
|
||||
let i = self.active_tab;
|
||||
|
||||
Reference in new issue
Block a user