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:
authorJoshua Leung <aligorith@gmail.com>2017-07-11 16:33:08 +0300
committerJoshua Leung <aligorith@gmail.com>2017-07-11 16:33:08 +0300
commit085ed00e42a5af31c03a3599c4fef38786fb6ba5 (patch)
tree7a56b7a8dbb03db9931a411f02d63a6e36375926 /release/scripts/startup/bl_ui/properties_data_armature.py
parentcd3b3e4a57c19bd94cd02cb041a908e2418fa4b0 (diff)
A bunch of fixes for Pose Library while checking on T51607
* Display a warning above the pose list if the pose library is in an invalid state (i.e. when it has keyframes but no pose-markers associated with those keyframes). This warning prompts users to run the "Sanitize Pose Library Action" operator, which should fix up such issues. * "Sanitize" operator now creates unique names for each newly create pose marker it generates, including the frame on which it found the pose
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_data_armature.py')
-rw-r--r--release/scripts/startup/bl_ui/properties_data_armature.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/properties_data_armature.py b/release/scripts/startup/bl_ui/properties_data_armature.py
index 8d3ab24b4cf..20038e1354a 100644
--- a/release/scripts/startup/bl_ui/properties_data_armature.py
+++ b/release/scripts/startup/bl_ui/properties_data_armature.py
@@ -178,6 +178,10 @@ class DATA_PT_pose_library(ArmatureButtonsPanel, Panel):
layout.template_ID(ob, "pose_library", new="poselib.new", unlink="poselib.unlink")
if poselib:
+ # warning about poselib being in an invalid state
+ if len(poselib.fcurves) > 0 and len(poselib.pose_markers) == 0:
+ layout.label(icon='ERROR', text="Error: Potentially corrupt library, run 'Sanitize' operator to fix")
+
# list of poses in pose library
row = layout.row()
row.template_list("UI_UL_list", "pose_markers", poselib, "pose_markers",