Skip to content

Layout Accordion

BleuRaven edited this page Mar 30, 2024 · 4 revisions

For use this:
image

  1. Import and register bbpl.
from . import bbpl
def register():
    bbpl.register()

def unregister():
    bbpl.unregister()
  1. Create and register and accordion pointer using add_ui_accordion() from bbpl.blender_layout.layout_accordion.
def register():
    bpy.types.Scene.my_accordion_pointer = bbpl.blender_layout.layout_accordion.add_ui_accordion(name="My Accordion ")
  1. Add your accordion pointer in a draw function. And use is_expend() to check if the accordion is open or not.
scene.my_accordion_pointer .draw(layout)
if scene.my_accordion_pointer.is_expend():
    pass # Data to show when is expend...

Here the result in my addon Blender For Unreal Engine:

Layout Extent Sections

Clone this wiki locally