Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/space_userpref.py
| Show First 20 Lines • Show All 2,126 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| light = system.solid_lights[3] | light = system.solid_lights[3] | ||||
| self.opengl_light_buttons(column, light) | self.opengl_light_buttons(column, light) | ||||
| layout.separator() | layout.separator() | ||||
| layout.prop(system, "light_ambient") | layout.prop(system, "light_ambient") | ||||
| class ExperimentalPanel: | |||||
| bl_space_type = 'PREFERENCES' | |||||
| bl_region_type = 'WINDOW' | |||||
| @classmethod | |||||
| def poll(cls, context): | |||||
| prefs = context.preferences | |||||
| return (prefs.active_section == 'EXPERIMENTAL') | |||||
| def draw(self, context): | |||||
| layout = self.layout | |||||
| layout.use_property_split = True | |||||
| layout.use_property_decorate = False | |||||
| self.draw_props(context, layout) | |||||
| class USERPREF_PT_experimental_virtual_reality(ExperimentalPanel, Panel): | |||||
| bl_label = "Virtual Reality" | |||||
| def draw_props(self, context, _layout): | |||||
| paths = context.preferences.filepaths | |||||
| col = self.layout.column() | |||||
| col.label(text="Scene Inspection") | |||||
| # Order of registration defines order in UI, | # Order of registration defines order in UI, | ||||
| # so dynamically generated classes are 'injected' in the intended order. | # so dynamically generated classes are 'injected' in the intended order. | ||||
| classes = ( | classes = ( | ||||
| USERPREF_PT_theme_user_interface, | USERPREF_PT_theme_user_interface, | ||||
| *ThemeGenericClassGenerator.generate_panel_classes_for_wcols(), | *ThemeGenericClassGenerator.generate_panel_classes_for_wcols(), | ||||
| USERPREF_HT_header, | USERPREF_HT_header, | ||||
| USERPREF_PT_navigation_bar, | USERPREF_PT_navigation_bar, | ||||
| USERPREF_PT_save_preferences, | USERPREF_PT_save_preferences, | ||||
| ▲ Show 20 Lines • Show All 66 Lines • ▼ Show 20 Lines | classes = ( | ||||
| USERPREF_PT_keymap, | USERPREF_PT_keymap, | ||||
| USERPREF_PT_addons, | USERPREF_PT_addons, | ||||
| USERPREF_PT_studiolight_lights, | USERPREF_PT_studiolight_lights, | ||||
| USERPREF_PT_studiolight_light_editor, | USERPREF_PT_studiolight_light_editor, | ||||
| USERPREF_PT_studiolight_matcaps, | USERPREF_PT_studiolight_matcaps, | ||||
| USERPREF_PT_studiolight_world, | USERPREF_PT_studiolight_world, | ||||
| USERPREF_PT_experimental_virtual_reality, | |||||
| # Add dynamically generated editor theme panels last, | # Add dynamically generated editor theme panels last, | ||||
| # so they show up last in the theme section. | # so they show up last in the theme section. | ||||
| *ThemeGenericClassGenerator.generate_panel_classes_from_theme_areas(), | *ThemeGenericClassGenerator.generate_panel_classes_from_theme_areas(), | ||||
| ) | ) | ||||
| if __name__ == "__main__": # only for live edit. | if __name__ == "__main__": # only for live edit. | ||||
| from bpy.utils import register_class | from bpy.utils import register_class | ||||
| for cls in classes: | for cls in classes: | ||||
| register_class(cls) | register_class(cls) | ||||