AssetShelf(bpy_struct)#

base class — bpy_struct

subclasses — IMAGE_AST_brush_paint, 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

  • 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:

enum in [‘ALL’, ‘LOCAL’, ‘ESSENTIALS’, ‘CUSTOM’], default ‘ALL’

bl_activate_operator#

Operator to call when activating an item with asset reference properties

Type:

string, default “”, (never None)

bl_default_preview_size#

Default size of the asset preview thumbnails in pixels

Type:

int in [32, 256], default 0

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”)

Type:

string, default “”, (never None)

bl_options#

Options for this asset shelf type

  • 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.

Type:

enum set in {‘NO_ASSET_DRAG’, ‘DEFAULT_VISIBLE’, ‘STORE_ENABLED_CATALOGS_IN_PREFERENCES’}, default {‘NO_ASSET_DRAG’}

bl_space_type#

The space where the asset shelf is going to be used in

Type:

enum in Space Type Items, default ‘EMPTY’

preview_size#

Size of the asset preview thumbnails in pixels

Type:

int in [32, 256], default 0

search_filter#

Filter assets by name

Type:

string, default “”, (never None)

show_names#

Show the asset name together with the preview. Otherwise only the preview will be visible.

Type:

boolean, default False

classmethod poll(context)#

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

Return type:

boolean

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:

boolean

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 hightlighted 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 (string) – The RNA type identifier.

Returns:

The RNA type or default when not found.

Return type:

bpy.types.Struct subclass

classmethod bl_rna_get_subclass_py(id, default=None)#
Parameters:

id (string) – The RNA type identifier.

Returns:

The class or default when not found.

Return type:

type

Inherited Properties#

Inherited Functions#