diff options
author | Sybren A. Stüvel <sybren@stuvel.eu> | 2021-08-06 16:26:02 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@stuvel.eu> | 2021-08-06 16:26:02 +0300 |
commit | aebb668f75b57ba7cbd8f8f8ad41f0ddb4f27389 (patch) | |
tree | 9f5290ea330bb18d4641d44ea5419f1b6755a525 /pose_library/operators.py | |
parent | 2aa81ec3365c5ed2478f9783f78a38e77c0ef6c1 (diff) |
Pose Library: update for rename of asset_library to asset_library_ref
Blender changed `context.asset_library` to `asset_library_ref` in
rB9cff9f9f5df034ca27848875c25471dd952c34c4, for which the pose library
is now also updated.
No functional changes.
Diffstat (limited to 'pose_library/operators.py')
-rw-r--r-- | pose_library/operators.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pose_library/operators.py b/pose_library/operators.py index 9014bdcb..959c9f1a 100644 --- a/pose_library/operators.py +++ b/pose_library/operators.py @@ -285,7 +285,7 @@ class PoseAssetUser: if not ( context.object and context.object.mode == "POSE" # This condition may not be desired. - and context.asset_library + and context.asset_library_ref and context.asset_file_handle ): return False @@ -302,14 +302,14 @@ class PoseAssetUser: pass def _load_and_use_pose(self, context: Context) -> Set[str]: - asset_library = context.asset_library + asset_library_ref = context.asset_library_ref asset = context.asset_file_handle - asset_lib_path = bpy.types.AssetHandle.get_full_library_path(asset, asset_library) + asset_lib_path = bpy.types.AssetHandle.get_full_library_path(asset, asset_library_ref) if not asset_lib_path: self.report( # type: ignore {"ERROR"}, - # TODO: Add some way to get the library name from the library reference (just asset_library.name?). + # TODO: Add some way to get the library name from the library reference (just asset_library_ref.name?). f"Selected asset {asset.name} could not be located inside the asset library", ) return {"CANCELLED"} |