diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-02-23 06:08:14 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-02-23 06:08:14 +0300 |
commit | 43007d7fed61ad1b211cab68bc890010874e15a8 (patch) | |
tree | a41fa036fd599ae9f5e4abd62208b5929a9bc564 /release/scripts/ui | |
parent | 8378aa74fa8e1fc035962fccfe59eec72356f5f2 (diff) |
- fix python error for poselib UI when none is active.
- add info to create_dupli_objects rna function docstring.
- transform snap had bad define, disabling BVH accelerated snap (own fault).
Diffstat (limited to 'release/scripts/ui')
-rw-r--r-- | release/scripts/ui/properties_data_armature.py | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/release/scripts/ui/properties_data_armature.py b/release/scripts/ui/properties_data_armature.py index 5f5b5ad3878..2dc23fd3493 100644 --- a/release/scripts/ui/properties_data_armature.py +++ b/release/scripts/ui/properties_data_armature.py @@ -172,12 +172,6 @@ class DATA_PT_pose_library(ArmatureButtonsPanel, bpy.types.Panel): row.template_ID(ob, "pose_library", new="poselib.new", unlink="poselib.unlink") if poselib: - activePoseIndex = poselib.pose_markers.active_index - if poselib.pose_markers.active: - activePoseName = poselib.pose_markers.active.name - else: - activePoseName = "" - row = layout.row() row.template_list(poselib, "pose_markers", poselib.pose_markers, "active_index", rows=5) @@ -189,9 +183,12 @@ class DATA_PT_pose_library(ArmatureButtonsPanel, bpy.types.Panel): col.operator("poselib.pose_add", icon='ZOOMIN', text="") col.operator_context = 'EXEC_DEFAULT' # exec not invoke, so that menu doesn't need showing - col.operator("poselib.pose_remove", icon='ZOOMOUT', text="").pose = activePoseName - col.operator("poselib.apply_pose", icon='ZOOM_SELECTED', text="").pose_index = activePoseIndex + pose_marker_active = poselib.pose_markers.active + + if pose_marker_active is not None: + col.operator("poselib.pose_remove", icon='ZOOMOUT', text="").pose = pose_marker_active.name + col.operator("poselib.apply_pose", icon='ZOOM_SELECTED', text="").pose_index = poselib.pose_markers.active_index row = layout.row() row.operator("poselib.action_sanitise") |