Merge pull request #93869 from MajorMcDoom/ortho-grids

Make viewport grid visible on all three planes in ortho camera view
This commit is contained in:
Rémi Verschelde 2024-08-16 14:32:06 +02:00
commit f02e89bd04
No known key found for this signature in database
GPG Key ID: C3336907360768E1
2 changed files with 6 additions and 6 deletions

View File

@ -311,13 +311,13 @@
The grid size in units. Higher values prevent the grid from appearing "cut off" at certain angles, but make the grid more demanding to render. Depending on the camera's position, the grid may not be fully visible since a shader is used to fade it progressively.
</member>
<member name="editors/3d/grid_xy_plane" type="bool" setter="" getter="">
If [code]true[/code], render the grid on an XY plane. This can be useful for 3D side-scrolling games.
If [code]true[/code], renders the grid on the XY plane in perspective view. This can be useful for 3D side-scrolling games.
</member>
<member name="editors/3d/grid_xz_plane" type="bool" setter="" getter="">
If [code]true[/code], render the grid on an XZ plane.
If [code]true[/code], renders the grid on the XZ plane in perspective view.
</member>
<member name="editors/3d/grid_yz_plane" type="bool" setter="" getter="">
If [code]true[/code], render the grid on a YZ plane. This can be useful for 3D side-scrolling games.
If [code]true[/code], renders the grid on the YZ plane in perspective view. This can be useful for 3D side-scrolling games.
</member>
<member name="editors/3d/navigation/emulate_3_button_mouse" type="bool" setter="" getter="">
If [code]true[/code], enables 3-button mouse emulation mode. This is useful on laptops when using a trackpad.

View File

@ -7315,9 +7315,9 @@ void Node3DEditor::_init_grid() {
int primary_grid_steps = EDITOR_GET("editors/3d/primary_grid_steps");
// Which grid planes are enabled? Which should we generate?
grid_enable[0] = grid_visible[0] = EDITOR_GET("editors/3d/grid_xy_plane");
grid_enable[1] = grid_visible[1] = EDITOR_GET("editors/3d/grid_yz_plane");
grid_enable[2] = grid_visible[2] = EDITOR_GET("editors/3d/grid_xz_plane");
grid_enable[0] = grid_visible[0] = orthogonal || EDITOR_GET("editors/3d/grid_xy_plane");
grid_enable[1] = grid_visible[1] = orthogonal || EDITOR_GET("editors/3d/grid_yz_plane");
grid_enable[2] = grid_visible[2] = orthogonal || EDITOR_GET("editors/3d/grid_xz_plane");
// Offsets division_level for bigger or smaller grids.
// Default value is -0.2. -1.0 gives Blender-like behavior, 0.5 gives huge grids.