UIList(bpy_struct)

base class — bpy_struct

subclasses — UI_UL_list, SCENE_UL_keying_set_paths, MATERIAL_UL_matslots, MASK_UL_layers, RENDER_UL_renderlayers, PHYSICS_UL_dynapaint_surfaces, TEXTURE_UL_texslots, MESH_UL_shape_keys, MESH_UL_uvmaps_vcols, MESH_UL_vgroups, CLIP_UL_tracking_objects

class bpy.types.UIList(bpy_struct)

UI list containing the elements of a collection

bl_idname

If this is set, the uilist gets a custom ID, otherwise it takes the name of the class used to define the uilist (for example, if the class name is “OBJECT_UL_vgroups”, and bl_idname is not set by the script, then bl_idname = “OBJECT_UL_vgroups”)

Type :string, default “”, (never None)
layout_type
  • DEFAULT Default Layout, Use the default, multi-rows layout.
  • COMPACT Compact Layout, Use the compact, single-row layout.
  • GRID Grid Layout, Use the grid-based layout.
Type :enum in [‘DEFAULT’, ‘COMPACT’, ‘GRID’], default ‘DEFAULT’, (readonly)
draw_item(context, layout, data, item, icon, active_data, active_property, index=0)

Draw an item in the list (NOTE: when you define your own draw_item function, you may want to check given ‘item’ is of the right type...)

Parameters:
  • layout (UILayout, (never None)) – Layout to draw the item
  • data (AnyType) – Data from which to take Collection property
  • item (AnyType) – Item of the collection property
  • icon (int in [0, inf]) – Icon of the item in the collection
  • active_data (AnyType, (never None)) – Data from which to take property for the active element
  • active_property (string, (never None)) – Identifier of property in active_data, for the active element
  • index (int in [0, inf], (optional)) – Index of the item in the collection

Inherited Properties

Inherited Functions

Previous topic

UILayout(bpy_struct)

Next topic

UI_UL_list(UIList)