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:
authorNathan Letwory <nathan@letworyinteractive.com>2013-09-05 10:58:27 +0400
committerNathan Letwory <nathan@letworyinteractive.com>2013-09-05 10:58:27 +0400
commit76aa5dfb705b633b07e8db2bfffcddb91eaf97e5 (patch)
tree71522821b990797bcf3d2fd46462926e1b13aba5 /source/blender/collada/DocumentImporter.cpp
parent6fce3746377b726f41979479e9267c1a847b4145 (diff)
Apply patch [#36601].
Submitted by Saurabh Wankhade (sauraedron). This patch adds camera shift and dof export and import in a Blender profile.
Diffstat (limited to 'source/blender/collada/DocumentImporter.cpp')
-rw-r--r--source/blender/collada/DocumentImporter.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/collada/DocumentImporter.cpp b/source/blender/collada/DocumentImporter.cpp
index c6337e27218..5592be6e872 100644
--- a/source/blender/collada/DocumentImporter.cpp
+++ b/source/blender/collada/DocumentImporter.cpp
@@ -933,6 +933,7 @@ bool DocumentImporter::writeCamera(const COLLADAFW::Camera *camera)
Camera *cam = NULL;
std::string cam_id, cam_name;
+ ExtraTags *et=getExtraTags(camera->getUniqueId());
cam_id = camera->getOriginalId();
cam_name = camera->getName();
if (cam_name.size()) cam = (Camera *)BKE_camera_add(G.main, (char *)cam_name.c_str());
@@ -942,6 +943,12 @@ bool DocumentImporter::writeCamera(const COLLADAFW::Camera *camera)
fprintf(stderr, "Cannot create camera.\n");
return true;
}
+
+ if(et && et->isProfile("blender")) {
+ et->setData("shiftx",&(cam->shiftx));
+ et->setData("shifty",&(cam->shifty));
+ et->setData("YF_dofdist",&(cam->YF_dofdist));
+ }
cam->clipsta = camera->getNearClippingPlane().getValue();
cam->clipend = camera->getFarClippingPlane().getValue();