Merge branch 'master' into xr-controller-support
This commit is contained in:
commit
5555d7d52d
|
@ -60,7 +60,7 @@ class VIEW3D_PT_pose_library(Panel):
|
|||
activate_op_props, drag_op_props = layout.template_asset_view(
|
||||
"pose_assets",
|
||||
workspace,
|
||||
"asset_library",
|
||||
"asset_library_ref",
|
||||
wm,
|
||||
"pose_assets",
|
||||
workspace,
|
||||
|
@ -85,8 +85,8 @@ def pose_library_list_item_context_menu(self: UIList, context: Context) -> None:
|
|||
return True
|
||||
|
||||
def is_pose_library_asset_browser() -> bool:
|
||||
asset_library = getattr(context, "asset_library", None)
|
||||
if not asset_library:
|
||||
asset_library_ref = getattr(context, "asset_library_ref", None)
|
||||
if not asset_library_ref:
|
||||
return False
|
||||
asset = getattr(context, "asset_file_handle", None)
|
||||
if not asset:
|
||||
|
|
|
@ -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"}
|
||||
|
|
Loading…
Reference in New Issue