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.
This commit is contained in:
@@ -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__)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user