[Bf-blender-cvs] [429136c89f6] master: Fix Asset Browser cannot open containing file anymore
Philipp Oeser
noreply at git.blender.org
Wed Sep 15 12:09:47 CEST 2021
Commit: 429136c89f653a0aee3253dae7ea90d524d11003
Author: Philipp Oeser
Date: Wed Sep 15 11:51:52 2021 +0200
Branches: master
https://developer.blender.org/rB429136c89f653a0aee3253dae7ea90d524d11003
Fix Asset Browser cannot open containing file anymore
In {rB9cff9f9f5df0} asset_library was renamed → asset_library_ref.
Missed to update this in assets.py.
Differential Revision: https://developer.blender.org/D12497
===================================================================
M release/scripts/startup/bl_operators/assets.py
===================================================================
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
More information about the Bf-blender-cvs
mailing list