From 429136c89f653a0aee3253dae7ea90d524d11003 Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Wed, 15 Sep 2021 11:51:52 +0200 Subject: Fix Asset Browser cannot open containing file anymore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In {rB9cff9f9f5df0} asset_library was renamed → asset_library_ref. Missed to update this in assets.py. Differential Revision: https://developer.blender.org/D12497 --- release/scripts/startup/bl_operators/assets.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/release/scripts/startup/bl_operators/assets.py b/release/scripts/startup/bl_operators/assets.py index 8c76018b7a1..b241e537c38 100644 --- a/release/scripts/startup/bl_operators/assets.py +++ b/release/scripts/startup/bl_operators/assets.py @@ -85,9 +85,9 @@ class ASSET_OT_open_containing_blend_file(Operator): @classmethod def poll(cls, context): asset_file_handle = getattr(context, 'asset_file_handle', None) - asset_library = getattr(context, 'asset_library', None) + asset_library_ref = getattr(context, 'asset_library_ref', None) - if not asset_library: + if not asset_library_ref: cls.poll_message_set("No asset library selected") return False if not asset_file_handle: @@ -100,13 +100,13 @@ class ASSET_OT_open_containing_blend_file(Operator): def execute(self, context): asset_file_handle = context.asset_file_handle - asset_library = context.asset_library + asset_library_ref = context.asset_library_ref if asset_file_handle.local_id: self.report({'WARNING'}, "This asset is stored in the current blend file") return {'CANCELLED'} - asset_lib_path = bpy.types.AssetHandle.get_full_library_path(asset_file_handle, asset_library) + asset_lib_path = bpy.types.AssetHandle.get_full_library_path(asset_file_handle, asset_library_ref) self.open_in_new_blender(asset_lib_path) wm = context.window_manager -- cgit v1.2.3