Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-05-13 17:37:05 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-05-13 17:37:05 +0400
commit682da3ac98603f32deadb7a531f460f62de84e1c (patch)
tree525f5749e146d9500a4ae4295c20ee99d58e8608 /source/blender/editors/object/object_transform.c
parent2914d152411cc1dda353f0806d0f579e9c471730 (diff)
Apply scale on scene reconstruction when applying scale on camera
This means when you've got reconstructed scene assigned to a 3d camera (via camera solver constraint) and applies scale on this camera from Ctrl-A menu, scale will be applied on the reconstructed scene and reset camera size to identity. This is very useful feature for scene orientation, when you'll just scale camera by S in the viewport to match bundles some points in the space, and then you'll easiy make camera have identity scale (which is needed for nice working moblur and other things mentioning by Sebastian :) without loosing scale of bundles themselves. Behavior of apply scale for cameras without clip assigned to them does not change at all.
Diffstat (limited to 'source/blender/editors/object/object_transform.c')
-rw-r--r--source/blender/editors/object/object_transform.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c
index f6256174391..7eb5c36a3fc 100644
--- a/source/blender/editors/object/object_transform.c
+++ b/source/blender/editors/object/object_transform.c
@@ -58,6 +58,7 @@
#include "BKE_multires.h"
#include "BKE_armature.h"
#include "BKE_lattice.h"
+#include "BKE_tracking.h"
#include "RNA_define.h"
#include "RNA_access.h"
@@ -549,8 +550,21 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo
}
}
}
- else
+ else if (ob->type == OB_CAMERA) {
+ MovieClip *clip = BKE_object_movieclip_get(scene, ob, FALSE);
+
+ /* applying scale on camera actually scales clip's reconstruction.
+ * of there's clip assigned to camera nothing to do actually.
+ */
+ if (!clip)
+ continue;
+
+ if (apply_scale)
+ BKE_tracking_reconstruction_scale(&clip->tracking, ob->size);
+ }
+ else {
continue;
+ }
if (apply_loc)
zero_v3(ob->loc);