Camera Clipping animation COLLADA support fix.
authorSukhitha Prabhath Jayathilake <pr.jayathilake@gmail.com>
Sun, 31 Jul 2011 05:04:12 +0000 (05:04 +0000)
committerSukhitha Prabhath Jayathilake <pr.jayathilake@gmail.com>
Sun, 31 Jul 2011 05:04:12 +0000 (05:04 +0000)
source/blender/collada/AnimationExporter.cpp
source/blender/collada/AnimationImporter.cpp
source/blender/collada/AnimationImporter.h

index ab2bf59..2f92d92 100644 (file)
@@ -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;
index dad10d9..8ae2d69 100644 (file)
@@ -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;
index 642d218..02b7b05 100644 (file)
@@ -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