Cleanup: Animation: Remove pose library UI hint about the new asset shelf UI

Remove the 'Pose Library' panel from the Animation tab, which showed
the UI hint and toggle for the new asset shelf.

Reporting issue: blender/blender#121779

Co-authored-by: George Mavroeidis <gdmavroeidis@hotmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/124839
This commit is contained in:
George Mavroeidis
2024-07-22 12:33:28 +02:00
committed by Sybren A. Stüvel
parent 3c81984178
commit 8fc617d8e2

View File

@@ -47,7 +47,6 @@ class VIEW3D_AST_pose_library(bpy.types.AssetShelf):
@classmethod
def draw_context_menu(cls, _context: Context, _asset: AssetRepresentation, layout: UILayout):
# Make sure these operator properties match those used in `VIEW3D_PT_pose_library_legacy`.
layout.operator("poselib.apply_pose_asset", text="Apply Pose").flipped = False
layout.operator("poselib.apply_pose_asset", text="Apply Pose Flipped").flipped = True
@@ -65,21 +64,6 @@ class VIEW3D_AST_pose_library(bpy.types.AssetShelf):
layout.operator("asset.open_containing_blend_file")
class VIEW3D_PT_pose_library_legacy(PoseLibraryPanel, Panel):
bl_space_type = "VIEW_3D"
bl_region_type = "UI"
bl_category = "Animation"
bl_label = "Pose Library"
def draw(self, _context: Context) -> None:
layout = self.layout
layout.label(text="The pose library moved.", icon='INFO')
sub = layout.column(align=True)
sub.label(text="Pose assets are now available")
sub.label(text="in the asset shelf.")
layout.operator("screen.region_toggle", text="Toggle Asset Shelf").region_type = 'ASSET_SHELF'
def pose_library_asset_browser_context_menu(self: UIList, context: Context) -> None:
def is_pose_library_asset_browser() -> bool:
asset_library_ref = getattr(context, "asset_library_reference", None)
@@ -97,7 +81,6 @@ def pose_library_asset_browser_context_menu(self: UIList, context: Context) -> N
layout.separator()
# Make sure these operator properties match those used in `VIEW3D_PT_pose_library_legacy`.
layout.operator("poselib.apply_pose_asset", text="Apply Pose").flipped = False
layout.operator("poselib.apply_pose_asset", text="Apply Pose Flipped").flipped = True
@@ -200,7 +183,6 @@ def _on_blendfile_load_post(none, other_none) -> None:
classes = (
DOPESHEET_PT_asset_panel,
VIEW3D_PT_pose_library_legacy,
ASSETBROWSER_MT_asset,
VIEW3D_AST_pose_library,
)