Skip to content

Commit

Permalink
organize mainmenubar and add JSON model export
Browse files Browse the repository at this point in the history
  • Loading branch information
WILLATRONIX committed Jul 8, 2024
1 parent cf479d8 commit 878504f
Show file tree
Hide file tree
Showing 7 changed files with 164 additions and 148 deletions.
7 changes: 6 additions & 1 deletion src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,17 @@
- [Replace Mode](capabilities/replacemode.md)
- [Bulldozer](capabilities/bulldozer.md)
- [Editor Mode](editor/intro.md)
- [Main Menu Bar](editor/mainmenubar.md)
- [Selections](editor/selections.md)
- [Gizmos](editor/gizmos.md)
- [Tool Presets](editor/toolpresets.md)
- [Placements](editor/placement.md)
- [Common UI Elements](editor/commonUIelements.md)
- [Main Menu Bar](editor/mainmenubar/intro.md)
- [File](editor/mainmenubar/file.md)
- [Edit](editor/mainmenubar/edit.md)
- [Select](editor/mainmenubar/select.md)
- [View](editor/mainmenubar/view.md)
- [Operations](editor/mainmenubar/operations.md)
- [Windows](editor/windows/intro.md)
- [Clipboard](editor/windows/clipboard.md)
- [Views](editor/windows/views.md)
Expand Down
9 changes: 9 additions & 0 deletions src/editor/mainmenubar/edit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Edit

| Function | Default Shortcut | Description |
| -------------- | ---------------- | --------------------------------------------------------------------------------- |
| Undo | Ctrl+Z | Reverses the most recent action |
| Redo | Ctrl+Y | Reverses the most recent undo |
| Cut | Ctrl+X | Removes the selection and stores it in the clipboard |
| Copy | Ctrl+C | Copies the selected item to the [Clipboard](/editor/windows/clipboard.md) |
| Save Blueprint | Ctrl+P | Saves the clipboard as a [Blueprint](/editor/windows/blueprints.md) for later use |
51 changes: 51 additions & 0 deletions src/editor/mainmenubar/file.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# File

The 'File' drop-down provides many useful features regarding loading and saving files to use within Axiom.

## Import Schematic

When pressed, a file explorer window will be opened. Here you can select a schematic to import into Axiom. Both `.schem` and `.schematic` are supported, however only one schematic can be loaded at a time.

After you've opened a schematic in your file explorer, it will be loaded into your [Clipboard](/editor/windows/clipboard.md).

## Export Schematic

The Export Schematic option allows you to export a schematic using your clipboard. Once you have something in your clipboard, you'll be able to export it as a schematic.

