Merging r39634 through r39716 from trunk into soc-2011-tomato
[blender-staging.git] / release / scripts / startup / bl_ui / space_view3d.py
index 0957833a2bd195f70bc1ece6d5e7704723077071..28b257102900e6f97f7c02688d142d72e4ea1534 100644 (file)
@@ -2073,9 +2073,11 @@ class VIEW3D_PT_view3d_properties(Panel):
         col.prop(view, "lens")
         col.label(text="Lock to Object:")
         col.prop(view, "lock_object", text="")
         col.prop(view, "lens")
         col.label(text="Lock to Object:")
         col.prop(view, "lock_object", text="")
-        if view.lock_object and view.lock_object.type == 'ARMATURE':
-            col.prop_search(view, "lock_bone", view.lock_object.data, "bones", text="")
-        elif not view.lock_object:
+        lock_object = view.lock_object
+        if lock_object:
+            if lock_object.type == 'ARMATURE':
+                col.prop_search(view, "lock_bone", lock_object.data, "edit_bones" if lock_object.mode == 'EDIT' else "bones", text="")
+        else:
             col.prop(view, "lock_cursor", text="Lock to Cursor")
 
         col = layout.column()
             col.prop(view, "lock_cursor", text="Lock to Cursor")
 
         col = layout.column()