Merging r39717 through r39983 from trunk into soc-2011-tomato
[blender.git] / release / scripts / startup / bl_ui / space_view3d.py
index c1add444bf1c613d8a2cad4d123d7645179c9ba3..6a9767f6743c6b90d09b50944b9f39fe63649fe3 100644 (file)
@@ -179,9 +179,9 @@ class VIEW3D_MT_transform(Menu):
 
         layout.operator("object.randomize_transform")
         layout.operator("object.align")
-        
+
         layout.separator()
-        
+
         layout.operator("object.anim_transforms_to_deltas")
 
 
@@ -1273,6 +1273,7 @@ class VIEW3D_MT_pose_transform(Menu):
 
         layout.operator("pose.user_transforms_clear", text="Reset unkeyed")
 
+
 class VIEW3D_MT_pose_slide(Menu):
     bl_label = "In-Betweens"
 
@@ -2080,9 +2081,11 @@ class VIEW3D_PT_view3d_properties(Panel):
         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()
@@ -2183,6 +2186,16 @@ class VIEW3D_PT_view3d_display(Panel):
 
         layout.separator()
 
+        layout.prop(view, "show_reconstruction")
+        if view.show_reconstruction:
+            layout.label(text="Bundle type:")
+            layout.prop(view, "bundle_draw_type", text="")
+            layout.prop(view, "bundle_draw_size")
+            layout.prop(view, "show_bundle_name")
+            layout.prop(view, "show_camera_path")
+
+        layout.separator()
+
         region = view.region_quadview
 
         layout.operator("screen.region_quadview", text="Toggle Quad View")
@@ -2288,8 +2301,10 @@ class VIEW3D_PT_background_image(Panel):
             box = layout.box()
             row = box.row(align=True)
             row.prop(bg, "show_expanded", text="", emboss=False)
-            if bg.image:
+            if bg.source == 'IMAGE' and bg.image:
                 row.prop(bg.image, "name", text="", emboss=False)
+            if bg.source == 'MOVIE' and bg.clip:
+                row.prop(bg.clip, "name", text="", emboss=False)
             else:
                 row.label(text="Not Set")
             row.operator("view3d.background_image_remove", text="", emboss=False, icon='X').index = i
@@ -2298,10 +2313,25 @@ class VIEW3D_PT_background_image(Panel):
 
             if bg.show_expanded:
                 row = box.row()
-                row.template_ID(bg, "image", open="image.open")
-                if (bg.image):
-                    box.template_image(bg, "image", bg.image_user, compact=True)
+                row.prop(bg, "source", expand=True)
+
+                hasbg = False
+                if bg.source == 'IMAGE':
+                    row = box.row()
+                    row.template_ID(bg, "image", open="image.open")
+                    if (bg.image):
+                        box.template_image(bg, "image", bg.image_user, compact=True)
+                        hasbg = True
+
+                elif bg.source == 'MOVIE':
+                    row = box.row()
+                    row.template_ID(bg, "clip", open="clip.open")
+
+                    if bg.clip:
+                        box.template_movieclip(bg, "clip", compact=True)
+                        hasbg = True
 
+                if hasbg:
                     box.prop(bg, "opacity", slider=True)
                     if bg.view_axis != 'CAMERA':
                         box.prop(bg, "size")