feat: wire vertical exaggeration through the shell #13
+37
-1
@@ -237,6 +237,33 @@ pub fn supported_importers() -> &'static [&'static str] {
|
||||
}
|
||||
|
||||
pub fn info_text() -> String {
|
||||
use std::fmt::Write as _;
|
||||
|
||||
let mut text = String::new();
|
||||
writeln!(&mut text, "openvistapro {}", env!("CARGO_PKG_VERSION")).unwrap();
|
||||
writeln!(&mut text, "presets: {}", supported_presets().join(", ")).unwrap();
|
||||
writeln!(
|
||||
&mut text,
|
||||
"quality presets: {}",
|
||||
supported_quality_presets().join(", ")
|
||||
)
|
||||
.unwrap();
|
||||
let importers = supported_importers();
|
||||
if importers.is_empty() {
|
||||
writeln!(&mut text, "importers: (none)").unwrap();
|
||||
} else {
|
||||
writeln!(&mut text, "importers: {}", importers.join(", ")).unwrap();
|
||||
}
|
||||
writeln!(
|
||||
&mut text,
|
||||
"scene file: project-owned .ovp.toml (schema {})",
|
||||
scene_file::SCENE_SCHEMA
|
||||
)
|
||||
.unwrap();
|
||||
text
|
||||
}
|
||||
|
||||
pub fn execute(cli: Cli) -> Result<(), CliError> {
|
||||
match cli.command {
|
||||
Command::Info => {
|
||||
print!("{}", info_text());
|
||||
@@ -255,8 +282,17 @@ pub fn info_text() -> String {
|
||||
if args.camera_demo {
|
||||
scene.camera = demo_camera_for(&grid);
|
||||
render_perspective_to_path(&grid, &scene, args.width, args.height, &args.output)?;
|
||||
} else {
|
||||
} else if args.quality == RenderQualityPreset::Preview {
|
||||
render_top_down_to_path(&grid, &scene, &args.output)?;
|
||||
} else {
|
||||
let img = render_perspective_with_quality(
|
||||
&grid,
|
||||
&scene,
|
||||
args.width,
|
||||
args.height,
|
||||
args.quality,
|
||||
);
|
||||
img.save(&args.output)?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user