[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [41531] trunk/blender/release/scripts/ startup/bl_ui/properties_data_camera.py: Camera UI: tweaking panels, move clipping back because it's not part of the

Brecht Van Lommel brechtvanlommel at pandora.be
Fri Nov 4 19:10:50 CET 2011


Revision: 41531
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=41531
Author:   blendix
Date:     2011-11-04 18:10:50 +0000 (Fri, 04 Nov 2011)
Log Message:
-----------
Camera UI: tweaking panels, move clipping back because it's not part of the
preset, and move depth of field settings to a separate panel.

Modified Paths:
--------------
    trunk/blender/release/scripts/startup/bl_ui/properties_data_camera.py

Modified: trunk/blender/release/scripts/startup/bl_ui/properties_data_camera.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_data_camera.py	2011-11-04 16:57:11 UTC (rev 41530)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_data_camera.py	2011-11-04 18:10:50 UTC (rev 41531)
@@ -98,21 +98,15 @@
 
         split = layout.split()
 
-        col = split.column()
-        col.label(text="Depth of Field:")
-
-        col.prop(cam, "dof_object", text="")
-
-        col = col.column()
-        if cam.dof_object is not None:
-            col.enabled = False
-        col.prop(cam, "dof_distance", text="Distance")
-
         col = split.column(align=True)
         col.label(text="Shift:")
         col.prop(cam, "shift_x", text="X")
         col.prop(cam, "shift_y", text="Y")
 
+        col = split.column(align=True)
+        col.label(text="Clipping:")
+        col.prop(cam, "clip_start", text="Start")
+        col.prop(cam, "clip_end", text="End")
 
 class DATA_PT_camera(CameraButtonsPanel, Panel):
     bl_label = "Camera"
@@ -143,12 +137,25 @@
         col = split.column(align=True)
         col.prop(cam, "sensor_fit", text="")
 
-        layout.label(text="Clipping:")
-        row = layout.row(align=True)
-        row.prop(cam, "clip_start", text="Start")
-        row.prop(cam, "clip_end", text="End")
+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
+
+        layout.label(text="Focus:")
+
+        split = layout.split()
+        split.prop(cam, "dof_object", text="")
+
+        col = split.column()
+
+        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'}




More information about the Bf-blender-cvs mailing list