diff options
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_data_armature.py')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_data_armature.py | 33 |
1 files changed, 28 insertions, 5 deletions
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 |