Skip to content

Commit

Permalink
Hide by default the hidden layer
Browse files Browse the repository at this point in the history
  • Loading branch information
plule committed May 9, 2024
1 parent ebb8f13 commit 52fa9d3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "vox-uristi"
version = "0.15.0"
version = "0.15.1"
edition = "2021"

[features]
Expand Down
8 changes: 5 additions & 3 deletions site/_pages/tips.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ further customization when rendering pictures.

Navigating to the "Layers" in MagicaVoxel, as seen on the left side, it's
possible to hide and show various features of the export. For example, hiding
the spatters and the roughness will lead to a less cluttered look. The "hidden"
layer represent all the black tiles that are not discovered by the player.
Hiding this layer can be useful to render a multi-level underground fortress.
the spatters and the roughness will lead to a less cluttered look.

The "hidden" layer represent all the black tiles that are not discovered by the
player. Hiding this layer can be useful to render a multi-level underground
fortress, while showing it gives a look closer to what's visible in game.

On the right side, the "Outline" can be used to hide part of the export. Each
individual Z-Level can be hidden there, to show the interior of buildings for
Expand Down
3 changes: 3 additions & 0 deletions src/export.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,9 @@ pub fn try_export_voxels(
.attributes
.insert("_name".to_string(), format!("{}", layer).to_lowercase());
}
vox.data.layers[*Layers::Hidden.id()]
.attributes
.insert("_hidden".to_string(), "1".to_string());

let min_z = z_range.start * HEIGHT as i32;
let block_count = map.levels.values().map(|l| l.blocks.len()).sum();
Expand Down

0 comments on commit 52fa9d3

Please sign in to comment.