From f3c867c3dbde6919653e7cc712099e48b7508715 Mon Sep 17 00:00:00 2001 From: Sukhitha Prabhath Jayathilake Date: Sun, 31 Jul 2011 05:04:12 +0000 Subject: Camera Clipping animation COLLADA support fix. --- source/blender/collada/AnimationExporter.cpp | 6 +++--- source/blender/collada/AnimationImporter.cpp | 6 +++--- source/blender/collada/AnimationImporter.h | 3 ++- 3 files changed, 8 insertions(+), 7 deletions(-) (limited to 'source') diff --git a/source/blender/collada/AnimationExporter.cpp b/source/blender/collada/AnimationExporter.cpp index ab2bf591321..2f92d9212a9 100644 --- a/source/blender/collada/AnimationExporter.cpp +++ b/source/blender/collada/AnimationExporter.cpp @@ -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; diff --git a/source/blender/collada/AnimationImporter.cpp b/source/blender/collada/AnimationImporter.cpp index dad10d91117..8ae2d6970cd 100644 --- a/source/blender/collada/AnimationImporter.cpp +++ b/source/blender/collada/AnimationImporter.cpp @@ -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; diff --git a/source/blender/collada/AnimationImporter.h b/source/blender/collada/AnimationImporter.h index 642d218dd41..02b7b05afec 100644 --- a/source/blender/collada/AnimationImporter.h +++ b/source/blender/collada/AnimationImporter.h @@ -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 -- cgit v1.2.3