forked from bartvdbraak/blender
Camera clipend animation export
This commit is contained in:
parent
be918954bd
commit
6f5b5ac3c9
@ -91,7 +91,8 @@ void AnimationExporter::exportAnimations(Scene *sce)
|
|||||||
transformName = extract_transform_name( fcu->rna_path );
|
transformName = extract_transform_name( fcu->rna_path );
|
||||||
|
|
||||||
if ((!strcmp(transformName, "lens"))||
|
if ((!strcmp(transformName, "lens"))||
|
||||||
(!strcmp(transformName, "ortho_scale")))
|
(!strcmp(transformName, "ortho_scale"))||
|
||||||
|
(!strcmp(transformName, "clipend")))
|
||||||
dae_animation(ob ,fcu, transformName,true );
|
dae_animation(ob ,fcu, transformName,true );
|
||||||
fcu = fcu->next;
|
fcu = fcu->next;
|
||||||
}
|
}
|
||||||
@ -185,8 +186,9 @@ void AnimationExporter::exportAnimations(Scene *sce)
|
|||||||
if (fcu->array_index < 4)
|
if (fcu->array_index < 4)
|
||||||
axis_name = axis_names[fcu->array_index];*/
|
axis_name = axis_names[fcu->array_index];*/
|
||||||
}
|
}
|
||||||
|
//maybe a list or a vector of float animations
|
||||||
else if ( !strcmp(transformName, "spot_size")||!strcmp(transformName, "spot_blend")||
|
else if ( !strcmp(transformName, "spot_size")||!strcmp(transformName, "spot_blend")||
|
||||||
!strcmp(transformName, "lens")||!strcmp(transformName, "ortho_scale"))
|
!strcmp(transformName, "lens")||!strcmp(transformName, "ortho_scale")||!strcmp(transformName, "clipend"))
|
||||||
{
|
{
|
||||||
axis_name = "";
|
axis_name = "";
|
||||||
}
|
}
|
||||||
@ -807,6 +809,8 @@ void AnimationExporter::exportAnimations(Scene *sce)
|
|||||||
tm_type = 7;
|
tm_type = 7;
|
||||||
else if (!strcmp(name, "ortho_scale"))
|
else if (!strcmp(name, "ortho_scale"))
|
||||||
tm_type = 8;
|
tm_type = 8;
|
||||||
|
else if (!strcmp(name, "clipend"))
|
||||||
|
tm_type = 9;
|
||||||
else
|
else
|
||||||
tm_type = -1;
|
tm_type = -1;
|
||||||
}
|
}
|
||||||
@ -838,6 +842,9 @@ void AnimationExporter::exportAnimations(Scene *sce)
|
|||||||
case 8:
|
case 8:
|
||||||
tm_name = "xmag";
|
tm_name = "xmag";
|
||||||
break;
|
break;
|
||||||
|
case 9:
|
||||||
|
tm_name = "zfar";
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
tm_name = "";
|
tm_name = "";
|
||||||
|
@ -74,8 +74,8 @@ void CamerasExporter::operator()(Object *ob, Scene *sce)
|
|||||||
if (cam->type == CAM_PERSP) {
|
if (cam->type == CAM_PERSP) {
|
||||||
COLLADASW::PerspectiveOptic persp(mSW);
|
COLLADASW::PerspectiveOptic persp(mSW);
|
||||||
persp.setXFov(lens_to_angle(cam->lens)*(180.0f/M_PI),"xfov");
|
persp.setXFov(lens_to_angle(cam->lens)*(180.0f/M_PI),"xfov");
|
||||||
persp.setAspectRatio((float)(sce->r.xsch)/(float)(sce->r.ysch),false,cam_name);
|
persp.setAspectRatio((float)(sce->r.xsch)/(float)(sce->r.ysch),false,"aspect_ratio");
|
||||||
persp.setZFar(cam->clipend);
|
persp.setZFar(cam->clipend, false , "zfar");
|
||||||
persp.setZNear(cam->clipsta);
|
persp.setZNear(cam->clipsta);
|
||||||
COLLADASW::Camera ccam(mSW, &persp, cam_id, cam_name);
|
COLLADASW::Camera ccam(mSW, &persp, cam_id, cam_name);
|
||||||
addCamera(ccam);
|
addCamera(ccam);
|
||||||
@ -83,8 +83,8 @@ void CamerasExporter::operator()(Object *ob, Scene *sce)
|
|||||||
else {
|
else {
|
||||||
COLLADASW::OrthographicOptic ortho(mSW);
|
COLLADASW::OrthographicOptic ortho(mSW);
|
||||||
ortho.setXMag(cam->ortho_scale,"xmag");
|
ortho.setXMag(cam->ortho_scale,"xmag");
|
||||||
ortho.setAspectRatio((float)(sce->r.xsch)/(float)(sce->r.ysch));
|
ortho.setAspectRatio((float)(sce->r.xsch)/(float)(sce->r.ysch),false,"aspect_ratio");
|
||||||
ortho.setZFar(cam->clipend);
|
ortho.setZFar(cam->clipend , false , "zfar");
|
||||||
ortho.setZNear(cam->clipsta);
|
ortho.setZNear(cam->clipsta);
|
||||||
COLLADASW::Camera ccam(mSW, &ortho, cam_id, cam_name);
|
COLLADASW::Camera ccam(mSW, &ortho, cam_id, cam_name);
|
||||||
addCamera(ccam);
|
addCamera(ccam);
|
||||||
|
Loading…
Reference in New Issue
Block a user