AssetShelf(bpy_struct)

base class — bpy_struct

subclasses — IMAGE_AST_brush_paint, NODE_AST_compositor, VIEW3D_AST_brush_gpencil_paint, VIEW3D_AST_brush_gpencil_sculpt, VIEW3D_AST_brush_gpencil_vertex, VIEW3D_AST_brush_gpencil_weight, VIEW3D_AST_brush_sculpt, VIEW3D_AST_brush_sculpt_curves, VIEW3D_AST_brush_texture_paint, VIEW3D_AST_brush_vertex_paint, VIEW3D_AST_brush_weight_paint, VIEW3D_AST_pose_library

class bpy.types.AssetShelf(bpy_struct)

Regions for quick access to assets

asset_library_reference

Choose the asset library to display assets from (default 'ALL')

  • ALL All Libraries – Show assets from all of the listed asset libraries.

  • LOCAL Current File – Show the assets currently available in this Blender session.

  • ESSENTIALS Essentials – Show the basic building blocks and utilities coming with Blender.

  • CUSTOM Custom – Show assets from the asset libraries configured in the Preferences.

Type:

Literal[‘ALL’, ‘LOCAL’, ‘ESSENTIALS’, ‘CUSTOM’]

bl_activate_operator

Operator to call when activating an item with asset reference properties (default “”, never None)

Type:

str

bl_default_preview_size

Default size of the asset preview thumbnails in pixels (in [32, 256], default 0)

Type:

int

bl_drag_operator

Operator to call when dragging an item with asset reference properties (default “”, never None)

Type:

str

bl_idname

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

Type:

str

bl_options

Options for this asset shelf type (default set())

  • NO_ASSET_DRAG No Asset Dragging – Disable the default asset dragging on drag events. Useful for implementing custom dragging via custom key-map items..

  • DEFAULT_VISIBLE Visible by Default – Unhide the asset shelf when it’s available for the first time, otherwise it will be hidden.

  • STORE_ENABLED_CATALOGS_IN_PREFERENCES Store Enabled Catalogs in Preferences – Store the shelf’s enabled catalogs in the preferences rather than the local asset shelf settings.

  • ACTIVATE_FOR_CONTEXT_MENU When spawning a context menu for an asset, activate the asset and call `bl_activate_operator` if present, rather than just highlighting the asset.

Type:

set[Literal[‘NO_ASSET_DRAG’, ‘DEFAULT_VISIBLE’, ‘STORE_ENABLED_CATALOGS_IN_PREFERENCES’, ‘ACTIVATE_FOR_CONTEXT_MENU’]]

bl_space_type

The space where the asset shelf will show up in. Ignored for popup asset shelves which can be displayed in any space. (default 'EMPTY')

Type:

Literal[Space Type Items]

filter_action

Show Action data-blocks (default False)

Type:

bool

filter_annotations

Show Annotation data-blocks (default False)

Type:

bool

filter_armature

Show Armature data-blocks (default False)

Type:

bool

filter_brush

Show Brushes data-blocks (default False)

Type:

bool

filter_cachefile

Show Cache File data-blocks (default False)

Type:

bool

filter_camera

Show Camera data-blocks (default False)

Type:

bool

filter_curve

Show Curve data-blocks (default False)

Type:

bool

filter_curves

Show/hide Curves data-blocks (default False)

Type:

bool

filter_font

Show Font data-blocks (default False)

Type:

bool

filter_grease_pencil

Show Grease Pencil data-blocks (default False)

Type:

bool

filter_group

Show Collection data-blocks (default False)

Type:

bool

filter_image

Show Image data-blocks (default False)

Type:

bool

filter_lattice

Show Lattice data-blocks (default False)

Type:

bool

filter_light

Show Light data-blocks (default False)

Type:

bool

filter_light_probe

Show Light Probe data-blocks (default False)

Type:

bool

filter_linestyle

Show Freestyle’s Line Style data-blocks (default False)

Type:

bool

filter_mask

Show Mask data-blocks (default False)

Type:

bool

filter_material

Show Material data-blocks (default False)

Type:

bool

filter_mesh

Show Mesh data-blocks (default False)

Type:

bool

filter_metaball

Show Metaball data-blocks (default False)

Type:

bool

filter_movie_clip

Show Movie Clip data-blocks (default False)

Type:

bool

filter_node_tree

Show Node Tree data-blocks (default False)

Type:

bool

filter_object

Show Object data-blocks (default False)

Type:

bool

filter_paint_curve

Show Paint Curve data-blocks (default False)

Type:

bool

filter_palette

Show Palette data-blocks (default False)

Type:

bool

filter_particle_settings

Show Particle Settings data-blocks (default False)

Type:

bool

filter_pointcloud

Show/hide Point Cloud data-blocks (default False)

Type:

bool

filter_scene

Show Scene data-blocks (default False)

Type:

bool

filter_sound

Show Sound data-blocks (default False)

Type:

bool

filter_speaker

Show Speaker data-blocks (default False)

Type:

bool

filter_text

Show Text data-blocks (default False)

Type:

bool

filter_texture

Show Texture data-blocks (default False)

Type:

bool

filter_volume

Show/hide Volume data-blocks (default False)

Type:

bool

filter_work_space

Show workspace data-blocks (default False)

Type:

bool

filter_world

Show World data-blocks (default False)

Type:

bool

preview_size

Size of the asset preview thumbnails in pixels (in [24, 256], default 0)

Type:

int

search_filter

Filter assets by name (default “”, never None)

Type:

str

show_names

Show the asset name together with the preview. Otherwise only the preview will be visible. (default False)

Type:

bool

classmethod poll(context)

If this method returns a non-null output, the asset shelf will be visible

Return type:

bool

classmethod asset_poll(asset)

Determine if an asset should be visible in the asset shelf. If this method returns a non-null output, the asset will be visible.

Return type:

bool

classmethod get_active_asset()

Return a reference to the asset that should be highlighted as active in the asset shelf

Returns:

The weak reference to the asset to be highlighted as active, or None

Return type:

AssetWeakReference

classmethod draw_context_menu(context, asset, layout)

Draw UI elements into the context menu UI layout displayed on right click

classmethod bl_rna_get_subclass(id, default=None, /)
Parameters:

id (str) – The RNA type identifier.

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.

Returns:

The class or default when not found.

Return type:

type

Inherited Properties

Inherited Functions