fixed missing buttons if no bg image
authorJoseph Eagar <joeedh@gmail.com>
Thu, 14 Jan 2010 02:41:08 +0000 (02:41 +0000)
committerJoseph Eagar <joeedh@gmail.com>
Thu, 14 Jan 2010 02:41:08 +0000 (02:41 +0000)
release/scripts/ui/space_view3d.py

index db77918458a95e1b6856723eae698b6449233bef..a597916365ce10ef4cc1ab177dc56905f33b36b5 100644 (file)
@@ -200,7 +200,6 @@ class VIEW3D_MT_snap(bpy.types.Menu):
         layout.separator()
 
         layout.operator("view3d.snap_cursor_to_selected", text="Cursor to Selected")
-        layout.operator("view3d.snap_cursor_to_center", text="Cursor to Center")
         layout.operator("view3d.snap_cursor_to_grid", text="Cursor to Grid")
         layout.operator("view3d.snap_cursor_to_active", text="Cursor to Active")
 
@@ -1796,7 +1795,10 @@ class VIEW3D_PT_background_image(bpy.types.Panel):
         if bg:
             layout.active = view.display_background_image
             box = layout.box()
-            box.template_image(bg, "image", bg.image_user, compact=True)
+            if (bg.image):
+                box.template_image(bg, "image", bg.image_user, compact=True)
+            else:
+                box.template_ID(bg, "image", open="image.open")
             
             col = layout.column()
             col.label(text="Display Settings")