Camera Clipping animation COLLADA support fix.

This commit is contained in:
Sukhitha Prabhath Jayathilake 2011-07-31 05:04:12 +00:00
parent d3edf274b0
commit f3c867c3db
3 changed files with 8 additions and 7 deletions

@ -94,7 +94,7 @@ void AnimationExporter::exportAnimations(Scene *sce)
if ((!strcmp(transformName, "lens"))||
(!strcmp(transformName, "ortho_scale"))||
(!strcmp(transformName, "clipend"))||(!strcmp(transformName, "clipsta")))
(!strcmp(transformName, "clip_end"))||(!strcmp(transformName, "clip_start")))
dae_animation(ob , fcu, transformName, true );
fcu = fcu->next;
}
@ -836,9 +836,9 @@ void AnimationExporter::exportAnimations(Scene *sce)
tm_type = 7;
else if (!strcmp(name, "ortho_scale"))
tm_type = 8;
else if (!strcmp(name, "clipend"))
else if (!strcmp(name, "clip_end"))
tm_type = 9;
else if (!strcmp(name, "clipsta"))
else if (!strcmp(name, "clip_start"))
tm_type = 10;
else if (!strcmp(name, "specular_hardness"))
tm_type = 11;

@ -896,14 +896,14 @@ void AnimationImporter::translate_Animations_NEW ( COLLADAFW::Node * node ,
{
const COLLADAFW::AnimatableFloat *zfar = &(camera->getFarClippingPlane());
const COLLADAFW::UniqueId& listid = zfar->getAnimationList();
Assign_float_animations( listid ,AnimCurves, "clipend");
Assign_float_animations( listid ,AnimCurves, "clip_end");
}
if ((animType->camera & CAMERA_ZNEAR) != 0 )
{
const COLLADAFW::AnimatableFloat *znear = &(camera->getNearClippingPlane());
const COLLADAFW::UniqueId& listid = znear->getAnimationList();
Assign_float_animations( listid ,AnimCurves, "clipsta");
Assign_float_animations( listid ,AnimCurves, "clip_start");
}
}
@ -1009,7 +1009,7 @@ AnimationImporter::AnimMix* AnimationImporter::get_animation_type ( const COLLAD
types->material = setAnimType(&(efc->getShininess()),(types->material), MATERIAL_SHININESS);
types->material = setAnimType(&(efc->getSpecular().getColor()),(types->material), MATERIAL_SPEC_COLOR);
types->material = setAnimType(&(efc->getDiffuse().getColor()),(types->material), MATERIAL_DIFF_COLOR);
// types->material = setAnimType(&(efc->get()),(types->material), MATERIAL_TRANSPARENCY);
}
}
return types;

@ -110,7 +110,8 @@ private:
{
MATERIAL_SHININESS = 2,
MATERIAL_SPEC_COLOR = 4,
MATERIAL_DIFF_COLOR = 1 << 3
MATERIAL_DIFF_COLOR = 1 << 3,
MATERIAL_TRANSPARENCY = 1 << 4
};
enum AnimationType