===========================
- Fixed compilation error with OpenCOLLADA
- Added sample preset for tracking camera.
- Fixed bug with wrong order of preset properties loading/saving.
--- /dev/null
+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.k1 = 0.0
+camera.k2 = 0.0
+camera.k3 = 0.0
]
preset_values = [
- "camera.focal_length",
"camera.sensor_width",
"camera.sensor_height",
"camera.units",
+ "camera.focal_length",
"camera.k1",
"camera.k2",
"camera.k3"
{
double yfov = camera->getYFov().getValue();
// yfov is in degrees, cam->lens is in millimiters
- cam->lens = hfov_to_focallength((float)x*(M_PI/180.0f), cam->sensor_x);
+ cam->lens = hfov_to_focallength((float)yfov*(M_PI/180.0f), cam->sensor_x);
}
break;
}