mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-12-05 13:32:45 -05:00
3D: Raster Settings OK sets the objects the dialog opened on
Raster Settings opened with the selected objects' render settings, but OK applied the edited values to whatever was selected at OK time. An object selected while the dialog was open took settings it was never shown. OK now sets the objects selected when the dialog opened. When the document is no longer the active one, was reverted, had an Undo or Redo, or one of those objects was changed, deleted, locked or hidden, OK keeps the dialog open with the reason.
This commit is contained in:
1 parent
534291eb8f
commit
8ff9964b13
6 files changed
+230
-34
No files matched your search
@@ -124,6 +124,8 @@ Ranked; detail in [docs/roadmap.md](docs/roadmap.md) and [docs/gaps.md](docs/gap
|
||||
|
||||
## Progress log
|
||||
|
||||
- 2026-12-04: Raster Settings OK edits the objects selected when the dialog opened. It keeps the dialog open with the reason if its document is not active, was reverted or had an Undo or Redo, if a target was changed, deleted, locked or hidden, if another edit is in progress, or if the change is refused. Headline numbers unchanged.
|
||||
|
||||
- 2026-12-03: View › Show Curvature Comb (`view.curvatureComb`) draws the curvature comb of the selected paths and compound paths: teeth along the normal as long as the curvature, and a line through their tips that starts again where the path turns back on itself at a cusp, a straight segment included (#10659). Headline numbers unchanged.
|
||||
|
||||
- 2026-12-02: The desktop Print dialog looks up installed printers in the background. Named printers become selectable after the lookup returns and the dialog applies the list. PDF File is available at once. Physical printing waits for the list to be applied, and Done can save settings while the lookup runs. The dialog shows and announces discovery and disables physical Print until the list is applied.
|
||||
|
||||
@@ -1791,6 +1791,119 @@ fn raster_settings_rendered_warning_reaches_the_status_bar() {
|
||||
assert_eq!(panel.app().ui.status, vectorcraft_effects::rendered::TOO_LARGE);
|
||||
}
|
||||
|
||||
/// Raster Settings OK sets the objects the dialog opened on: an object selected after it opened
|
||||
/// keeps its render settings.
|
||||
#[test]
|
||||
fn raster_settings_ok_keeps_the_objects_it_opened_on() {
|
||||
use craft::ui::dialog::dialog_id;
|
||||
|
||||
use crate::tests::panel_harness::Panel;
|
||||
|
||||
let (mut app, a, b) = two_renders();
|
||||
app.run("select.set", json!({"ids": [b]})).unwrap();
|
||||
let a_before = render_of(&app, a);
|
||||
let mut panel = Panel::new(app, show_with_dialogs);
|
||||
panel.frame();
|
||||
panel.click("Render Settings");
|
||||
panel.click("Raster Settings…");
|
||||
panel.frame();
|
||||
let (dialog, ctx) = (dialog_id(super::raster::KIND), panel.ctx().clone());
|
||||
panel.app().run("select.set", json!({"ids": [a]})).unwrap();
|
||||
panel.app().dialogs().unwrap().with(|host| host.set_json_field(&ctx, dialog, "resolution", json!(300))).unwrap();
|
||||
panel.app().dialogs().unwrap().with(|host| host.confirm_by_id(&ctx, dialog));
|
||||
panel.frame();
|
||||
panel.frame();
|
||||
assert_eq!(render_of(&panel.app(), a), a_before, "the object selected after the dialog opened keeps its settings");
|
||||
assert_eq!(render_of(&panel.app(), b)["resolution"].as_f64(), Some(300.0), "OK sets the object the dialog opened on");
|
||||
}
|
||||
|
||||
/// After an Undo while Raster Settings is open, OK keeps the dialog open and changes nothing: the
|
||||
/// objects it opened on may no longer be the ones with their ids.
|
||||
#[test]
|
||||
fn raster_settings_ok_is_refused_after_undo() {
|
||||
use crate::tests::panel_harness::Panel;
|
||||
|
||||
let (mut app, a, b) = two_renders();
|
||||
app.run("select.set", json!({"ids": [b]})).unwrap();
|
||||
let mut panel = Panel::new(app, show_with_dialogs);
|
||||
panel.frame();
|
||||
panel.click("Render Settings");
|
||||
panel.click("Raster Settings…");
|
||||
panel.frame();
|
||||
panel.app().run("edit.undo", json!({})).unwrap();
|
||||
assert_refused(&mut panel, a, b);
|
||||
}
|
||||
|
||||
/// An object locked while Raster Settings is open keeps its settings: OK keeps the dialog open.
|
||||
#[test]
|
||||
fn raster_settings_ok_is_refused_after_a_lock() {
|
||||
use crate::tests::panel_harness::Panel;
|
||||
|
||||
let (mut app, a, b) = two_renders();
|
||||
app.run("select.set", json!({"ids": [b]})).unwrap();
|
||||
let mut panel = Panel::new(app, show_with_dialogs);
|
||||
panel.frame();
|
||||
panel.click("Render Settings");
|
||||
panel.click("Raster Settings…");
|
||||
panel.frame();
|
||||
panel.app().run("object.lock", json!({})).unwrap();
|
||||
assert_refused(&mut panel, a, b);
|
||||
}
|
||||
|
||||
/// Raster Settings OK keeps another object's preview in progress and leaves its undo history unchanged.
|
||||
#[test]
|
||||
fn raster_settings_ok_is_refused_during_another_preview() {
|
||||
use craft::ui::dialog::{HeldOk, dialog_id};
|
||||
|
||||
use crate::tests::panel_harness::Panel;
|
||||
|
||||
let (mut app, a, b) = two_renders();
|
||||
app.run("select.set", json!({"ids": [b]})).unwrap();
|
||||
let mut panel = Panel::new(app, show_with_dialogs);
|
||||
panel.frame();
|
||||
panel.click("Render Settings");
|
||||
panel.click("Raster Settings…");
|
||||
panel.frame();
|
||||
panel.app().run("select.set", json!({"ids": [a]})).unwrap();
|
||||
let before = panel.app().session.active().unwrap().doc.node(vectorcraft_doc::NodeId(a)).unwrap().clone();
|
||||
panel.app().session.begin_interaction("Change fill").unwrap();
|
||||
panel.app().session.preview("paint.setFill", &json!({"color": "#00ff00"})).unwrap();
|
||||
let preview = panel.app().session.active().unwrap().doc.node(vectorcraft_doc::NodeId(a)).unwrap().clone();
|
||||
assert_ne!(preview, before, "the other object has a previewed edit");
|
||||
let history = undo_len(&panel.app());
|
||||
assert_refused(&mut panel, a, b);
|
||||
let dialog = dialog_id(super::raster::KIND);
|
||||
let refused = panel.app().dialogs().unwrap().with(|h| h.held_state(dialog));
|
||||
assert!(matches!(refused, Some(HeldOk::Refused(reason)) if format!("{reason:?}").contains("Finish the active edit first.")));
|
||||
assert_eq!(panel.app().session.active().unwrap().doc.node(vectorcraft_doc::NodeId(a)), Some(&preview));
|
||||
assert!(panel.app().session.in_interaction(), "the other edit stays in progress");
|
||||
assert_eq!(undo_len(&panel.app()), history);
|
||||
panel.app().session.cancel_interaction().unwrap();
|
||||
assert_eq!(panel.app().session.active().unwrap().doc.node(vectorcraft_doc::NodeId(a)), Some(&before));
|
||||
}
|
||||
|
||||
/// Raster Settings, open, is given a resolution and OK: it stays open, and `a` and `b` keep their
|
||||
/// render settings.
|
||||
fn assert_refused(panel: &mut crate::tests::panel_harness::Panel, a: u64, b: u64) {
|
||||
use craft::ui::dialog::{HeldOk, dialog_id};
|
||||
|
||||
use crate::tests::panel_harness::Panel;
|
||||
|
||||
let (dialog, ctx) = (dialog_id(super::raster::KIND), panel.ctx().clone());
|
||||
let renders = |panel: &Panel| {
|
||||
let app = panel.app();
|
||||
[render_of(&app, a), render_of(&app, b)]
|
||||
};
|
||||
let before = renders(panel);
|
||||
panel.app().dialogs().unwrap().with(|host| host.set_json_field(&ctx, dialog, "resolution", json!(300))).unwrap();
|
||||
panel.app().dialogs().unwrap().with(|host| host.confirm_by_id(&ctx, dialog));
|
||||
panel.frame();
|
||||
panel.frame();
|
||||
let refused = panel.app().dialogs().unwrap().with(|h| matches!(h.held_state(dialog), Some(HeldOk::Refused(_))));
|
||||
assert!(refused, "OK is refused and the dialog stays open");
|
||||
assert_eq!(renders(panel), before);
|
||||
}
|
||||
|
||||
/// The panel with the window's dialogs run and their held answers applied, as in the app's frame.
|
||||
fn show_with_dialogs(app: &mut VectorcraftApp, ui: &mut egui::Ui) {
|
||||
app.ui_ctx = Some(ui.ctx().clone());
|
||||
|
||||
@@ -190,9 +190,16 @@ struct Plan {
|
||||
}
|
||||
|
||||
fn plan(app: &VectorcraftApp) -> Plan {
|
||||
let selection: Vec<u64> = app.session.active().map(|st| st.selection.objects.iter().map(|id| id.0).collect()).unwrap_or_default();
|
||||
plan_of(app, &selection)
|
||||
}
|
||||
|
||||
/// The plan of a change to the objects `ids` of the active document, with the current selection
|
||||
/// as its selection; ids no longer in the document are left out.
|
||||
fn plan_of(app: &VectorcraftApp, ids: &[u64]) -> Plan {
|
||||
let Some(st) = app.session.active() else { return Plan { selection: vec![], targets: vec![] } };
|
||||
let selection: Vec<u64> = st.selection.objects.iter().map(|id| id.0).collect();
|
||||
let found: Vec<(u64, Target)> = st.selection.objects.iter().filter_map(|id| Some((id.0, find(st.doc.node(*id)?)?))).collect();
|
||||
let found: Vec<(u64, Target)> = ids.iter().filter_map(|id| Some((*id, find(st.doc.node(NodeId(*id))?)?))).collect();
|
||||
let lights = |t: &Target| vectorcraft_effects::merged_params(&t.effect, &t.params).get("lights").cloned();
|
||||
let first = found.first().map(|(_, t)| lights(t));
|
||||
let targets = found
|
||||
@@ -205,6 +212,20 @@ fn plan(app: &VectorcraftApp) -> Plan {
|
||||
Plan { selection, targets }
|
||||
}
|
||||
|
||||
/// Commits the settings `changed` to the 3D effects of the objects `ids` as one undo step.
|
||||
/// An active edit is left in progress and returns an error; ids no longer in the document are left out.
|
||||
pub(crate) fn send_to(app: &mut VectorcraftApp, changed: Map<String, Value>, ids: &[u64]) -> Result<(), String> {
|
||||
if app.session.in_interaction() {
|
||||
return Err(tl!("Finish the active edit first.").to_owned());
|
||||
}
|
||||
let steps = settings_steps(&plan_of(app, ids), &changed);
|
||||
match steps.as_slice() {
|
||||
[] => Ok(()),
|
||||
[step] => app.run("effect.setParams", step["params"].clone()).map(|_| ()),
|
||||
_ => app.run("command.batch", json!({"label": LABEL, "commands": steps})).map(|_| ()),
|
||||
}
|
||||
}
|
||||
|
||||
/// Sends the settings `changed` to the 3D effect of each selected object (only the settings its
|
||||
/// effect takes; objects without a 3D effect are left as they are): previews them while the
|
||||
/// gesture runs (`Live::Dragging`) and commits them as one undo step when it ends. Settings
|
||||
@@ -227,8 +248,20 @@ pub(crate) fn send(app: &mut VectorcraftApp, changed: Map<String, Value>, phase:
|
||||
let held = app.three_d.plan.take().unwrap_or_else(|| plan(app));
|
||||
let mut pending = std::mem::take(&mut app.three_d.pending);
|
||||
pending.extend(changed);
|
||||
let steps: Vec<Value> = held
|
||||
.targets
|
||||
let steps = settings_steps(&held, &pending);
|
||||
match steps.as_slice() {
|
||||
[] => {}
|
||||
[step] => live_run(app, LABEL, "effect.setParams", step["params"].clone(), phase),
|
||||
_ => live_run(app, LABEL, "command.batch", json!({"label": LABEL, "commands": steps}), phase),
|
||||
}
|
||||
if dragging {
|
||||
app.three_d.pending = pending;
|
||||
app.three_d.plan = Some(held);
|
||||
}
|
||||
}
|
||||
|
||||
fn settings_steps(held: &Plan, pending: &Map<String, Value>) -> Vec<Value> {
|
||||
held.targets
|
||||
.iter()
|
||||
.filter_map(|(id, t, same_lights)| {
|
||||
let takes = vectorcraft_effects::default_params(&t.effect).unwrap_or(Value::Null);
|
||||
@@ -262,16 +295,7 @@ pub(crate) fn send(app: &mut VectorcraftApp, changed: Map<String, Value>, phase:
|
||||
(!params.is_empty())
|
||||
.then(|| json!({"command": "effect.setParams", "params": {"ids": [id], "index": t.index, "item": t.item, "params": params}}))
|
||||
})
|
||||
.collect();
|
||||
match steps.as_slice() {
|
||||
[] => {}
|
||||
[step] => live_run(app, LABEL, "effect.setParams", step["params"].clone(), phase),
|
||||
_ => live_run(app, LABEL, "command.batch", json!({"label": LABEL, "commands": steps}), phase),
|
||||
}
|
||||
if dragging {
|
||||
app.three_d.pending = pending;
|
||||
app.three_d.plan = Some(held);
|
||||
}
|
||||
.collect()
|
||||
}
|
||||
|
||||
/// Applies the edits of one pass of the panel's rows: `Begin` takes the plan and the settings as
|
||||
@@ -606,12 +630,16 @@ pub(crate) fn set_render(app: &mut VectorcraftApp, mode: &str, quality: Option<&
|
||||
|
||||
/// Shows the first rendered fallback warning for selected objects whose effects take render settings.
|
||||
pub(crate) fn show_rendered_warning(app: &mut VectorcraftApp) {
|
||||
let selection: Vec<u64> = app.session.active().map(|st| st.selection.objects.iter().map(|id| id.0).collect()).unwrap_or_default();
|
||||
show_rendered_warning_of(app, &selection);
|
||||
}
|
||||
|
||||
/// Shows the first rendered fallback warning for the objects `ids` whose effects take render settings.
|
||||
pub(crate) fn show_rendered_warning_of(app: &mut VectorcraftApp, ids: &[u64]) {
|
||||
if let Some(st) = app.session.active()
|
||||
&& let Some(message) = st
|
||||
.selection
|
||||
.objects
|
||||
&& let Some(message) = ids
|
||||
.iter()
|
||||
.filter_map(|id| st.doc.node(*id))
|
||||
.filter_map(|id| st.doc.node(NodeId(*id)))
|
||||
.filter(|n| {
|
||||
find(n).is_some_and(|t| vectorcraft_effects::default_params(&t.effect).is_some_and(|p| p.get(vectorcraft_effects::RENDER).is_some()))
|
||||
})
|
||||
|
||||
@@ -3,14 +3,17 @@
|
||||
//!
|
||||
//! Fields: `document` (Use Document Raster Effects Resolution), `resolution` (1 to 2400 ppi) and
|
||||
//! `background` (`transparent` or `white`). A field the selected objects hold differently opens
|
||||
//! blank, and OK leaves it as each object has it. OK runs one `effect.setParams` over the
|
||||
//! selection, one undo step, which records none when every object already holds what it sets.
|
||||
//! blank, and OK leaves it as each object has it. OK runs one `effect.setParams` over the objects
|
||||
//! selected when the dialog opened, one undo step, which records none when every object already
|
||||
//! holds what it sets. While another document is the active one, or after the document was
|
||||
//! reverted or had an Undo or Redo, OK keeps the dialog open with the reason.
|
||||
|
||||
use craft::ui::contract::Bind;
|
||||
use craft::ui::patterns::form_dialogs::{DialogFields, FieldValue, HostedParamDialog, Param, ParamDialog, ParamKind, ParamResult};
|
||||
use serde_json::{Map, Value, json};
|
||||
use vectorcraft_doc::Node;
|
||||
|
||||
use super::{Live, finish, selected_renders, send, shared_render, show_rendered_warning};
|
||||
use super::{find, selected_renders, send_to, shared_render, show_rendered_warning_of, takes_render};
|
||||
use crate::VectorcraftApp;
|
||||
use crate::dialogs::host::open_held;
|
||||
|
||||
@@ -53,7 +56,22 @@ pub(crate) fn open(app: &mut VectorcraftApp) -> Result<(), String> {
|
||||
}
|
||||
let ctx = app.ui_ctx.clone().ok_or("no window")?;
|
||||
let dialog = HostedParamDialog::new(&ctx, KIND, fields, |fields| dialog().values(Bind::bound(fields)));
|
||||
let opened = Opened { document, resolution: opening, background };
|
||||
let (doc, targets) = app
|
||||
.session
|
||||
.active()
|
||||
.map(|st| {
|
||||
let targets = st
|
||||
.selection
|
||||
.objects
|
||||
.iter()
|
||||
.filter_map(|id| st.doc.node(*id))
|
||||
.filter(|n| find(n).is_some_and(|t| takes_render(&t.effect)))
|
||||
.cloned()
|
||||
.collect();
|
||||
(Some((st.uid, st.reverts, st.history_restores)), targets)
|
||||
})
|
||||
.unwrap_or_default();
|
||||
let opened = Opened { document, resolution: opening, background, doc, targets };
|
||||
open_held(app, dialog, move |app, answer| ok(app, answer, &opened)).ok_or("no window")?;
|
||||
Ok(())
|
||||
}
|
||||
@@ -83,6 +101,11 @@ struct Opened {
|
||||
document: Option<bool>,
|
||||
resolution: Option<f64>,
|
||||
background: Option<String>,
|
||||
/// The document the dialog opened on: its uid, and its revert and Undo or Redo counts then.
|
||||
doc: Option<(u64, u64, u64)>,
|
||||
/// The selected objects whose render settings the dialog opened on, as they were then: OK sets
|
||||
/// these.
|
||||
targets: Vec<Node>,
|
||||
}
|
||||
|
||||
/// The render settings the answer `f` sets, given the values the dialog opened on: a field left
|
||||
@@ -115,17 +138,39 @@ fn edited(f: &DialogFields, opened: &Opened) -> Result<Map<String, Value>, Strin
|
||||
Ok(render)
|
||||
}
|
||||
|
||||
/// OK: sets the edited render settings on every selected object's 3D effect, one undo step.
|
||||
/// OK: sets the edited render settings on the 3D effect of every object the dialog opened on, one
|
||||
/// undo step. While another document is the active one, after that document was reverted or had an
|
||||
/// Undo or Redo, once one of those objects was changed, deleted, locked or hidden, or while another
|
||||
/// edit is in progress, OK keeps the dialog open with the reason.
|
||||
fn ok(app: &mut VectorcraftApp, answer: &ParamResult, opened: &Opened) -> Result<(), String> {
|
||||
let render = edited(&answer.fields, opened)?;
|
||||
if render.is_empty() {
|
||||
return Ok(());
|
||||
}
|
||||
finish(app);
|
||||
let Some((uid, reverts, restores)) = opened.doc else { return Ok(()) };
|
||||
let st = app
|
||||
.session
|
||||
.active()
|
||||
.filter(|st| st.uid == uid)
|
||||
.ok_or_else(|| tl!("Return to the original drawing to change its raster settings.").to_owned())?;
|
||||
if st.reverts != reverts {
|
||||
return Err(tl!("The document was reverted. Reopen this dialog to continue.").to_owned());
|
||||
}
|
||||
if st.history_restores != restores {
|
||||
return Err(tl!("Reopen Raster Settings after Undo or Redo.").to_owned());
|
||||
}
|
||||
let stale = {
|
||||
let editable = st.doc.editable();
|
||||
opened.targets.is_empty() || opened.targets.iter().any(|t| st.doc.node(t.id) != Some(t) || !editable(t.id))
|
||||
};
|
||||
if stale {
|
||||
return Err(tl!("The objects were changed, deleted or locked. Reopen Raster Settings to continue.").to_owned());
|
||||
}
|
||||
let ids: Vec<u64> = opened.targets.iter().map(|t| t.id.0).collect();
|
||||
let mut changed = Map::new();
|
||||
changed.insert(vectorcraft_effects::RENDER.into(), Value::Object(render));
|
||||
send(app, changed, Live::Released);
|
||||
show_rendered_warning(app);
|
||||
send_to(app, changed, &ids)?;
|
||||
show_rendered_warning_of(app, &ids);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -157,12 +202,12 @@ mod tests {
|
||||
/// resolution sets nothing and a changed one sets it.
|
||||
#[test]
|
||||
fn ok_needs_a_resolution_and_keeps_blank_fields() {
|
||||
let on = Opened { document: Some(true), resolution: Some(72.0), background: Some("transparent".into()) };
|
||||
let on = Opened { document: Some(true), resolution: Some(72.0), background: Some("transparent".into()), doc: None, targets: vec![] };
|
||||
assert_eq!(edited(&fields(&[("document", FieldValue::Bool(false))]), &on), Err(NO_RESOLUTION.to_string()));
|
||||
let own = Opened { document: Some(false), resolution: None, background: Some("transparent".into()) };
|
||||
let own = Opened { document: Some(false), resolution: None, background: Some("transparent".into()), doc: None, targets: vec![] };
|
||||
let kept = edited(&fields(&[("document", FieldValue::Bool(false)), ("background", FieldValue::Text("white".into()))]), &own).unwrap();
|
||||
assert_eq!(kept, Map::from_iter([("background".to_string(), json!("white"))]));
|
||||
let mixed = Opened { document: None, resolution: Some(150.0), background: None };
|
||||
let mixed = Opened { document: None, resolution: Some(150.0), background: None, doc: None, targets: vec![] };
|
||||
assert_eq!(edited(&fields(&[("resolution", FieldValue::Number(150.0))]), &mixed), Ok(Map::new()));
|
||||
let changed = edited(&fields(&[("resolution", FieldValue::Number(200.0))]), &mixed).unwrap();
|
||||
assert_eq!(changed.get("resolution").and_then(Value::as_f64), Some(200.0));
|
||||
@@ -174,14 +219,14 @@ mod tests {
|
||||
/// mixed one sets it.
|
||||
#[test]
|
||||
fn ok_on_unchanged_values_sets_nothing() {
|
||||
let on = Opened { document: Some(true), resolution: Some(72.0), background: Some("transparent".into()) };
|
||||
let on = Opened { document: Some(true), resolution: Some(72.0), background: Some("transparent".into()), doc: None, targets: vec![] };
|
||||
let unchanged = fields(&[
|
||||
("document", FieldValue::Bool(true)),
|
||||
("resolution", FieldValue::Number(72.0)),
|
||||
("background", FieldValue::Text("transparent".into())),
|
||||
]);
|
||||
assert_eq!(edited(&unchanged, &on), Ok(Map::new()));
|
||||
let own = Opened { document: Some(false), resolution: Some(150.0), background: Some("transparent".into()) };
|
||||
let own = Opened { document: Some(false), resolution: Some(150.0), background: Some("transparent".into()), doc: None, targets: vec![] };
|
||||
let kept = fields(&[("document", FieldValue::Bool(false)), ("resolution", FieldValue::Number(150.0))]);
|
||||
assert_eq!(edited(&kept, &own), Ok(Map::new()));
|
||||
let raised = edited(&fields(&[("document", FieldValue::Bool(false)), ("resolution", FieldValue::Number(200.0))]), &own).unwrap();
|
||||
@@ -190,7 +235,7 @@ mod tests {
|
||||
assert_eq!(switched, Map::from_iter([("resolution".to_string(), Value::Null)]));
|
||||
let white = edited(&fields(&[("background", FieldValue::Text("white".into()))]), &on).unwrap();
|
||||
assert_eq!(white, Map::from_iter([("background".to_string(), json!("white"))]));
|
||||
let mixed = Opened { document: Some(true), resolution: Some(72.0), background: None };
|
||||
let mixed = Opened { document: Some(true), resolution: Some(72.0), background: None, doc: None, targets: vec![] };
|
||||
let picked = edited(&fields(&[("background", FieldValue::Text("transparent".into()))]), &mixed).unwrap();
|
||||
assert_eq!(picked, Map::from_iter([("background".to_string(), json!("transparent"))]));
|
||||
}
|
||||
|
||||
@@ -7387,6 +7387,11 @@ limits, so art too complex for the shaded surface does not refuse the wireframe.
|
||||
{"name":"run_command","arguments":{"command":"effect.setParams","params":{"index":0,"item":null,"params":{"render":{"mode":"rendered","quality":"high","background":"white"}}}}}
|
||||
```
|
||||
|
||||
The 3D and Materials panel's Render Settings › Raster Settings dialog sets resolution and background on the objects
|
||||
selected when the dialog opened. OK applies the changes in one undo step and records nothing when nothing changes.
|
||||
OK keeps the dialog open with the reason while its document is not active, after it was reverted or had an Undo
|
||||
or Redo, if one of those objects was changed, deleted, locked or hidden, or while another edit is in progress.
|
||||
|
||||
## 3D material
|
||||
|
||||
Revolve, Extrude & Bevel, Inflate and Rotate take `material`, an object with `roughness` (0..1, default 1) and
|
||||
|
||||
+6
-3
@@ -68,9 +68,12 @@ pages describe it.
|
||||
off, no light casts a shadow. Low takes one sample a pixel, Medium 2 × 2 and High 3 × 3 (VectorCraft's own
|
||||
values), at the effect's `resolution` or, without one, at Document Raster Effects Settings › Resolution.
|
||||
**Render Settings › Raster Settings…** sets Use Document Raster Effects Resolution, Resolution (1 to 2400 ppi) and
|
||||
Background (Transparent or White) for every selected object in one undo step, as the Render 3D vector artwork page
|
||||
describes Raster Settings changing the resolution and background. A setting the selected objects hold differently
|
||||
opens blank and is left as each object has it; Rendered and the qualities show unchecked for such a selection.
|
||||
Background (Transparent or White). OK sets the objects selected when the dialog opened in one undo step.
|
||||
OK keeps the dialog open with the reason while its document is not active, after it was reverted or had an Undo
|
||||
or Redo, if one of those objects was changed, deleted, locked or hidden, or while another edit is in progress.
|
||||
The Render 3D vector artwork page describes Raster Settings changing the resolution and background. A setting
|
||||
the selected objects hold differently opens blank and is left as each object has it; Rendered and the qualities
|
||||
show unchecked for such a selection.
|
||||
The selection box, Use Preview Bounds, Align, hit testing and snapping measure the shaded faces, and the image is
|
||||
made only when the object is drawn, then reused until an input to it changes. A quality whose samples would pass
|
||||
16,777,216 pixels takes fewer; past that limit at one sample a pixel, or when the solid can't be placed in one
|
||||
|
||||
Reference in new issue
Block a user