diff --git a/scripts/startup/bl_ui/space_view3d.py b/scripts/startup/bl_ui/space_view3d.py index 275a51a3d8a..d903c2f0d47 100644 --- a/scripts/startup/bl_ui/space_view3d.py +++ b/scripts/startup/bl_ui/space_view3d.py @@ -8335,7 +8335,7 @@ class VIEW3D_AST_sculpt_brushes(bpy.types.AssetShelf): if not prefs.experimental.use_extended_asset_browser: return False - return bool(context.object and context.object.mode == 'SCULPT') + return context.mode == 'SCULPT' @classmethod def asset_poll(cls, asset): diff --git a/scripts/templates_py/ui_asset_shelf.py b/scripts/templates_py/ui_asset_shelf.py index dd5b3af1fae..43c02f8bf14 100644 --- a/scripts/templates_py/ui_asset_shelf.py +++ b/scripts/templates_py/ui_asset_shelf.py @@ -7,7 +7,7 @@ class MyAssetShelf(bpy.types.AssetShelf): @classmethod def poll(cls, context): - return bool(context.object and context.object.mode == 'OBJECT') + return context.mode == 'OBJECT' @classmethod def asset_poll(cls, asset):