For users with a [Commercial License](https://axiom.moulberry.com/commercial), you'll be able to export to any version from 1.7 to 1.19.

## Open Reference Image

Opens a file explorer window for you to select an image to be loaded into Axiom. Once opened, you can drag and resize the image window to wherever you want.

Right-Clicking on an image window will display some options to adjust the reference image.

- **Close Window** removes the image.
- **Set Filtering: Nearest** "smoothes" out sharp pixels to reduce the blocky look.
- **Set Filtering: Linear** stops it from smoothing out pixels, leaving the sharp edges.
- **Show In Game UI** makes it so the image is always shown. When disabled, the image is hidden when outside of the [Editor](/editor/intro.md).
- **Borderless** removes the outer padding and resizing tab.

## Load Bedrock Packs

This is a [Commercial License](https://axiom.moulberry.com/commercial) feature.

The 'Load Bedrock Packs' option allows you to replace existing models with Bedrock Edition models.

This would be most used by Bedrock Marketplace creators who would want to see their models on Java.

## Save Selection as CSV

Exports a [Selection](/editor/selections.md) to a Comma-Seperated Value (CSV) format.

## Save Clipboard as JSON Model

To export to a JSON model, an object is required in your [Clipboard](/windows/clipboard.md) to use as the model.

Saving will reformat the Clipboard into JSON suitable to be used as a custom model. Non-exposed faces are culled for optimization.

Now, you can apply the model using the 'custommodeldata' tag in a resource pack.

The scale is determined by the largest local coordinate. For example, if the clipboard scale is 10 x 20 x 10, the model scale will be 20.

When the resource pack is enabled, axiom will detect these custom models as a [Display Entity](/builder/displayentities.md).
30 changes: 30 additions & 0 deletions src/editor/mainmenubar/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Main Menu Bar

The main menu bar gives users access to crucial functionality of the mod. Here you can find menu items for accessing windows, manipulating selections, performing operations and viewing helpful information.

- [File](file.md)
- [Edit](edit.md)
- [Select](select.md)
- [View](view.md)
- [Operations](operations.md)

## Tool Masks

Clear and open the tool mask editing window. See [Tool Masks](toolmasks.md)

## Window

The **Windows** submenu lets the user toggle [Windows](windows/intro.md). If you ever close a window and want it back, this submenu allows you to re-enable it. With this window, you can also save and restore a default layout.

To store a layout, pressing the 'Store Current Layout as Default' will save your current window layout. To restore the saved layout, press the 'Restore Default Layout' button. You can export and import layouts to and from your clipboard.

## Keybinds

The **Keybinds** button opens a window to edit and set keybinds for tools and operations.

## Help

The **Help** submenu contains useful information and configuration options.

The dropdown contains links to information and resources. The [style editor](windows/themes.md) can be accessed through this window, allowing you to change and import custom colours for the Editor UI.

166 changes: 19 additions & 147 deletions src/editor/mainmenubar.md → src/editor/mainmenubar/operations.md
Original file line number Diff line number Diff line change
@@ -1,138 +1,30 @@
# Main Menu Bar
The main menu bar gives users access to crucial functionality of the mod. Here you can find menu items for accessing windows, manipulating selections, performing operations and viewing helpful information.

## File

The 'File' drop-down provides many useful features regarding loading and saving files to use within Axiom.

### Import Schematic

When pressed, a file explorer window will be opened. Here you can select a schematic to import into Axiom. Both `.schem` and `.schematic` are supported, however only one schematic can be loaded at a time.

After you've opened a schematic in your file explorer, it will be loaded into your [Clipboard](/editor/windows/clipboard.md).

### Export Schematic

The Export Schematic option allows you to export a schematic using your clipboard. Once you have something in your clipboard, you'll be able to export it as a schematic.

For users with a [Commercial License](https://axiom.moulberry.com/commercial), you'll be able to export to any version from 1.7 to 1.19.

### Open Reference Image

Opens a file explorer window for you to select an image to be loaded into Axiom. Once opened, you can drag and resize the image window to wherever you want.

Right-Clicking on an image window will display some options to adjust the reference image.

- **Close Window** removes the image.
- **Set Filtering: Nearest** "smoothes" out sharp pixels to reduce the blocky look.
- **Set Filtering: Linear** stops it from smoothing out pixels, leaving the sharp edges.
- **Show In Game UI** makes it so the image is always shown. When disabled, the image is hidden when outside of the [Editor](/editor/intro.md).
- **Borderless** removes the outer padding and resizing tab.

### Load Bedrock Packs

This is a [Commercial License](https://axiom.moulberry.com/commercial) feature.

The 'Load Bedrock Packs' option allows you to replace existing models with Bedrock Edition models.

This would be most used by Bedrock Marketplace creators who would want to see their models on Java.

### Save Selection as CSV

Exports a [Selection](/editor/selections.md) to a Comma-Seperated Value (CSV) format.

### Save Clipboard as JSON Model

This allows you to convert your clipboard to an item model. Models can be used in resource packs or imported into Blockbench.

## Edit

| Function | Default Shortcut | Description |
| -------------- | ---------------- | --------------------------------------------------------------------------------- |
| Undo | Ctrl+Z | Reverses the most recent action |
| Redo | Ctrl+Y | Reverses the most recent undo |
| Cut | Ctrl+X | Removes the selection and stores it in the clipboard |
| Copy | Ctrl+C | Copies the selected item to the [Clipboard](/editor/windows/clipboard.md) |
| Save Blueprint | Ctrl+P | Saves the clipboard as a [Blueprint](/editor/windows/blueprints.md) for later use |

## Select

The Select submenu lets users perform a variety of functions to modify [Selections](/tools/selection/intro.md).

| Function | Description |
| ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Clear | Clears the current selection |
| Expand | Expands the current selection by a specified number of blocks |
| Shrink | Shrinks the current selection by a specified number of blocks |
| Distort | Distorts the current selection with simplex noise by a specified radius and distance. Radius is the scale of the noise and the distance is the amount it gets distorted by. |
| Smooth | Applies a Gaussian blur on the selection to smooth out the selection. StdDev is the intensity of the smoothing operation and the threshold is the 'cut-off' of how much input weight is needed to affect the output. |
| Bounding Box | Creates a cuboid selection around the furthest points of the selection, encapsulating the entire selection. |

## View

The View submenu lets you configure options related to viewing and rendering certain elements in the Editor Menu.

### New View

Creates a new [View](/editor/windows/views.md) located at the current position.

### Show Selection

Toggles the rendering of [Selections](/editor/selections.md).

### Show Biomes

Toggles the visualisation of biomes. Each biome is represented with its own colour.

Be aware that biomes in Minecraft are defined in a 4x4x4 grid. However, to make biomes feel more natural, vanilla warps the biomes visually. The biome overlay shows the "real" position of biomes, while biome blending and the f3 screen show the "warped" position of biomes.

The default shortcut for this view is `Ctrl+B`.

### Show Key Presses

This shows your keyboard and mouse inputs in the bottom-right corner of the screen. This can be useful for making tutorials or debugging problems.

### UI Scale

This slider ranges from 0.5 to 2. This lets you change the size of all graphical elements in the editor mode.

### Min Brightness

The 'Min Brightness' slider ranges from 0 to 1. This lets you change how dark unlit places look in your world. A value of 1 means all blocks are fully lit, this functions similar to night vision.

### Fluid Opacity

The 'Fluid Opacity' slider ranges from 0 to 1. This lets you change the opacity of water to alter its visibility. A value of 0 will result in water being invisible.

Lava and modded fluids are not affected due to performance concerns.

## Operations
# Operations

The **Operations** submenu contains various useful 'operations' to modify blocks within [Selections](/editor/selections.md).

> IMPORTANT: Operations only affect [Selections](/editor/selections.md).
### Fill
## Fill

The 'Fill' operation fills the selected area of blocks with a specified block. A small [Window](/editor/windows/intro.md) will open, allowing you to choose which block by clicking the block icon. This will open the 'Select Block' Window.

The default keybind for this operation is `Ctrl+F`.

### Fill Nearest
## Fill Nearest

The 'Fill Nearest' operation doesn't use a specified block. Rather, it uses the nearest block that isn't air for each block within the selection.

### Replace
## Replace

The 'Replace' operation is similar to 'Fill'. However, instead of filling every block in the selection, you can replace a specific block with another.

The default keybind for this operation is `Ctrl+R`. Note that this shortcut is overridden when a [Placement](/editor/placement.md) is active.

### Set Biome
## Set Biome

The 'Set Biome' Operation sets the biome within the selection with a specified biome.

### Autoshade
## Autoshade

The 'Autoshade' operation shades your selection using a sun angle, either at the player position or at a set value. Different blocks can be set for the appropriate shading.

Expand All @@ -151,66 +43,66 @@ You can save and load [Presets](/editor/toolpresets.md) for the Autoshade operat

To confirm the Autoshade, press the 'Autoshade' button at the bottom of the window.

### Drain
## Drain

Removes all water in your selection. This operation also removes the 'waterlogged' property from blocks.

### Waterlog
## Waterlog

Replaces all air blocks with water and replaces all water-loggable blocks with their waterlogged variant.

### Smoothsnow
## Smoothsnow

Adds a layer of snow between one and eight layers above existing terrain. No blocks are replaced as existing terrain is prioritised.

The operation attempts to generate snow as smooth as possible.

### Simulate Gravity
## Simulate Gravity

The 'Simulate Gravity' operation processes simulates the effect of gravity to all blocks, regardless of whether they normally float or not.

### Trigger Updates
## Trigger Updates

The 'Trigger Updates' operation removes any blocks that are incorrectly positioned.

For example, a floating sign within the selection will be removed.

### Hollow
## Hollow

Fills the inside of the selected object with air, leaving the a shell of the original object.

The 'Hollow' operation also considers transparent/non-solid blocks so having an exterior that includes glass will be accounted for.

### Fill Gaps
## Fill Gaps

The 'Fill Gaps' does the opposite of the 'Hollow' operation, empty space within an object is filled with your active block.

Again, transparent and non-solid blocks are considered.

### Generate Colour Field
## Generate Colour Field

The 'Generate Colour Field' operation Generates a colour field using the [CIELAB colour space](https://en.wikipedia.org/wiki/CIELAB_color_space) within a selection.

A colour field (colour space) is a way to organise colours. CIELAB was chosen as it utilises XYZ coordinates to represent LAB. LAB represents three components of the colour space:
#### **L - (Lightness)**
### **L - (Lightness)**
- Brightness is mapped to positive X
- Darkness is mapped to negative X
#### **A - (Red/Green)**
### **A - (Red/Green)**
- Red is mapped to positive Y
- Green is mapped to negative Y
#### **B - (Yellow/Blue)**
### **B - (Yellow/Blue)**
- Yellow is mapped to positive Z
- Blue is mapped to negative Z

All blocks within the colour field used are full, non-transparent blocks to reduce overlapping.

If two blocks are similar enough, Axiom will attempt to place them in the same position. However, Axiom prevents this by offsetting blocks until there is no overlap. This means there's little chance for blocks to be excluded.

### Analyze
## Analyze

Displays each block type within a selection ordered by the count of each block. A total for both the count and distribution is shown in the last row.

### Animated Rebuild
## Animated Rebuild

The 'Animated Rebuild' option allows for creating cinematics of a build being built block-by-block.

Expand All @@ -233,26 +125,6 @@ By default, the starting point for the Animated Rebuild operation is located at

Pressing 'Do Animated Rebuild' will start the animation. To cancel mid-animation, press `Ctrl+Z` to revert to the original structure.

## Tool Masks

Clear and open the tool mask editing window. See [Tool Masks](toolmasks.md)

## Window

The **Windows** submenu lets the user toggle [Windows](windows/intro.md). If you ever close a window and want it back, this submenu allows you to re-enable it. With this window, you can also save and restore a default layout.

To store a layout, pressing the 'Store Current Layout as Default' will save your current window layout. To restore the saved layout, press the 'Restore Default Layout' button. You can export and import layouts to and from your clipboard.

## Keybinds

The **Keybinds** button opens a window to edit and set keybinds for tools and operations.

## Help

The **Help** submenu contains useful information and configuration options.

The dropdown contains links to information and resources. The [style editor](windows/themes.md) can be accessed through this window, allowing you to change and import custom colours for the Editor UI.

## Notes

[^note1]: For versions 3.1.0 and below, a bug caused 'Start Delay' to be measured in ticks rather than seconds.
12 changes: 12 additions & 0 deletions src/editor/mainmenubar/select.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Select

The Select submenu lets users perform a variety of functions to modify [Selections](/tools/selection/intro.md).

| Function | Description |
| ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Clear | Clears the current selection |
| Expand | Expands the current selection by a specified number of blocks |
| Shrink | Shrinks the current selection by a specified number of blocks |
| Distort | Distorts the current selection with simplex noise by a specified radius and distance. Radius is the scale of the noise and the distance is the amount it gets distorted by. |
| Smooth | Applies a Gaussian blur on the selection to smooth out the selection. StdDev is the intensity of the smoothing operation and the threshold is the 'cut-off' of how much input weight is needed to affect the output. |
| Bounding Box | Creates a cuboid selection around the furthest points of the selection, encapsulating the entire selection. |
Loading

0 comments on commit 878504f

Please sign in to comment.