diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2016-10-04 23:00:46 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2016-10-05 01:02:05 +0300 |
commit | 5e8c4ae75b20cd2e3e1ad7fc3f1437a2ca395b9c (patch) | |
tree | 74df8147ae571eb86ef9d42cf0a1f55fc287310a /release | |
parent | 3a4c1db14be6b61c3648f9ddad2a05622a2e1399 (diff) |
Barebones for viewport code apart from 2.7x drawing code
A new option (set in the properties region) allows the user to pick the
"new viewport" for the rendering (in the UI: Modern Viewport).
For now we have a semi-blank file (view3d_draw.c) that can starts to take
over the drawing pipeline.
I can't guarantee we will be able to keep both drawing systems working
through the entire 2.8 development, but it should do for now.
also, we can use branches for some of the viewport development, but it's
better to keep things in 2.8 whenever we can, so people can test it.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 85011415192..3b379dfab43 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -3090,7 +3090,7 @@ class VIEW3D_PT_view3d_display(Panel): @classmethod def poll(cls, context): view = context.space_data - return (view) + return (view) and not view.use_modern_viewport def draw(self, context): layout = self.layout @@ -3188,6 +3188,11 @@ class VIEW3D_PT_view3d_shading(Panel): bl_region_type = 'UI' bl_label = "Shading" + @classmethod + def poll(cls, context): + view = context.space_data + return (view) and not view.use_modern_viewport + def draw(self, context): layout = self.layout @@ -3629,6 +3634,31 @@ class VIEW3D_PT_context_properties(Panel): rna_prop_ui.draw(self.layout, context, member, object, False) +class VIEW3D_PT_viewport_debug(Panel): + bl_space_type = 'VIEW_3D' + bl_region_type = 'UI' + bl_label = "..." + bl_options = {'DEFAULT_CLOSED'} + + @classmethod + def poll(cls, context): + view = context.space_data + return (view) + + def draw_header(self, context): + view = context.space_data + self.layout.prop(view, "use_modern_viewport") + + def draw(self, context): + layout = self.layout + view = context.space_data + + layout.active = view.use_modern_viewport + + col = layout.column() + col.label(text="Placeholder for debugging options") + + def register(): bpy.utils.register_module(__name__) |