[Bf-blender-cvs] [0b178a2] temp-sybren-poselib: Poselib UI updates
Sybren A. Stüvel
noreply at git.blender.org
Fri Sep 30 18:12:33 CEST 2016
Commit: 0b178a297bb5a17a6542e03e385f0fb4f4e5fa4a
Author: Sybren A. Stüvel
Date: Fri Sep 30 14:03:27 2016 +0200
Branches: temp-sybren-poselib
https://developer.blender.org/rB0b178a297bb5a17a6542e03e385f0fb4f4e5fa4a
Poselib UI updates
===================================================================
M release/scripts/startup/bl_ui/properties_data_armature.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/properties_data_armature.py b/release/scripts/startup/bl_ui/properties_data_armature.py
index fef384b..fb45566 100644
--- a/release/scripts/startup/bl_ui/properties_data_armature.py
+++ b/release/scripts/startup/bl_ui/properties_data_armature.py
@@ -177,35 +177,36 @@ class DATA_PT_pose_library(ArmatureButtonsPanel, Panel):
layout.template_ID(ob, "pose_library", new="poselib.new", unlink="poselib.unlink")
- if poselib:
- # list of poses in pose library
- row = layout.row()
- row.template_list("UI_UL_list", "pose_markers", poselib, "pose_markers",
- poselib.pose_markers, "active_index", rows=5)
-
- # column of operators for active pose
- # - goes beside list
- col = row.column(align=True)
+ if not poselib:
+ return
- # invoke should still be used for 'add', as it is needed to allow
- # add/replace options to be used properly
- col.operator("poselib.pose_add", icon='ZOOMIN', text="")
+ # list of poses in pose library
+ row = layout.row()
+ row.template_list("UI_UL_list", "pose_markers", poselib, "pose_markers",
+ poselib.pose_markers, "active_index", rows=5)
- col.operator_context = 'EXEC_DEFAULT' # exec not invoke, so that menu doesn't need showing
+ # column of operators for active pose
+ # - goes beside list
+ col = row.column(align=True)
+ col.operator_context = 'EXEC_DEFAULT' # exec not invoke, so that menu doesn't need showing
- pose_marker_active = poselib.pose_markers.active
+ # invoke should still be used for 'add', as it is needed to allow
+ # add/replace options to be used properly
+ col.operator("poselib.pose_add", icon='ZOOMIN', text="")
+ pose_marker_active = poselib.pose_markers.active
- if pose_marker_active is not None:
- col.operator("poselib.pose_remove", icon='ZOOMOUT', text="")
- col.operator("poselib.apply_pose", icon='ZOOM_SELECTED', text="").pose_index = poselib.pose_markers.active_index
+ if pose_marker_active is not None:
+ col.operator("poselib.pose_remove", icon='ZOOMOUT', text="")
+ col.operator("poselib.apply_pose", icon='ZOOM_SELECTED', text="").pose_index = poselib.pose_markers.active_index
- col.operator("poselib.action_sanitize", icon='HELP', text="") # XXX: put in menu?
+ col.operator("poselib.action_sanitize", icon='HELP', text="") # XXX: put in menu?
- if pose_marker_active is not None:
- col.operator("poselib.pose_move", icon='TRIA_UP', text="").direction = 'UP'
- col.operator("poselib.pose_move", icon='TRIA_DOWN', text="").direction = 'DOWN'
+ if pose_marker_active is not None:
+ col.operator("poselib.pose_move", icon='TRIA_UP', text="").direction = 'UP'
+ col.operator("poselib.pose_move", icon='TRIA_DOWN', text="").direction = 'DOWN'
- row.operator("poselib.render_previews")
+ layout.prop(pose_marker_active, "camera")
+ # layout.operator("poselib.render_previews")
# TODO: this panel will soon be deprecated too
class DATA_PT_ghost(ArmatureButtonsPanel, Panel):
More information about the Bf-blender-cvs
mailing list