Cycles: svn merge -r41225:41232 ^/trunk/blender
[blender.git] / release / scripts / startup / bl_ui / properties_data_camera.py
index 5255af40951d6604fba37cf071695f224eec16b0..7787773177762d79f0bd39dab662058e478c7274 100644 (file)
@@ -100,18 +100,23 @@ class DATA_PT_camera(CameraButtonsPanel, Panel):
         col.prop(cam, "clip_start", text="Start")
         col.prop(cam, "clip_end", text="End")
 
-        layout.label(text="Depth of Field:")
+class DATA_PT_camera_dof(CameraButtonsPanel, Panel):
+    bl_label = "Depth of Field"
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
+
+    def draw(self, context):
+        layout = self.layout
+
+        cam = context.camera
 
         split = layout.split()
         split.prop(cam, "dof_object", text="")
 
         col = split.column()
 
-        if cam.dof_object is not None:
-            col.enabled = False
+        col.active = cam.dof_object is None
         col.prop(cam, "dof_distance", text="Distance")
 
-
 class DATA_PT_camera_display(CameraButtonsPanel, Panel):
     bl_label = "Display"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}