camera sensor ui fix: grey out values when not affecting camera
authorDalai Felinto <dfelinto@gmail.com>
Wed, 21 Nov 2012 19:08:27 +0000 (19:08 +0000)
committerDalai Felinto <dfelinto@gmail.com>
Wed, 21 Nov 2012 19:08:27 +0000 (19:08 +0000)
reviewed by Thomas Dinges (DingTo)

release/scripts/startup/bl_ui/properties_data_camera.py

index 5f6036c8945bedef40e65ddd7d36785be5ac19bf..25cecc90c70e0fdd3c220a6b44077a43fb2be256 100644 (file)
@@ -142,8 +142,12 @@ class DATA_PT_camera(CameraButtonsPanel, Panel):
         if cam.sensor_fit == 'AUTO':
             col.prop(cam, "sensor_width", text="Size")
         else:
-            col.prop(cam, "sensor_width", text="Width")
-            col.prop(cam, "sensor_height", text="Height")
+            sub = col.column()
+            sub.active = cam.sensor_fit == 'HORIZONTAL'
+            sub.prop(cam, "sensor_width", text="Width")
+            sub = col.column()
+            sub.active = cam.sensor_fit == 'VERTICAL'
+            sub.prop(cam, "sensor_height", text="Height")
 
         col = split.column(align=True)
         col.prop(cam, "sensor_fit", text="")