Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSukhitha Prabhath Jayathilake <pr.jayathilake@gmail.com>2011-07-17 21:30:41 +0400
committerSukhitha Prabhath Jayathilake <pr.jayathilake@gmail.com>2011-07-17 21:30:41 +0400
commitb96d3fd70aa2a967a3096742c7823c129221511e (patch)
tree8ca5f2f1c437c12b384751b41640aef660e40eb9 /source/blender/collada/AnimationExporter.cpp
parent6b6c2bd17f85f9a0aa8481c6eb4f735f36c65436 (diff)
Identify material Animations to export.
Diffstat (limited to 'source/blender/collada/AnimationExporter.cpp')
-rw-r--r--source/blender/collada/AnimationExporter.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/source/blender/collada/AnimationExporter.cpp b/source/blender/collada/AnimationExporter.cpp
index 2072b1df7a8..81dae097315 100644
--- a/source/blender/collada/AnimationExporter.cpp
+++ b/source/blender/collada/AnimationExporter.cpp
@@ -24,6 +24,7 @@
#include "GeometryExporter.h"
#include "AnimationExporter.h"
+#include "MaterialExporter.h"
template<class Functor>
void forEachObjectInScene(Scene *sce, Functor &f)
@@ -944,7 +945,17 @@ void AnimationExporter::exportAnimations(Scene *sce)
fcu = (FCurve*)(((Lamp*)ob ->data)->adt->action->curves.first);
else if( (ob->type == OB_CAMERA ) && ((Camera*)ob ->data)->adt && ((Camera*)ob ->data)->adt->action )
fcu = (FCurve*)(((Camera*)ob ->data)->adt->action->curves.first);
- //The Scene has animations if object type is armature or object has f-curve or object is a Lamp which has f-curves
+
+ for(int a = 0; a < ob->totcol; a++)
+ {
+ Material *ma = give_current_material(ob, a+1);
+ if (!ma) continue;
+ if(ma->adt && ma->adt->action)
+ {
+ fcu = (FCurve*)ma->adt->action->curves.first;
+ }
+ }
+
if ( fcu) return true;
base= base->next;
}