[Bf-blender-cvs] [490a938] blender2.8: Move panel for new viewport up
Julian Eisel
noreply at git.blender.org
Fri Oct 7 03:25:26 CEST 2016
Commit: 490a938c8be993e7b53e2a2642d645959dd078b2
Author: Julian Eisel
Date: Fri Oct 7 03:22:48 2016 +0200
Branches: blender2.8
https://developer.blender.org/rB490a938c8be993e7b53e2a2642d645959dd078b2
Move panel for new viewport up
Makes it easier to enable it and avoids jumping of the panel when activating/deactivating it (because some panels disappear then). Also changed how panel title is drawn to make it behave like other panels.
===================================================================
M release/scripts/startup/bl_ui/space_view3d.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 3b379df..36ada1e 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -2977,6 +2977,31 @@ class VIEW3D_MT_edit_gpencil_transform(Menu):
# ********** Panel **********
+class VIEW3D_PT_viewport_debug(Panel):
+ bl_space_type = 'VIEW_3D'
+ bl_region_type = 'UI'
+ bl_label = "Modern Viewport"
+ 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", text="")
+
+ 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")
+
+
class VIEW3D_PT_grease_pencil(GreasePencilDataPanel, Panel):
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
@@ -3634,31 +3659,6 @@ 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__)
More information about the Bf-blender-cvs
mailing list