UI_UL_list(UIList)

base classes — bpy_struct, UIList

class bpy.types.UI_UL_list(UIList)
static filter_items_by_name(pattern, bitflag, items, propname='name', flags=None, reverse=False)

Set FILTER_ITEM for items which name matches filter_name one (case-insensitive).

Parameters:
  • pattern (str) – Filtering pattern (shell-style glob, case-insensitive).

  • bitflag (int) – Bit to set on matching items.

  • items (Sequence[Any]) – Collection to filter.

  • propname (str) – Name of the string property on each item to match against.

  • flags (Sequence[int] | None) – Existing flag list to update; one int per item. None allocates a new list.

  • reverse (bool) – Invert the match (set the bit on non-matching items).

Returns:

Updated flags list, or an empty list when no filtering was needed.

Return type:

list[int]

classmethod sort_items_by_name(items, propname='name')

Re-order items using their names (case-insensitive).

Parameters:
  • items (Sequence[Any]) – Collection to sort.

  • propname (str) – Name of the string property on each item to sort by.

Returns:

A list mapping original index to new index, or an empty list when no sorting was needed.

Return type:

list[int]

static sort_items_helper(sort_data, key, reverse=False)

Common sorting utility. Returns a neworder list mapping org_index -> new_index.

Parameters:
  • sort_data (list[tuple[int, Any, ...]]) – Unordered list of tuples [(org_index, ...), ...] to sort in place.

  • key (Callable[[tuple[int, Any, ...]], Any]) – Sort key callable, same as for the sorted builtin.

  • reverse (bool) – Reverse the sort order.

Returns:

A list mapping original index to new index.

Return type:

list[int]

classmethod bl_rna_get_subclass(id, default=None, /)
Parameters:
  • id (str) – The RNA type identifier.

  • default (bpy.types.Struct | None) – The value to return when not found.

Returns:

The RNA type or default when not found.

Return type:

bpy.types.Struct

classmethod bl_rna_get_subclass_py(id, default=None, /)
Parameters:
  • id (str) – The RNA type identifier.

  • default (type | None) – The value to return when not found.

Returns:

The class or default when not found.

Return type:

type

Inherited Properties

Inherited Functions