Post #2875: : post_02877
🏷️ Tags
addon-installation ui-customization intermediate advanced solved
⚙️ Related PME Features
- Python Scripting
- Menu Editor
💬 Content
Flattiefolks:
Can the script also be installed from file (Preferences/Add-ons) as *.py Add-on?
Sure, just add add-on metadata:
bl_info = {
"name": "My Add-on Name",
"category": "Scene",
}
import bpy
...
Flattiefolks:
Is there any way to hide blender 2.80’s top bar completely including workspace tabs, not only collapsing file menu?
Yes, you can override TOPBAR_HT_upper_bar.draw_left() function:
import bpy
def my_draw_left(self, context):
layout = self.layout
window = context.window
screen = context.screen
bpy.types.TOPBAR_MT_editor_menus.draw_collapsible(context, layout)
layout.separator()
if not screen.show_fullscreen:
pass
else:
layout.operator(
"screen.back_to_previous",
icon='SCREEN_BACK',
text="Back to Previous",
)
def register():
bpy.types.TOPBAR_HT_upper_bar.default_draw_left = \
bpy.types.TOPBAR_HT_upper_bar.draw_left
bpy.types.TOPBAR_HT_upper_bar.draw_left = my_draw_left
def unregister():
bpy.types.TOPBAR_HT_upper_bar.draw_left = \
bpy.types.TOPBAR_HT_upper_bar.default_draw_left
if __name__ == "__main__":
register()
Comment or delete bpy.types.TOPBAR_MT_editor_menus.draw_collapsible(context, layout) line to hide menubar.
❤️ 2 likes