Camera tracking integration
authorSergey Sharybin <sergey.vfx@gmail.com>
Tue, 9 Aug 2011 15:12:20 +0000 (15:12 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Tue, 9 Aug 2011 15:12:20 +0000 (15:12 +0000)
===========================

Changes into sensor size use case.

There was problem with vertical sensor size which can't actually
affect on things due to we've got fixed image resolution. So
as soon horizontal size gets defined, both of sensor height
and vertical FOV is known and exposing it into UI makes things
difficult to understand.

That's why vertical sensor size was dropped.

Also added pixel aspect to camera settings fo clip editor.
Solver will sue this value rather than value from display
aspect ratio.

This pixel aspect would be copied to render settings after solving
so things should match now between footage, solving anf footage.

66 files changed:
release/scripts/presets/camera/APS-C_DSLR.py
release/scripts/presets/camera/Blender.py
release/scripts/presets/camera/Canon_1100D.py
release/scripts/presets/camera/Canon_1D.py
release/scripts/presets/camera/Canon_1DS.py
release/scripts/presets/camera/Canon_500D.py
release/scripts/presets/camera/Canon_550D.py
release/scripts/presets/camera/Canon_5D.py
release/scripts/presets/camera/Canon_600D.py
release/scripts/presets/camera/Canon_60D.py
release/scripts/presets/camera/Canon_7D.py
release/scripts/presets/camera/Nikon_D300S.py
release/scripts/presets/camera/Nikon_D3100.py
release/scripts/presets/camera/Nikon_D35.py
release/scripts/presets/camera/Nikon_D5000.py
release/scripts/presets/camera/Nikon_D5100.py
release/scripts/presets/camera/Nikon_D7000.py
release/scripts/presets/camera/Nikon_D90.py
release/scripts/presets/camera/Red_Epic.py
release/scripts/presets/camera/Red_One_2K.py
release/scripts/presets/camera/Red_One_3K.py
release/scripts/presets/camera/Red_One_4K.py
release/scripts/presets/camera/full_frame_35mm_film.py
release/scripts/presets/camera/micro_four_thirds.py
release/scripts/presets/camera/super_16_film.py
release/scripts/presets/camera/super_35_film.py
release/scripts/presets/tracking_camera/Blender.py
release/scripts/presets/tracking_camera/Canon_1100D.py
release/scripts/presets/tracking_camera/Canon_1D.py
release/scripts/presets/tracking_camera/Canon_1DS.py
release/scripts/presets/tracking_camera/Canon_500D.py
release/scripts/presets/tracking_camera/Canon_550D.py
release/scripts/presets/tracking_camera/Canon_5D.py
release/scripts/presets/tracking_camera/Canon_600D.py
release/scripts/presets/tracking_camera/Canon_60D.py
release/scripts/presets/tracking_camera/Canon_7D.py
release/scripts/presets/tracking_camera/Nikon_D300S.py
release/scripts/presets/tracking_camera/Nikon_D3100.py
release/scripts/presets/tracking_camera/Nikon_D35.py
release/scripts/presets/tracking_camera/Nikon_D5000.py
release/scripts/presets/tracking_camera/Nikon_D5100.py
release/scripts/presets/tracking_camera/Nikon_D7000.py
release/scripts/presets/tracking_camera/Nikon_D90.py
release/scripts/presets/tracking_camera/Red_Epic.py
release/scripts/presets/tracking_camera/Red_One_2K.py
release/scripts/presets/tracking_camera/Red_One_3K.py
release/scripts/presets/tracking_camera/Red_One_4K.py
release/scripts/startup/bl_operators/presets.py
release/scripts/startup/bl_ui/properties_data_camera.py
release/scripts/startup/bl_ui/space_clip.py
source/blender/blenkernel/BKE_tracking.h
source/blender/blenkernel/intern/movieclip.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/tracking.c
source/blender/blenlib/BLI_math_rotation.h
source/blender/blenlib/intern/math_rotation.c
source/blender/blenloader/intern/readfile.c
source/blender/editors/space_clip/clip_draw.c
source/blender/editors/space_clip/space_clip.c
source/blender/editors/space_clip/tracking_ops.c
source/blender/editors/space_view3d/view3d_draw.c
source/blender/makesdna/DNA_camera_types.h
source/blender/makesdna/DNA_tracking_types.h
source/blender/makesrna/intern/rna_camera.c
source/blender/makesrna/intern/rna_movieclip.c
source/blender/makesrna/intern/rna_tracking.c

index ce49a2094a24d996f0e0fd4a21fac761363b0df7..facaa449079e64a4f7a485150a6ea0b91cb9be22 100644 (file)
@@ -1,3 +1,2 @@
 import bpy
-bpy.context.object.data.sensor_x = 22.3
-bpy.context.object.data.sensor_y = 14.9
+bpy.context.object.data.sensor_width = 22.3
index a88351c3bc4c0735ee0258627219a78a07c1de34..52143ced67dd5dad20118592695bf4abe311e2d3 100644 (file)
@@ -1,3 +1,2 @@
 import bpy
-bpy.context.object.data.sensor_x = 32
-bpy.context.object.data.sensor_y = 18
+bpy.context.object.data.sensor_width = 32
index 3db842e3bc6026d131f2eb3e85734f1a7dd0f13e..ae6a4c2c893b51e8a9ad76a23cfd1f1221d27459 100644 (file)
@@ -1,3 +1,2 @@
 import bpy
-bpy.context.object.data.sensor_x = 22.2
-bpy.context.object.data.sensor_y = 14.7
+bpy.context.object.data.sensor_width = 22.2
index 7345787b87ee22681c9cfaa8d5430abc2425952d..3b7fdecfc9646ea10386b2ef5577d2bb5499b6b2 100644 (file)
@@ -1,3 +1,2 @@
 import bpy
-bpy.context.object.data.sensor_x = 27.9
-bpy.context.object.data.sensor_y = 18.6
+bpy.context.object.data.sensor_width = 27.9
index 28b5cc86a0bed79a8b19478d838ea08842339e66..dd1c1370d80af430783c83ca02de3777b4e752a2 100644 (file)
@@ -1,3 +1,2 @@
 import bpy
-bpy.context.object.data.sensor_x = 36.0
-bpy.context.object.data.sensor_y = 24.0
+bpy.context.object.data.sensor_width = 36.0
index ce49a2094a24d996f0e0fd4a21fac761363b0df7..facaa449079e64a4f7a485150a6ea0b91cb9be22 100644 (file)
@@ -1,3 +1,2 @@
 import bpy
-bpy.context.object.data.sensor_x = 22.3
-bpy.context.object.data.sensor_y = 14.9
+bpy.context.object.data.sensor_width = 22.3
index ce49a2094a24d996f0e0fd4a21fac761363b0df7..facaa449079e64a4f7a485150a6ea0b91cb9be22 100644 (file)
@@ -1,3 +1,2 @@
 import bpy
-bpy.context.object.data.sensor_x = 22.3
-bpy.context.object.data.sensor_y = 14.9
+bpy.context.object.data.sensor_width = 22.3
index 28b5cc86a0bed79a8b19478d838ea08842339e66..dd1c1370d80af430783c83ca02de3777b4e752a2 100644 (file)
@@ -1,3 +1,2 @@
 import bpy
-bpy.context.object.data.sensor_x = 36.0
-bpy.context.object.data.sensor_y = 24.0
+bpy.context.object.data.sensor_width = 36.0
index ce49a2094a24d996f0e0fd4a21fac761363b0df7..facaa449079e64a4f7a485150a6ea0b91cb9be22 100644 (file)
@@ -1,3 +1,2 @@
 import bpy
-bpy.context.object.data.sensor_x = 22.3
-bpy.context.object.data.sensor_y = 14.9
+bpy.context.object.data.sensor_width = 22.3
index ce49a2094a24d996f0e0fd4a21fac761363b0df7..facaa449079e64a4f7a485150a6ea0b91cb9be22 100644 (file)
@@ -1,3 +1,2 @@
 import bpy
-bpy.context.object.data.sensor_x = 22.3
-bpy.context.object.data.sensor_y = 14.9
+bpy.context.object.data.sensor_width = 22.3
index ce49a2094a24d996f0e0fd4a21fac761363b0df7..facaa449079e64a4f7a485150a6ea0b91cb9be22 100644 (file)
@@ -1,3 +1,2 @@
 import bpy
-bpy.context.object.data.sensor_x = 22.3
-bpy.context.object.data.sensor_y = 14.9
+bpy.context.object.data.sensor_width = 22.3
index 820252f7300beaa66d61b661240eb7569b6cbf1d..bcafd2146ba4193d5acbacd5382d64ecf6d461bc 100644 (file)
@@ -1,3 +1,2 @@
 import bpy
-bpy.context.object.data.sensor_x = 23.6
-bpy.context.object.data.sensor_y = 15.8
+bpy.context.object.data.sensor_width = 23.6
index 6645f09ba01058e5ffcc23545e66f47743bf1c5c..8dbd1df927c8f0894f0007590bf5f2cff6194f32 100644 (file)
@@ -1,3 +1,2 @@
 import bpy
-bpy.context.object.data.sensor_x = 23.1
-bpy.context.object.data.sensor_y = 15.4
+bpy.context.object.data.sensor_width = 23.1
index 7bfd488495db8e36eca79469c4386ddc29a49e5f..dd1c1370d80af430783c83ca02de3777b4e752a2 100644 (file)
@@ -1,3 +1,2 @@
 import bpy
-bpy.context.object.data.sensor_x = 36.0
-bpy.context.object.data.sensor_y = 23.9
+bpy.context.object.data.sensor_width = 36.0
index 820252f7300beaa66d61b661240eb7569b6cbf1d..bcafd2146ba4193d5acbacd5382d64ecf6d461bc 100644 (file)
@@ -1,3 +1,2 @@
 import bpy
-bpy.context.object.data.sensor_x = 23.6
-bpy.context.object.data.sensor_y = 15.8
+bpy.context.object.data.sensor_width = 23.6
index ac62d86f5c065a7172e04bdb1c4c130458df7861..bcafd2146ba4193d5acbacd5382d64ecf6d461bc 100644 (file)
@@ -1,3 +1,2 @@
 import bpy
-bpy.context.object.data.sensor_x = 23.6
-bpy.context.object.data.sensor_y = 15.6
+bpy.context.object.data.sensor_width = 23.6
index ac62d86f5c065a7172e04bdb1c4c130458df7861..bcafd2146ba4193d5acbacd5382d64ecf6d461bc 100644 (file)
@@ -1,3 +1,2 @@
 import bpy
-bpy.context.object.data.sensor_x = 23.6
-bpy.context.object.data.sensor_y = 15.6
+bpy.context.object.data.sensor_width = 23.6
index 820252f7300beaa66d61b661240eb7569b6cbf1d..bcafd2146ba4193d5acbacd5382d64ecf6d461bc 100644 (file)
@@ -1,3 +1,2 @@
 import bpy
-bpy.context.object.data.sensor_x = 23.6
-bpy.context.object.data.sensor_y = 15.8
+bpy.context.object.data.sensor_width = 23.6
index 0939fd3d7622f53c39ab2a772c11784eea3efa51..1acc53924e6bd27306a306f5f134c1af181746bf 100644 (file)
@@ -1,3 +1,2 @@
 import bpy
-bpy.context.object.data.sensor_x = 30.0
-bpy.context.object.data.sensor_y = 15.0
+bpy.context.object.data.sensor_width = 30.0
index 53a4d34aa6645713b104cca9008c9870f895e306..bf6f986e35445531d2f1dee3c76bc85c6a17c0f0 100644 (file)
@@ -1,3 +1,2 @@
 import bpy
-bpy.context.object.data.sensor_x = 11.1
-bpy.context.object.data.sensor_y = 6.24
+bpy.context.object.data.sensor_width = 11.1
index 8234c990169444a1e605fb7b97e6d53ad121f6c5..4867839028b739d66580f9bb256471e28c837da2 100644 (file)
@@ -1,3 +1,2 @@
 import bpy
-bpy.context.object.data.sensor_x = 16.65
-bpy.context.object.data.sensor_y = 9.36
+bpy.context.object.data.sensor_width = 16.65
index 7f462a4e6cd76ea63ace5ae85e6b30b556fe0997..ae6a4c2c893b51e8a9ad76a23cfd1f1221d27459 100644 (file)
@@ -1,3 +1,2 @@
 import bpy
-bpy.context.object.data.sensor_x = 22.2
-bpy.context.object.data.sensor_y = 12.6
+bpy.context.object.data.sensor_width = 22.2
index ab25bb64ef2aa5cbb6617660f2dbdf036a347076..e9301942b3b4a271c80217ac425c1984d8dbbe59 100644 (file)
@@ -1,3 +1,2 @@
 import bpy
-bpy.context.object.data.sensor_x = 36
-bpy.context.object.data.sensor_y = 24
+bpy.context.object.data.sensor_width = 36
index 3eb4cb95423fb7a76e2a299b9e6eeffdbd9d5cd4..a6785886f5a07ebcc30a6e12b7604bbe051401d8 100644 (file)
@@ -1,3 +1,2 @@
 import bpy
-bpy.context.object.data.sensor_x = 17.3
-bpy.context.object.data.sensor_y = 13.0
+bpy.context.object.data.sensor_width = 17.3
index 665ef854fa20ce1ca6c8e9f38fac8c6e59135acc..36e4ea153fa68c169ba507535fa29c12c9d42276 100644 (file)
@@ -1,3 +1,2 @@
 import bpy
-bpy.context.object.data.sensor_x = 12.52
-bpy.context.object.data.sensor_y = 7.41
+bpy.context.object.data.sensor_width = 12.52
index e783044b323e484e68fdd8679a060cbca3836601..641f7034b670e39fd70a6521ab2b801ddb66d63a 100644 (file)
@@ -1,3 +1,2 @@
 import bpy
-bpy.context.object.data.sensor_x = 24.89
-bpy.context.object.data.sensor_y = 18.66
+bpy.context.object.data.sensor_width = 24.89
index cbc15e850db01bd6a52aad1d4d6d7f59193d9494..507cedac4fca931ed9590b875026bfe8dbb75e56 100644 (file)
@@ -2,9 +2,9 @@ import bpy
 camera = bpy.context.edit_movieclip.tracking.camera
 
 camera.sensor_width = 32.0
-camera.sensor_height = 18.0
 camera.units = 'MILLIMETERS'
 camera.focal_length = 35.0
+camera.pixel_aspect = 1
 camera.k1 = 0.0
 camera.k2 = 0.0
 camera.k3 = 0.0
index 0d6250300d63e2f10e8a5e3173bc254938cef3aa..7ea78412f4006156d425d21e9287b8bc7851ac67 100644 (file)
@@ -2,9 +2,9 @@ import bpy
 camera = bpy.context.edit_movieclip.tracking.camera
 
 camera.sensor_width = 22.2
-camera.sensor_height = 14.7
 camera.units = 'MILLIMETERS'
 camera.focal_length = 24.0
+camera.pixel_aspect = 1
 camera.k1 = 0.0
 camera.k2 = 0.0
 camera.k3 = 0.0
index c6ceee219f43379aff0824262734d93672f1427e..89590d3cc1940ca51fe07c70690f481059ba1ba7 100644 (file)
@@ -2,9 +2,9 @@ import bpy
 camera = bpy.context.edit_movieclip.tracking.camera
 
 camera.sensor_width = 27.9
-camera.sensor_height = 18.6
 camera.units = 'MILLIMETERS'
 camera.focal_length = 24.0
+camera.pixel_aspect = 1
 camera.k1 = 0.0
 camera.k2 = 0.0
 camera.k3 = 0.0
index 37feb5ff14ffd7a004f98acc85b6147ac8935cc4..7d9b6c8b39073b820a42df3e6cd936df431a0e32 100644 (file)
@@ -2,9 +2,9 @@ import bpy
 camera = bpy.context.edit_movieclip.tracking.camera
 
 camera.sensor_width = 36.0
-camera.sensor_height = 24.0
 camera.units = 'MILLIMETERS'
 camera.focal_length = 24.0
+camera.pixel_aspect = 1
 camera.k1 = 0.0
 camera.k2 = 0.0
 camera.k3 = 0.0
index 0d057d21e8d5036118701f33532ec7ed165347cd..3dd66c5b6092abdfdce63766661619525aced2cf 100644 (file)
@@ -2,9 +2,9 @@ import bpy
 camera = bpy.context.edit_movieclip.tracking.camera
 
 camera.sensor_width = 22.3
-camera.sensor_height = 14.9
 camera.units = 'MILLIMETERS'
 camera.focal_length = 24.0
+camera.pixel_aspect = 1
 camera.k1 = 0.0
 camera.k2 = 0.0
 camera.k3 = 0.0
index 0d057d21e8d5036118701f33532ec7ed165347cd..3dd66c5b6092abdfdce63766661619525aced2cf 100644 (file)
@@ -2,9 +2,9 @@ import bpy
 camera = bpy.context.edit_movieclip.tracking.camera
 
 camera.sensor_width = 22.3
-camera.sensor_height = 14.9
 camera.units = 'MILLIMETERS'
 camera.focal_length = 24.0
+camera.pixel_aspect = 1
 camera.k1 = 0.0
 camera.k2 = 0.0
 camera.k3 = 0.0
index 37feb5ff14ffd7a004f98acc85b6147ac8935cc4..7d9b6c8b39073b820a42df3e6cd936df431a0e32 100644 (file)
@@ -2,9 +2,9 @@ import bpy
 camera = bpy.context.edit_movieclip.tracking.camera
 
 camera.sensor_width = 36.0
-camera.sensor_height = 24.0
 camera.units = 'MILLIMETERS'
 camera.focal_length = 24.0
+camera.pixel_aspect = 1
 camera.k1 = 0.0
 camera.k2 = 0.0
 camera.k3 = 0.0
index 0d057d21e8d5036118701f33532ec7ed165347cd..3dd66c5b6092abdfdce63766661619525aced2cf 100644 (file)
@@ -2,9 +2,9 @@ import bpy
 camera = bpy.context.edit_movieclip.tracking.camera
 
 camera.sensor_width = 22.3
-camera.sensor_height = 14.9
 camera.units = 'MILLIMETERS'
 camera.focal_length = 24.0
+camera.pixel_aspect = 1
 camera.k1 = 0.0
 camera.k2 = 0.0
 camera.k3 = 0.0
index 0d057d21e8d5036118701f33532ec7ed165347cd..3dd66c5b6092abdfdce63766661619525aced2cf 100644 (file)
@@ -2,9 +2,9 @@ import bpy
 camera = bpy.context.edit_movieclip.tracking.camera
 
 camera.sensor_width = 22.3
-camera.sensor_height = 14.9
 camera.units = 'MILLIMETERS'
 camera.focal_length = 24.0
+camera.pixel_aspect = 1
 camera.k1 = 0.0
 camera.k2 = 0.0
 camera.k3 = 0.0
index 0d057d21e8d5036118701f33532ec7ed165347cd..3dd66c5b6092abdfdce63766661619525aced2cf 100644 (file)
@@ -2,9 +2,9 @@ import bpy
 camera = bpy.context.edit_movieclip.tracking.camera
 
 camera.sensor_width = 22.3
-camera.sensor_height = 14.9
 camera.units = 'MILLIMETERS'
 camera.focal_length = 24.0
+camera.pixel_aspect = 1
 camera.k1 = 0.0
 camera.k2 = 0.0
 camera.k3 = 0.0
index b51a3c1df5268357c6e42bf03e0ec17b91f64bd0..8db89189cd7ce5472968994f67f890db19fd1dce 100644 (file)
@@ -2,9 +2,9 @@ import bpy
 camera = bpy.context.edit_movieclip.tracking.camera
 
 camera.sensor_width = 23.6
-camera.sensor_height = 15.8
 camera.units = 'MILLIMETERS'
 camera.focal_length = 24.0
+camera.pixel_aspect = 1
 camera.k1 = 0.0
 camera.k2 = 0.0
 camera.k3 = 0.0
index 854a8c042decfa6c697960a75d4d6245b956a74a..a112dd22dd2d5be746e1452d65c120223b64877d 100644 (file)
@@ -2,9 +2,9 @@ import bpy
 camera = bpy.context.edit_movieclip.tracking.camera
 
 camera.sensor_width = 23.1
-camera.sensor_height = 15.4
 camera.units = 'MILLIMETERS'
 camera.focal_length = 24.0
+camera.pixel_aspect = 1
 camera.k1 = 0.0
 camera.k2 = 0.0
 camera.k3 = 0.0
index f2b87f3c309a86aaa8b31b96b9ae93fff859c0d5..7d9b6c8b39073b820a42df3e6cd936df431a0e32 100644 (file)
@@ -2,9 +2,9 @@ import bpy
 camera = bpy.context.edit_movieclip.tracking.camera
 
 camera.sensor_width = 36.0
-camera.sensor_height = 23.9
 camera.units = 'MILLIMETERS'
 camera.focal_length = 24.0
+camera.pixel_aspect = 1
 camera.k1 = 0.0
 camera.k2 = 0.0
 camera.k3 = 0.0
index b51a3c1df5268357c6e42bf03e0ec17b91f64bd0..8db89189cd7ce5472968994f67f890db19fd1dce 100644 (file)
@@ -2,9 +2,9 @@ import bpy
 camera = bpy.context.edit_movieclip.tracking.camera
 
 camera.sensor_width = 23.6
-camera.sensor_height = 15.8
 camera.units = 'MILLIMETERS'
 camera.focal_length = 24.0
+camera.pixel_aspect = 1
 camera.k1 = 0.0
 camera.k2 = 0.0
 camera.k3 = 0.0
index 0c68b01462394d0c899b0b1c06e2025de1e220d0..8db89189cd7ce5472968994f67f890db19fd1dce 100644 (file)
@@ -2,9 +2,9 @@ import bpy
 camera = bpy.context.edit_movieclip.tracking.camera
 
 camera.sensor_width = 23.6
-camera.sensor_height = 15.6
 camera.units = 'MILLIMETERS'
 camera.focal_length = 24.0
+camera.pixel_aspect = 1
 camera.k1 = 0.0
 camera.k2 = 0.0
 camera.k3 = 0.0
index 0c68b01462394d0c899b0b1c06e2025de1e220d0..8db89189cd7ce5472968994f67f890db19fd1dce 100644 (file)
@@ -2,9 +2,9 @@ import bpy
 camera = bpy.context.edit_movieclip.tracking.camera
 
 camera.sensor_width = 23.6
-camera.sensor_height = 15.6
 camera.units = 'MILLIMETERS'
 camera.focal_length = 24.0
+camera.pixel_aspect = 1
 camera.k1 = 0.0
 camera.k2 = 0.0
 camera.k3 = 0.0
index b51a3c1df5268357c6e42bf03e0ec17b91f64bd0..8db89189cd7ce5472968994f67f890db19fd1dce 100644 (file)
@@ -2,9 +2,9 @@ import bpy
 camera = bpy.context.edit_movieclip.tracking.camera
 
 camera.sensor_width = 23.6
-camera.sensor_height = 15.8
 camera.units = 'MILLIMETERS'
 camera.focal_length = 24.0
+camera.pixel_aspect = 1
 camera.k1 = 0.0
 camera.k2 = 0.0
 camera.k3 = 0.0
index a5c4a2bd96b9596d57f210f675ce1c324372c1cb..913b507d296f72e70fe3f2b6d0ad83fb2d457dd1 100644 (file)
@@ -2,9 +2,9 @@ import bpy
 camera = bpy.context.edit_movieclip.tracking.camera
 
 camera.sensor_width = 30.0
-camera.sensor_height = 15.0
 camera.units = 'MILLIMETERS'
 camera.focal_length = 24.0
+camera.pixel_aspect = 1
 camera.k1 = 0.0
 camera.k2 = 0.0
 camera.k3 = 0.0
index f8b6f376d319bf6b9664ae6c5462fe5f57be46e8..0a52b377959359d95f46a135cf20372755a82312 100644 (file)
@@ -2,9 +2,9 @@ import bpy
 camera = bpy.context.edit_movieclip.tracking.camera
 
 camera.sensor_width = 11.1
-camera.sensor_height = 6.24
 camera.units = 'MILLIMETERS'
 camera.focal_length = 24.0
+camera.pixel_aspect = 1
 camera.k1 = 0.0
 camera.k2 = 0.0
 camera.k3 = 0.0
index d0926cc15091629e189ee7e1af87d75f913ba357..88c232bb9449624fdacce0bd89aef941781acc72 100644 (file)
@@ -2,9 +2,9 @@ import bpy
 camera = bpy.context.edit_movieclip.tracking.camera
 
 camera.sensor_width = 16.65
-camera.sensor_height = 9.36
 camera.units = 'MILLIMETERS'
 camera.focal_length = 24.0
+camera.pixel_aspect = 1
 camera.k1 = 0.0
 camera.k2 = 0.0
 camera.k3 = 0.0
index 2eeadb1c9aac1b57ddfbd59ec65a632d05c6bd3a..7ea78412f4006156d425d21e9287b8bc7851ac67 100644 (file)
@@ -2,9 +2,9 @@ import bpy
 camera = bpy.context.edit_movieclip.tracking.camera
 
 camera.sensor_width = 22.2
-camera.sensor_height = 12.6
 camera.units = 'MILLIMETERS'
 camera.focal_length = 24.0
+camera.pixel_aspect = 1
 camera.k1 = 0.0
 camera.k2 = 0.0
 camera.k3 = 0.0
index 2f39f2bca7ed0d00e0c4032137b3a5a541a8c068..0bb514dcb12d2f0615f1bd958d94cab9d5f17730 100644 (file)
@@ -205,8 +205,7 @@ class AddPresetCamera(AddPresetBase, bpy.types.Operator):
     ]
 
     preset_values = [
-        "cam.sensor_x",
-        "cam.sensor_y",
+        "cam.sensor_width"
     ]
 
     preset_subdir = "camera"
