Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/space_view3d.py
| Show First 20 Lines • Show All 4,829 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| overlay = view.overlay | overlay = view.overlay | ||||
| shading = view.shading | shading = view.shading | ||||
| display_all = overlay.show_overlays | display_all = overlay.show_overlays | ||||
| col = layout.column() | col = layout.column() | ||||
| col.active = display_all | col.active = display_all | ||||
| split = col.split() | split = col.split() | ||||
| sub = split.column() | sub = split.column() | ||||
| sub.prop(overlay, "show_floor", text="Grid") | |||||
| if overlay.show_floor: | row = sub.row() | ||||
| sub = col.column(align=True) | row_el = row.column() | ||||
| sub.active = bool(overlay.show_floor or view.region_quadviews or not view.region_3d.is_perspective) | row_el.prop(overlay, "show_ortho_grid", text="Grid") | ||||
| subsub = sub.row(align=True) | grid_active = view.region_quadviews or (view.region_3d.is_orthographic_side_view and not view.region_3d.is_perspective) | ||||
| subsub.active = overlay.show_floor | row_el.active = grid_active | ||||
| subsub.prop(overlay, "grid_scale", text="Scale") | row.prop(overlay, "show_floor", text="Floor") | ||||
| subsub.prop(overlay, "grid_subdivisions", text="Subdivisions") | |||||
| if overlay.show_floor or overlay.show_ortho_grid: | |||||
| sub = col.row(align=True) | |||||
| sub.active = (overlay.show_floor and not view.region_3d.is_orthographic_side_view) or (overlay.show_ortho_grid and grid_active) | |||||
| sub.prop(overlay, "grid_scale", text="Scale") | |||||
| sub.prop(overlay, "grid_subdivisions", text="Subdivisions") | |||||
brecht: These settings also have an effect for ortho side views. So `overlay.show_floor` should be… | |||||
| sub = split.column() | sub = split.column() | ||||
| row = sub.row() | row = sub.row() | ||||
| row.label(text="Axes") | row.label(text="Axes") | ||||
| subrow = row.row(align=True) | subrow = row.row(align=True) | ||||
| subrow.prop(overlay, "show_axis_x", text="X", toggle=True) | subrow.prop(overlay, "show_axis_x", text="X", toggle=True) | ||||
| subrow.prop(overlay, "show_axis_y", text="Y", toggle=True) | subrow.prop(overlay, "show_axis_y", text="Y", toggle=True) | ||||
| ▲ Show 20 Lines • Show All 1,254 Lines • Show Last 20 Lines | |||||
These settings also have an effect for ortho side views. So overlay.show_floor should be overlay.show_floor or overlay.show_ortho_grid here.