Render: integrated workspace, preview image jobs and opaque PBR (#1046)
Lands the Render workspace (R3), bounded preview-image jobs with cancellation and atomic PNG export (R4a), and opaque PBR looks as one change. - Render workspace: an overlay-free product preview on the installed GPU device. Returning to Design restores its camera. render.scene and render.settings.apply are added. - Image jobs: render.preflight/start/status/cancel/export run bounded CPU preview jobs. Export captures the job, overwrite choice and document, and checks the caller's file scope before writing. - Opaque PBR: looks can carry metal fraction, roughness and dielectric IOR. The product viewport and preview PNG use them; geometry and mass are unchanged. The v1 catalog export refuses PBR rather than dropping it. - Render setups and PBR looks are saved under design format 21. Labels are in en/de/ja/ko/zh/ru. Supersedes #706 and #800. Refs #620, #673, #756, #1004. Contributed by @0xlillith. Co-authored-by: lillith <35337584+0xlillith@users.noreply.github.com>
This commit is contained in:
1 parent
e4ef6cfe29
commit
a261aaa841
70 files changed
+5860
-101
No files matched your search
@@ -329,8 +329,15 @@ pub fn items(app: &SolveApp, target: &Target) -> Vec<Item> {
|
||||
Target::ToolbarCommand { id } => crate::toolbar_custom::command_items(app, id),
|
||||
Target::Toolbar => crate::toolbar_custom::toolbar_items(app),
|
||||
Target::Workspace => {
|
||||
let mut v = vec![act("ui.workspace", "Design", "box").key("current")];
|
||||
for w in ["Render", "Animation", "Simulation", "Manufacture", "Drawing"] {
|
||||
let rendering = crate::render_workspace::active(app);
|
||||
let mut v = vec![
|
||||
act("ui.workspace.design", "Design", "box").with(json!({"workspace":"design"})).key(if rendering { "" } else { "current" }),
|
||||
act("ui.workspace.render", "Render", "camera")
|
||||
.with(json!({"workspace":"render"}))
|
||||
.key(if rendering { "current" } else { "" })
|
||||
.on(app.session.active_sketch.is_none() && app.tool.is_none() && app.dialog.is_none() && !app.file_load.busy()),
|
||||
];
|
||||
for w in ["Animation", "Simulation", "Manufacture", "Drawing"] {
|
||||
v.push(act("ui.workspace", w, "").key("coming later").on(false));
|
||||
}
|
||||
v
|
||||
@@ -975,7 +982,13 @@ pub fn run_item(app: &mut SolveApp, item: &Item, at: Pos2) {
|
||||
"ui.toolbarPin" | "ui.toolbarRemove" | "ui.toolbarReset" | "ui.toolbarCustomize" | "ui.shortcutPin" => {
|
||||
crate::toolbar_custom::run(app, &item.id, &p)
|
||||
}
|
||||
"ui.workspace" => {}
|
||||
"ui.workspace" | "ui.workspace.design" | "ui.workspace.render" => {
|
||||
if let Some(workspace) = p.get("workspace").and_then(Value::as_str)
|
||||
&& let Err(e) = crate::render_workspace::enter(app, workspace == "render")
|
||||
{
|
||||
app.set_status(e, true);
|
||||
}
|
||||
}
|
||||
"ui.findJoint" => {
|
||||
if let Some(id) = id_of(&p, "joint") {
|
||||
crate::dialogs_assembly::find_joint(app, id);
|
||||
@@ -1043,6 +1056,7 @@ pub fn run_item(app: &mut SolveApp, item: &Item, at: Pos2) {
|
||||
{
|
||||
k.color = look.color;
|
||||
k.opacity = look.opacity;
|
||||
k.pbr = look.pbr;
|
||||
k.look = Some(look.name.clone());
|
||||
}
|
||||
k.component = Some(name);
|
||||
|
||||
Reference in new issue
Block a user