@@ -329,9 +328,9 @@ class AddPresetTrackingCamera(AddPresetBase, bpy.types.Operator):
 
     preset_values = [
         "camera.sensor_width",
-        "camera.sensor_height",
         "camera.units",
         "camera.focal_length",
+        "camera.pixel_aspect",
         "camera.k1",
         "camera.k2",
         "camera.k3"
index 193aae753f408d4d90832fd40297de1b4e7ef6bd..695e9f98b1c0bac73203847a49721e9d42d61f33 100644 (file)
@@ -76,17 +76,12 @@ class DATA_PT_lens(CameraButtonsPanel, bpy.types.Panel):
 
         col = split.column()
         if cam.type == 'PERSP':
-            col.prop(cam, "lens")
-
-            split = layout.split()
-
-            col = split.column()
-            if cam.angle_unit == 'HORIZONTAL':
-                col.prop(cam, "angle_x")
-            elif cam.angle_unit == 'VERTICAL':
-                col.prop(cam, "angle_y")
-            col = split.column()
-            col.prop(cam, "angle_unit", text="")
+            row = col.row()
+            if cam.lens_unit == 'MILLIMETERS':
+                row.prop(cam, "lens")
+            elif cam.lens_unit == 'DEGREES':
+                row.prop(cam, "angle")
+            row.prop(cam, "lens_unit", text="")
 
         elif cam.type == 'ORTHO':
             col.prop(cam, "ortho_scale")
@@ -133,17 +128,12 @@ class DATA_PT_camera(CameraButtonsPanel, bpy.types.Panel):
         row.operator("camera.preset_add", text="", icon="ZOOMIN")
         row.operator("camera.preset_add", text="", icon="ZOOMOUT").remove_active = True
 
-        split = layout.split()
+        layout.prop(cam, "sensor_width")
 
-        col = split.column(align=True)
-        col.label(text="Sensor Size:")
-        col.prop(cam, "sensor_x", text="X")
-        col.prop(cam, "sensor_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")
+        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_display(CameraButtonsPanel, bpy.types.Panel):
index a3f9658b8f3c76382ac770bd3a616dc322e14509..982134a37ad3163ae63d1f95fbf03b30d1884ad0 100644 (file)
@@ -298,16 +298,16 @@ class CLIP_PT_tracking_camera(bpy.types.Panel):
         op = row.operator("clip.camera_preset_add", text="", icon="ZOOMOUT")
         op.remove_active = True
 
-        layout.label(text="Sensor:")
-        row = layout.row(align=True)
-        row.prop(clip.tracking.camera, "sensor_width", text="X")
-        row.prop(clip.tracking.camera, "sensor_height", text="Y")
-
         row = layout.row(align=True)
         sub = row.split(percentage=0.65)
         sub.prop(clip.tracking.camera, "focal_length")
         sub.prop(clip.tracking.camera, "units", text="")
 
+        col = layout.column(align=True)
+        col.label(text="Sensor:")
+        col.prop(clip.tracking.camera, "sensor_width", text="Size")
+        col.prop(clip.tracking.camera, "pixel_aspect")
+
         col = layout.column()
         col.label(text="Principal Point")
         row = col.row()
index 0f9a900f9c850f774647f310c682c3458ab1edbe..c88b6688da8b7e183455df22c11f2a33161138e3 100644 (file)
@@ -71,7 +71,7 @@ void BKE_tracking_sync(struct MovieTrackingContext *context);
 void BKE_tracking_sync_user(struct MovieClipUser *user, struct MovieTrackingContext *context);
 int BKE_tracking_next(struct MovieTrackingContext *context);
 
-float BKE_tracking_solve_reconstruction(struct MovieTracking *tracking, int width, int height, float aspx, float aspy);
+float BKE_tracking_solve_reconstruction(struct MovieTracking *tracking, int width, int height);
 
 void BKE_track_unique_name(struct MovieTracking *tracking, struct MovieTrackingTrack *track);
 struct MovieTrackingTrack *BKE_find_track_by_name(struct MovieTracking *tracking, const char *name);
index ac8ee2cfd6be31cfe188ca4f958bbcd7a30fbecc..d15a987499430403a7c1ac4a49bc206bac885a11 100644 (file)
@@ -341,7 +341,6 @@ static MovieClip *movieclip_alloc(const char *name)
        clip->aspx= clip->aspy= 1.0f;
 
        clip->tracking.camera.sensor_width= 35.0f;
-       clip->tracking.camera.sensor_height= 18.0f;
        clip->tracking.camera.units= CAMERA_UNITS_MM;
 
        clip->tracking.settings.frames_limit= 20;
@@ -599,7 +598,7 @@ void BKE_movieclip_aspect(MovieClip *clip, float *aspx, float *aspy)
        *aspx= *aspy= 1.0;
 
        /* x is always 1 */
-       *aspy = clip->aspy/clip->aspx;
+       *aspy = clip->aspy/clip->aspx/clip->tracking.camera.pixel_aspect;
 }
 
 /* get segments of cached frames. useful for debugging cache policies */
