Merge reviewed preview changes and retain normal convention controls

This commit is contained in:
Rafael Mendes committed 2026-11-05 14:35:58 -03:00
commit cd4c2dfa43
10 files changed
+171 -3

No files matched your search

+3
View File
@@ -36,6 +36,8 @@ pub struct View3d {
pub height_scale: f32,
/// The height (0..1) that stays on the surface: 0 = the relief rises out of the mesh, 0.5 = centered on it.
pub height_level: f32,
/// Flip green when reading DirectX normal maps; false matches the Normal node's OpenGL default.
pub normal_y_flip: bool,
pub show_axis: bool,
pub show_grid: bool,
/// See through the mesh where the material's alpha (opacity output, else base color alpha)
@@ -59,6 +61,7 @@ impl Default for View3d {
exposure: 0.0,
height_scale: 0.04,
height_level: 0.0,
normal_y_flip: false,
show_axis: false,
show_grid: false,
transparency: true,
+4 -1
View File
@@ -29,7 +29,7 @@ pub(crate) fn specs() -> Vec<CommandSpec> {
"3D view settings",
[],
None,
"{scene? (cube|cylinder|plane|sphere|material_ball|rounded_cube|torus), tiling?, yaw?, pitch?, distance?, target? ([x, y, z] orbit point in mesh radii from its center, within the pan limit preference), environment? (studio|sunset|overcast|night), envRotation?, exposure?, heightScale? (displacement depth in mesh radii, 0..0.5), heightLevel? (height that stays on the surface, 0..1; 0 = rises out), axis?, grid?, transparency? (see through where alpha < 1), alphaView? (show the alpha channel)}",
"{scene? (cube|cylinder|plane|sphere|material_ball|rounded_cube|torus), tiling?, yaw?, pitch?, distance?, target? ([x, y, z] orbit point in mesh radii from its center, within the pan limit preference), environment? (studio|sunset|overcast|night), envRotation?, exposure?, heightScale? (displacement depth in mesh radii, 0..0.5), heightLevel? (height that stays on the surface, 0..1; 0 = rises out), normalYFlip? (DirectX normal maps; default false/OpenGL), axis?, grid?, transparency? (see through where alpha < 1), alphaView? (show the alpha channel)}",
always,
view3d
),
@@ -141,6 +141,9 @@ fn view3d(s: &mut Session, p: &J) -> Result<J> {
if let Some(t) = f32p(p, "heightLevel") {
v.height_level = t.clamp(0.0, 1.0);
}
if let Some(flip) = boolp(p, "normalYFlip") {
v.normal_y_flip = flip;
}
if let Some(b) = boolp(p, "axis") {
v.show_axis = b;
}