Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@blender.org>2022-04-04 15:34:58 +0300
committerSybren A. Stüvel <sybren@blender.org>2022-04-04 15:43:17 +0300
commita824c076b7b2c052603b738c44e9b27d04f7d2c9 (patch)
tree0e1e5c788190f3788e94fdeec0cb03c924f9a427
parent068d2b086199e6e01b24addbe340a196f1bfff63 (diff)
Pose library: remove much of old pose library interface
Remove much of the old legacy pose library: - Remove from the Pose & Armature menus. - Remove from the default keymap. - Pose Library panel in Armature properties: Add "(legacy)" to title. - Add note that the functionality of that panel is obsolete, with a button that opens the manual on the chapter of the new pose library. - Add button to convert the selected legacy pose library to pose assets. - The rest of the functionality is greyed out to further communicate it's been deprecated. It's still functional, though. Ref: T93405
-rw-r--r--release/scripts/presets/keyconfig/keymap_data/blender_default.py4
-rw-r--r--release/scripts/startup/bl_ui/properties_data_armature.py33
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py17
3 files changed, 28 insertions, 26 deletions
diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
index 27556922f5e..1de71b8aac3 100644
--- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py
+++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
@@ -4463,10 +4463,6 @@ def km_pose(params):
("anim.keyframe_insert_menu", {"type": 'I', "value": 'PRESS'}, None),
("anim.keyframe_delete_v3d", {"type": 'I', "value": 'PRESS', "alt": True}, None),
("anim.keying_set_active_set", {"type": 'I', "value": 'PRESS', "shift": True, "ctrl": True, "alt": True}, None),
- ("poselib.browse_interactive", {"type": 'L', "value": 'PRESS', "alt": True}, None),
- ("poselib.pose_add", {"type": 'L', "value": 'PRESS', "shift": True}, None),
- ("poselib.pose_remove", {"type": 'L', "value": 'PRESS', "shift": True, "alt": True}, None),
- ("poselib.pose_rename", {"type": 'L', "value": 'PRESS', "shift": True, "ctrl": True}, None),
("pose.push", {"type": 'E', "value": 'PRESS', "ctrl": True}, None),
("pose.relax", {"type": 'E', "value": 'PRESS', "alt": True}, None),
("pose.breakdown", {"type": 'E', "value": 'PRESS', "shift": True}, None),
diff --git a/release/scripts/startup/bl_ui/properties_data_armature.py b/release/scripts/startup/bl_ui/properties_data_armature.py
index f8a2cbfed1e..e436fe0b18d 100644
--- a/release/scripts/startup/bl_ui/properties_data_armature.py
+++ b/release/scripts/startup/bl_ui/properties_data_armature.py
@@ -157,30 +157,53 @@ class DATA_PT_bone_groups(ArmatureButtonsPanel, Panel):
class DATA_PT_pose_library(ArmatureButtonsPanel, Panel):
- bl_label = "Pose Library"
+ bl_label = "Pose Library (Legacy)"
bl_options = {'DEFAULT_CLOSED'}
@classmethod
def poll(cls, context):
return (context.object and context.object.type == 'ARMATURE' and context.object.pose)
+ @staticmethod
+ def get_manual_url():
+ url_fmt = "https://docs.blender.org/manual/en/%d.%d/animation/armatures/posing/editing/pose_library.html"
+ return url_fmt % bpy.app.version[:2]
+
def draw(self, context):
layout = self.layout
+ col = layout.column(align=True)
+ col.label(text="This panel is a remainder of the old pose library,")
+ col.label(text="which was replaced by the Asset Browser.")
+
+ url = self.get_manual_url()
+ col.operator('wm.url_open', text="More Info", icon="WORLD").url = url
+
+ layout.separator()
+
ob = context.object
poselib = ob.pose_library
- layout.template_ID(ob, "pose_library", new="poselib.new", unlink="poselib.unlink")
+ col = layout.column(align=True)
+ col.template_ID(ob, "pose_library", new="poselib.new", unlink="poselib.unlink")
if poselib:
+ col.operator('poselib.convert_old_object_poselib',
+ text="Convert to Pose Assets", icon="ASSET_MANAGER")
+
+ # Put the deprecated stuff in its own sub-layout.
+
+ dep_layout = layout.column()
+ dep_layout.active = False
+
# warning about poselib being in an invalid state
if poselib.fcurves and not poselib.pose_markers:
- layout.label(icon='ERROR', text="Error: Potentially corrupt library, run 'Sanitize' operator to fix")
+ dep_layout.label(icon='ERROR', text="Error: Potentially corrupt library, run 'Sanitize' operator to fix")
# list of poses in pose library
- row = layout.row()
+ row = dep_layout.row()
row.template_list("UI_UL_list", "pose_markers", poselib, "pose_markers",
- poselib.pose_markers, "active_index", rows=5)
+ poselib.pose_markers, "active_index", rows=3)
# column of operators for active pose
# - goes beside list
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index a0336f7e7bf..3c663f1371a 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -3446,7 +3446,6 @@ class VIEW3D_MT_pose(Menu):
layout.separator()
- layout.menu("VIEW3D_MT_pose_library")
layout.menu("VIEW3D_MT_pose_motion")
layout.menu("VIEW3D_MT_pose_group")
@@ -3528,21 +3527,6 @@ class VIEW3D_MT_pose_propagate(Menu):
layout.operator("pose.propagate", text="On Selected Markers").mode = 'SELECTED_MARKERS'
-class VIEW3D_MT_pose_library(Menu):
- bl_label = "Pose Library"
-
- def draw(self, _context):
- layout = self.layout
-
- layout.operator("poselib.browse_interactive", text="Browse Poses...")
-
- layout.separator()
-
- layout.operator("poselib.pose_add", text="Add Pose...")
- layout.operator("poselib.pose_rename", text="Rename Pose...")
- layout.operator("poselib.pose_remove", text="Remove Pose...")
-
-
class VIEW3D_MT_pose_motion(Menu):
bl_label = "Motion Paths"
@@ -7683,7 +7667,6 @@ classes = (
VIEW3D_MT_pose_transform,
VIEW3D_MT_pose_slide,
VIEW3D_MT_pose_propagate,
- VIEW3D_MT_pose_library,
VIEW3D_MT_pose_motion,
VIEW3D_MT_pose_group,
VIEW3D_MT_pose_ik,