Material Effect Specular color animation Export.
authorSukhitha Prabhath Jayathilake <pr.jayathilake@gmail.com>
Wed, 27 Jul 2011 16:29:28 +0000 (16:29 +0000)
committerSukhitha Prabhath Jayathilake <pr.jayathilake@gmail.com>
Wed, 27 Jul 2011 16:29:28 +0000 (16:29 +0000)
source/blender/collada/AnimationExporter.cpp

index 0e6fa4d0d928947c01c037decc10b9a442cfa73b..640a4b36384707cbd3bef9de33a67b520b48c191 100644 (file)
@@ -111,7 +111,7 @@ void AnimationExporter::exportAnimations(Scene *sce)
                                while (fcu) {
                                        transformName = extract_transform_name( fcu->rna_path );
                                        
                                while (fcu) {
                                        transformName = extract_transform_name( fcu->rna_path );
                                        
-                                       if ((!strcmp(transformName, "specular_hardness"))) 
+                                       if ((!strcmp(transformName, "specular_hardness"))||(!strcmp(transformName, "specular_color"))
                                                dae_animation(ob ,fcu, transformName, true, ma );
                                        fcu = fcu->next;
                                }
                                                dae_animation(ob ,fcu, transformName, true, ma );
                                        fcu = fcu->next;
                                }
@@ -204,7 +204,7 @@ void AnimationExporter::exportAnimations(Scene *sce)
                        axis_name = axis_names[fcu->array_index];*/
                }
                //maybe a list or a vector of float animations
                        axis_name = axis_names[fcu->array_index];*/
                }
                //maybe a list or a vector of float animations
-               else if ( !strcmp(transformName, "color") )
+               else if ( !strcmp(transformName, "color")||!strcmp(transformName, "specular_color") )
                {
                        const char *axis_names[] = {"R", "G", "B"};
                        if (fcu->array_index < 3)
                {
                        const char *axis_names[] = {"R", "G", "B"};
                        if (fcu->array_index < 3)
@@ -840,6 +840,8 @@ void AnimationExporter::exportAnimations(Scene *sce)
                                tm_type = 10;
                        else if (!strcmp(name, "specular_hardness"))
                                tm_type = 11;
                                tm_type = 10;
                        else if (!strcmp(name, "specular_hardness"))
                                tm_type = 11;
+                       else if (!strcmp(name, "specular_color"))
+                               tm_type = 12;
                        
                        else
                                tm_type = -1;
                        
                        else
                                tm_type = -1;
@@ -881,6 +883,10 @@ void AnimationExporter::exportAnimations(Scene *sce)
                case 11:
                        tm_name = "shininess";
                        break;
                case 11:
                        tm_name = "shininess";
                        break;
+               case 12:
+                       tm_name = "specular";
+                       break;
+                       
                default:
                        tm_name = "";
                        break;
                default:
                        tm_name = "";
                        break;