index 2ad6624ddc6318ecff4254fac4620d0bf25dffcc..4304b07d976756519e6ec0b88e42709d331ba872 100644 (file)
@@ -713,7 +713,6 @@ void *add_camera(const char *name)
 
        cam->lens= 35.0f;
        cam->sensor_x = 32.f;
-       cam->sensor_y = 18.f;
        cam->clipsta= 0.1f;
        cam->clipend= 100.0f;
        cam->drawsize= 0.5f;
index a90d3d09b0558347cb140ae9c86a1ae6ea883af1..0037db4bafb576665564c94644ebff2d5263d437 100644 (file)
@@ -1007,16 +1007,17 @@ static int retrive_libmv_reconstruct(MovieTracking *tracking, struct libmv_Recon
 
 #endif
 
-float BKE_tracking_solve_reconstruction(MovieTracking *tracking, int width, int height, float aspx, float aspy)
+float BKE_tracking_solve_reconstruction(MovieTracking *tracking, int width, int height)
 {
 #if WITH_LIBMV
        {
                MovieTrackingCamera *camera= &tracking->camera;
-               struct libmv_Tracks *tracks= create_libmv_tracks(tracking, width*aspx, height*aspy);
+               float aspy= 1.f/tracking->camera.pixel_aspect;
+               struct libmv_Tracks *tracks= create_libmv_tracks(tracking, width, height*aspy);
                struct libmv_Reconstruction *reconstruction = libmv_solveReconstruction(tracks,
                        tracking->settings.keyframe1, tracking->settings.keyframe2,
                        camera->focal,
-                       camera->principal[0]*aspx, camera->principal[1]*aspy,
+                       camera->principal[0], camera->principal[1]*aspy,
                        camera->k1, camera->k2, camera->k3);
                float error= libmv_reprojectionError(reconstruction);
 
index d4288be7f441559e506dd6ee4572c7738a56d020..5e1c810f40a7539783bf846ea83a8a0ad60257d5 100644 (file)
@@ -183,9 +183,7 @@ void quat_apply_track(float quat[4], short axis, short upflag);
 void vec_apply_track(float vec[3], short axis);
 
 float focallength_to_hfov(float focal_length, float sensor_x);
-float focallength_to_vfov(float focal_length, float sensor_y);
 float hfov_to_focallength(float hfov, float sensor_x);
-float vfov_to_focallength(float vfov, float sensor_y);
 
 float angle_wrap_rad(float angle);
 float angle_wrap_deg(float angle);
index 9b77e1e7d8b63d6fbcf9a5338d72c45da127f5b7..98209603e47d6b95da2323fe95492bdb95ea13b7 100644 (file)
@@ -1671,27 +1671,11 @@ float focallength_to_hfov(float focal_length, float sensor_x)
        return 2.0f * atanf((sensor_x/2.0f) / focal_length);
 }
 
-float focallength_to_vfov(float focal_length, float sensor_y)
-{
-       return 2.0f * atanf((sensor_y/2.0f) / focal_length);
-}
-
 float hfov_to_focallength(float hfov, float sensor_x)
 {
        return (sensor_x/2.0f) / tanf(hfov * 0.5f);
 }
 
-float vfov_to_focallength(float vfov, float sensor_y)
-{
-       return (sensor_y/2.0f) / tanf(vfov * 0.5f);
-}
-
-/* takes into account subject distance */
-//float focus_dist_to_fov(float focal_length, float sensor_x, float dist)
-//{
-// return 2.f * atanf( (sensor_x * (dist - focal_length)) / (2.f * dist * focal_length));
-//}
-
 /* 'mod_inline(-3,4)= 1', 'fmod(-3,4)= -3' */
 static float mod_inline(float a, float b)
 {
index cbeccdfd64e4043eee6de4053eddc0cbf3a0125a..f52f42d05133946995899b621839f1ba39c3141a 100644 (file)
@@ -11859,12 +11859,14 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
 
                        if(clip->proxy.quality==0)
                                clip->proxy.quality= 90;
+
+                       if(clip->tracking.camera.pixel_aspect<0.01f)
+                               clip->tracking.camera.pixel_aspect= 1.f;
                }
 
                for(cam= main->camera.first; cam; cam= cam->id.next) {
                        if (cam->sensor_x < 0.01f) {
                                cam->sensor_x = 32.f;
-                               cam->sensor_y = 18.f;
                        }
                }
        }
index 0acf40acf4714d5ae8ee1c279309e5508e56e301..693bbdc40d0f9cd2eda532fab661dcbf04055f42 100644 (file)
@@ -910,13 +910,13 @@ static void draw_tracking_tracks(SpaceClip *sc, ARegion *ar, MovieClip *clip,
        }
 
        if(sc->flag&SC_SHOW_BUNDLES) {
-               float pos[4], vec[4], mat[4][4], aspx, aspy;
+               float pos[4], vec[4], mat[4][4], aspy;
 
                glEnable(GL_POINT_SMOOTH);
                glPointSize(3.0f);
 
-               BKE_movieclip_aspect(clip, &aspx, &aspy);
-               BKE_tracking_projection_matrix(tracking, framenr, width*aspx, height*aspy, mat);
+               aspy= 1.f/clip->tracking.camera.pixel_aspect;
+               BKE_tracking_projection_matrix(tracking, framenr, width, height*aspy, mat);
 
                track= tracking->tracks.first;
                while(track) {
index 558a53a88d9bc6e71c385402435c750d34eb413e..ef33241bd519dda3d6c62ef102391c0306bfc4ac 100644 (file)
@@ -478,7 +478,7 @@ static void movieclip_main_area_set_view2d(SpaceClip *sc, ARegion *ar)
        h= height;
 
        if(clip)
-               h*= clip->aspy/clip->aspx;
+               h*= clip->aspy/clip->aspx/clip->tracking.camera.pixel_aspect;
 
        winx= ar->winrct.xmax - ar->winrct.xmin + 1;
        winy= ar->winrct.ymax - ar->winrct.ymin + 1;
index f7c4ff8442e024dbed35a8c5fcc313a53f632a57..9498086929bcf831e29e660122684a5d81c3d2b2 100644 (file)
@@ -1470,7 +1470,7 @@ static int solve_camera_exec(bContext *C, wmOperator *op)
        Scene *scene= CTX_data_scene(C);
        MovieTracking *tracking= &clip->tracking;
        int width, height;
-       float error, aspx, aspy;
+       float error;
 
        if(!check_solve_track_count(tracking)) {
                BKE_report(op->reports, RPT_ERROR, "At least 10 tracks on both of keyframes are needed for reconstruction");
@@ -1479,9 +1479,8 @@ static int solve_camera_exec(bContext *C, wmOperator *op)
 
        /* could fail if footage uses images with different sizes */
        BKE_movieclip_acquire_size(clip, NULL, &width, &height);
-       BKE_movieclip_aspect(clip, &aspx, &aspy);
 
-       error= BKE_tracking_solve_reconstruction(tracking, width, height, aspx, aspy);
+       error= BKE_tracking_solve_reconstruction(tracking, width, height);
 
        if(error<0)
                BKE_report(op->reports, RPT_WARNING, "Some data failed to reconstruct, see console for details");
@@ -1500,11 +1499,18 @@ static int solve_camera_exec(bContext *C, wmOperator *op)
                if(focal) {
                        Camera *camera= (Camera*)scene->camera->data;
 
-                       if(clip->lastsize[0]) {
-                               camera->sensor_x= tracking->camera.sensor_width;
-                               camera->sensor_y= tracking->camera.sensor_height;
+                       camera->sensor_x= tracking->camera.sensor_width;
+                       camera->lens= focal*camera->sensor_x/width;
 
-                               camera->lens= focal*camera->sensor_x/(float)clip->lastsize[0];
+                       scene->r.xsch= width;
+                       scene->r.ysch= height;
+
+                       if(tracking->camera.pixel_aspect > 1.0f) {
+                               scene->r.xasp= tracking->camera.pixel_aspect;
+                               scene->r.yasp= 1.f;
+                       } else {
+                               scene->r.xasp= 1.f;
+                               scene->r.yasp= 1.f / tracking->camera.pixel_aspect;
                        }
 
                        WM_event_add_notifier(C, NC_OBJECT, camera);
index 9832406a3aa7dc69f286be129e9ad21135c9e886..db5c4a5a8d09e4f84975dcce9ed810a1e45ed357 100644 (file)
@@ -1243,7 +1243,7 @@ static void drawviewborder(Scene *scene, ARegion *ar, View3D *v3d)
                        uiSetRoundBox(15);
                        uiDrawBox(GL_LINE_LOOP, x1, y1, x2, y2, 12.0);
                }
-
+#if 0 /* XXX: ... */
                if (ca && (ca->flag & CAM_SHOWSENSOR)) {
                        /* assume fixed sensor width for now */
                        float sensor_scale = (x2i-x1i) / ca->sensor_x;
@@ -1257,6 +1257,7 @@ static void drawviewborder(Scene *scene, ARegion *ar, View3D *v3d)
 
                        uiDrawBox(GL_LINE_LOOP, x1i, sy1, x2i, sy2, 2.0);
                }
+#endif
        }
 
        setlinestyle(0);
index 0756a304a09ef7ca331184cf0c6499dbdaefa73a..810ae30a575da11cb84e8b47035d733f7ccaff96 100644 (file)
@@ -53,8 +53,7 @@ typedef struct Camera {
        float passepartalpha;
        float clipsta, clipend;
        float lens, ortho_scale, drawsize;
-       float hfov, vfov;
-       float sensor_x, sensor_y;
+       float sensor_x, pad;
        float shiftx, shifty;
        
        /* yafray: dof params */
index 9120201e724b3fb6bc34fb98ef89e34dab8a6759..e98a807f3cc8cbf9f0b26d9f54b36b487e63e74b 100644 (file)
@@ -55,8 +55,8 @@ typedef struct MovieReconstructedCamera {
 } MovieReconstructedCamera;
 
 typedef struct MovieTrackingCamera {
-       float sensor_width;             /* width of CCD sensor */
-       float sensor_height;    /* height of CCD sensor */
+       float sensor_width;     /* width of CCD sensor */
+       float pixel_aspect;     /* pixel aspect ratio */
        float pad2;
        float focal;            /* focal length */
        short units;            /* units of focal length user is working with */
index bdfaf4089c85066887bdd3c81ad60ae71b9a9c63..53d265c5ec2218ef890e007920880032634c8358 100644 (file)
 #include "BKE_depsgraph.h"
 
 /* only for rad/deg conversion! can remove later */
-static float rna_Camera_angle_x_get(PointerRNA *ptr)
+static float rna_Camera_angle_get(PointerRNA *ptr)
 {
        Camera *cam= ptr->id.data;
        return focallength_to_hfov(cam->lens, cam->sensor_x);
 }
 
-static float rna_Camera_angle_y_get(PointerRNA *ptr)
-{
-       Camera *cam= ptr->id.data;
-       return focallength_to_vfov(cam->lens, cam->sensor_y);
-}
-
-static void rna_Camera_angle_x_set(PointerRNA *ptr, float value)
+static void rna_Camera_angle_set(PointerRNA *ptr, float value)
 {
        Camera *cam= ptr->id.data;
        cam->lens= hfov_to_focallength(value, cam->sensor_x);
 }
 
-static void rna_Camera_angle_y_set(PointerRNA *ptr, float value)
-{
-       Camera *cam= ptr->id.data;
-       cam->lens= vfov_to_focallength(value, cam->sensor_y);
-}
-
 static void rna_Camera_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
 {
        Camera *camera= (Camera*)ptr->id.data;
@@ -96,9 +84,9 @@ void RNA_def_camera(BlenderRNA *brna)
                {CAM_DTX_HARMONY_TRI_A, "HARMONY_TRIANGLE_A", 0, "Harmonious Triangle A", ""},
                {CAM_DTX_HARMONY_TRI_B, "HARMONY_TRIANGLE_B", 0, "Harmonious Triangle B", ""},
                {0, NULL, 0, NULL, NULL}};
-       static EnumPropertyItem prop_angle_unit_items[] = {
-               {0, "HORIZONTAL", 0, "Horizontal", ""},
-               {CAM_ANGLETOGGLE, "VERTICAL", 0, "Vertical", ""},
+       static EnumPropertyItem prop_lens_unit_items[] = {
+               {0, "MILLIMETERS", 0, "Millimeters", ""},
+               {CAM_ANGLETOGGLE, "DEGREES", 0, "Degrees", ""},
                {0, NULL, 0, NULL, NULL}};
 
        srna= RNA_def_struct(brna, "Camera", "ID");
@@ -125,18 +113,11 @@ void RNA_def_camera(BlenderRNA *brna)
        RNA_def_property_ui_text(prop, "Passepartout Alpha", "Opacity (alpha) of the darkened overlay in Camera view");
        RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
 
-       prop= RNA_def_property(srna, "angle_x", PROP_FLOAT, PROP_ANGLE);
+       prop= RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE);
        RNA_def_property_range(prop, M_PI * (0.367/180.0), M_PI * (172.847/180.0));
        RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
        RNA_def_property_ui_text(prop, "Field of View", "Camera lens horizontal field of view in degrees");
-       RNA_def_property_float_funcs(prop, "rna_Camera_angle_x_get", "rna_Camera_angle_x_set", NULL);
-       RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Camera_update");
-
-       prop= RNA_def_property(srna, "angle_y", PROP_FLOAT, PROP_ANGLE);
-       RNA_def_property_range(prop, M_PI * (0.367/180.0), M_PI * (172.847/180.0));
-       RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
-       RNA_def_property_ui_text(prop, "Field of View", "Camera lens vertical field of view in degrees");
-       RNA_def_property_float_funcs(prop, "rna_Camera_angle_y_get", "rna_Camera_angle_y_set", NULL);
+       RNA_def_property_float_funcs(prop, "rna_Camera_angle_get", "rna_Camera_angle_set", NULL);
        RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Camera_update");
 
        prop= RNA_def_property(srna, "clip_start", PROP_FLOAT, PROP_DISTANCE);
@@ -157,17 +138,11 @@ void RNA_def_camera(BlenderRNA *brna)
        RNA_def_property_ui_text(prop, "Focal Length", "Perspective Camera lens value in millimeters");
        RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Camera_update");
        
-       prop= RNA_def_property(srna, "sensor_x", PROP_FLOAT, PROP_NONE);
+       prop= RNA_def_property(srna, "sensor_width", PROP_FLOAT, PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "sensor_x");
        RNA_def_property_range(prop, 1.0f, FLT_MAX);
        RNA_def_property_ui_range(prop, 1.0f, 100.f, 1, 2);
-       RNA_def_property_ui_text(prop, "Sensor X", "Horizontal size of the image sensor area in millimeters");
-       RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Camera_update");
-
-       prop= RNA_def_property(srna, "sensor_y", PROP_FLOAT, PROP_NONE);
-       RNA_def_property_range(prop, 1.0f, FLT_MAX);
-       RNA_def_property_ui_range(prop, 1.0f, 100.f, 1, 2);
-       RNA_def_property_ui_text(prop, "Sensor Y", "Vertical size of the image sensor area in millimeters");
+       RNA_def_property_ui_text(prop, "Sensor", "Horizontal size of the image sensor area in millimeters");
        RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Camera_update");
 
        prop= RNA_def_property(srna, "ortho_scale", PROP_FLOAT, PROP_NONE);
@@ -234,10 +209,10 @@ void RNA_def_camera(BlenderRNA *brna)
        RNA_def_property_ui_text(prop, "Show Sensor Size", "Show sensor size (film gate) in Camera view");
        RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
 
-       prop= RNA_def_property(srna, "angle_unit", PROP_ENUM, PROP_NONE);
+       prop= RNA_def_property(srna, "lens_unit", PROP_ENUM, PROP_NONE);
        RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
-       RNA_def_property_enum_items(prop, prop_angle_unit_items);
-       RNA_def_property_ui_text(prop, "Angle Unit", "Unit to edit lens in for the user interface");
+       RNA_def_property_enum_items(prop, prop_lens_unit_items);
+       RNA_def_property_ui_text(prop, "Lens Unit", "Unit to edit lens in for the user interface");
 
        prop= RNA_def_property(srna, "use_panorama", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flag", CAM_PANORAMA);
index 2e4fe3d40db0898c4a885eaa4675a900102fa480..4b380de33c77fc93aed437905b030e609212e43b 100644 (file)
@@ -220,6 +220,7 @@ static void rna_def_movieclip(BlenderRNA *brna)
        RNA_def_property_float_sdna(prop, NULL, "aspx");
        RNA_def_property_array(prop, 2);
        RNA_def_property_range(prop, 0.1f, 5000.0f);
+       RNA_def_property_ui_range(prop, 0.1f, 5000.0f, 1, 2);
        RNA_def_property_ui_text(prop, "Display Aspect", "Display Aspect for this clip, does not affect rendering");
        RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL);
 
index bd4e14a3cb3b4e76dfdf191012b347e7d47a17d4..f53fb4ff7388cbcd0a6a5935f0e69afc30cbc419 100644 (file)
@@ -268,18 +268,11 @@ static void rna_def_trackingCamera(BlenderRNA *brna)
        srna= RNA_def_struct(brna, "MovieTrackingCamera", NULL);
        RNA_def_struct_ui_text(srna, "Movie tracking camera data", "Match-moving camera data for tracking");
 
-       /* Sensor Wdth */
+       /* Sensor */
        prop= RNA_def_property(srna, "sensor_width", PROP_FLOAT, PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "sensor_width");
        RNA_def_property_range(prop, 0.0f, 500.0f);
-       RNA_def_property_ui_text(prop, "Sensor Width", "Width of CCD sensor in millimeters");
-       RNA_def_property_update(prop, NC_MOVIECLIP|NA_EDITED, NULL);
-
-       /* Sensor height */
-       prop= RNA_def_property(srna, "sensor_height", PROP_FLOAT, PROP_NONE);
-       RNA_def_property_float_sdna(prop, NULL, "sensor_height");
-       RNA_def_property_range(prop, 0.0f, 500.0f);
-       RNA_def_property_ui_text(prop, "Sensor Height", "Height of CCD sensor in millimeters");
+       RNA_def_property_ui_text(prop, "Sensor", "Width of CCD sensor in millimeters");
        RNA_def_property_update(prop, NC_MOVIECLIP|NA_EDITED, NULL);
 
        /* Focal Length */
@@ -322,6 +315,14 @@ static void rna_def_trackingCamera(BlenderRNA *brna)
        RNA_def_property_ui_range(prop, 0, 10, .1, 3);
        RNA_def_property_ui_text(prop, "K3", "");
        RNA_def_property_update(prop, NC_MOVIECLIP|NA_EDITED, NULL);
+
+       /* pixel aspect */
+       prop= RNA_def_property(srna, "pixel_aspect", PROP_FLOAT, PROP_XYZ);
+       RNA_def_property_float_sdna(prop, NULL, "pixel_aspect");
+       RNA_def_property_range(prop, 0.1f, 5000.0f);
+       RNA_def_property_ui_range(prop, 0.1f, 5000.0f, 1, 2);
+       RNA_def_property_ui_text(prop, "Pixel Aspect", "Pixel aspect ratio");
+       RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL);
 }
 
 static void rna_def_trackingMarker(BlenderRNA *brna)