Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/space_view3d.py
| Show First 20 Lines • Show All 4,830 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| 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") | |||||
| row = sub.row() | |||||
| row_el = row.column() | |||||
| row_el.prop(overlay, "show_ortho_grid", text="Grid") | |||||
| row_el.active = bool(view.region_quadviews or (view.region_3d.is_axis_aligned and not view.region_3d.is_perspective)) | |||||
| row.prop(overlay, "show_floor", text="Floor") | |||||
| if overlay.show_floor: | if overlay.show_floor: | ||||
| sub = col.column(align=True) | sub = col.column(align=True) | ||||
| sub.active = bool(overlay.show_floor or view.region_quadviews or not view.region_3d.is_perspective) | sub.active = bool(overlay.show_floor or view.region_quadviews or not view.region_3d.is_perspective) | ||||
| subsub = sub.row(align=True) | subsub = sub.row(align=True) | ||||
| subsub.active = overlay.show_floor | subsub.active = overlay.show_floor | ||||
| subsub.prop(overlay, "grid_scale", text="Scale") | subsub.prop(overlay, "grid_scale", text="Scale") | ||||
| subsub.prop(overlay, "grid_subdivisions", text="Subdivisions") | subsub.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.