Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/space_view3d.py
| Show First 20 Lines • Show All 2,975 Lines • ▼ Show 20 Lines | |||||
| # ********** Panel ********** | # ********** Panel ********** | ||||
| class VIEW3D_PT_viewport_debug(Panel): | class VIEW3D_PT_viewport_debug(Panel): | ||||
| bl_space_type = 'VIEW_3D' | bl_space_type = 'VIEW_3D' | ||||
| bl_region_type = 'UI' | bl_region_type = 'UI' | ||||
| bl_label = "Modern Viewport" | bl_label = "Modern Viewport" | ||||
| bl_options = {'DEFAULT_CLOSED'} | |||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| view = context.space_data | view = context.space_data | ||||
| return (view) | return (view) | ||||
| def draw_header(self, context): | |||||
| view = context.space_data | |||||
| self.layout.prop(view, "use_modern_viewport", text="") | |||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| view = context.space_data | view = context.space_data | ||||
| layout.active = view.use_modern_viewport | layout.prop(view, "viewport_engine") | ||||
| col = layout.column() | col = layout.column() | ||||
| col.active = view.viewport_engine == 'BLENDER_VIEWPORT' # new viewport | |||||
| col.label(text="Placeholder for debugging options") | col.label(text="Placeholder for debugging options") | ||||
| class VIEW3D_PT_grease_pencil(GreasePencilDataPanel, Panel): | class VIEW3D_PT_grease_pencil(GreasePencilDataPanel, Panel): | ||||
| bl_space_type = 'VIEW_3D' | bl_space_type = 'VIEW_3D' | ||||
| bl_region_type = 'UI' | bl_region_type = 'UI' | ||||
| # NOTE: this is just a wrapper around the generic GP Panel | # NOTE: this is just a wrapper around the generic GP Panel | ||||
| ▲ Show 20 Lines • Show All 100 Lines • ▼ Show 20 Lines | class VIEW3D_PT_view3d_display(Panel): | ||||
| bl_space_type = 'VIEW_3D' | bl_space_type = 'VIEW_3D' | ||||
| bl_region_type = 'UI' | bl_region_type = 'UI' | ||||
| bl_label = "Display" | bl_label = "Display" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| view = context.space_data | view = context.space_data | ||||
| return (view) and not view.use_modern_viewport | return (view) and view.viewport_engine == 'LEGACY_VIEWPORT' | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| view = context.space_data | view = context.space_data | ||||
| scene = context.scene | scene = context.scene | ||||
| col = layout.column() | col = layout.column() | ||||
| ▲ Show 20 Lines • Show All 84 Lines • ▼ Show 20 Lines | |||||
| class VIEW3D_PT_view3d_shading(Panel): | class VIEW3D_PT_view3d_shading(Panel): | ||||
| bl_space_type = 'VIEW_3D' | bl_space_type = 'VIEW_3D' | ||||
| bl_region_type = 'UI' | bl_region_type = 'UI' | ||||
| bl_label = "Shading" | bl_label = "Shading" | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| view = context.space_data | view = context.space_data | ||||
| return (view) and not view.use_modern_viewport | return (view) and view.viewport_engine == 'LEGACY_VIEWPORT' | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| view = context.space_data | view = context.space_data | ||||
| scene = context.scene | scene = context.scene | ||||
| gs = scene.game_settings | gs = scene.game_settings | ||||
| obj = context.object | obj = context.object | ||||
| ▲ Show 20 Lines • Show All 443 Lines • Show Last 20 Lines | |||||