Application Icons (bpy.app.icons)

bpy.app.icons.new_triangles(range, coords, colors)

Create a new icon from triangle geometry.

Parameters:
  • range (tuple[int, int]) – Pair of ints.

  • coords (bytes) – Sequence of bytes (6 floats for one triangle) for (X, Y) coordinates.

  • colors (bytes) – Sequence of bytes (12 for one triangles) for RGBA.

Returns:

Unique icon value (pass to interface icon_value argument).

Return type:

int

bpy.app.icons.new_triangles_from_file(filepath)

Create a new icon from triangle geometry.

Parameters:

filepath (str | bytes.) – File path.

Returns:

Unique icon value (pass to interface icon_value argument).

Return type:

int

bpy.app.icons.release(icon_id)

Release the icon.