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:
authorGaia Clary <gaia.clary@machinimatrix.org>2012-06-13 03:19:34 +0400
committerGaia Clary <gaia.clary@machinimatrix.org>2012-06-13 03:19:34 +0400
commitb0038ae4996993f1dd808babe402e2e390933330 (patch)
treee7b234532fe2cbf48f809c6ae027162d0361972c /source/blender/collada
parentc7cca0c842e05a4fc2f5946844d212a365c5ab47 (diff)
Collada: fixed a few loops to only loop over the list of exported objects, instead of the current scene.
Diffstat (limited to 'source/blender/collada')
-rw-r--r--source/blender/collada/AnimationExporter.cpp8
-rw-r--r--source/blender/collada/ImageExporter.cpp8
-rw-r--r--source/blender/collada/MaterialExporter.cpp9
3 files changed, 9 insertions, 16 deletions
diff --git a/source/blender/collada/AnimationExporter.cpp b/source/blender/collada/AnimationExporter.cpp
index cb675618ea5..9582da4fe5c 100644
--- a/source/blender/collada/AnimationExporter.cpp
+++ b/source/blender/collada/AnimationExporter.cpp
@@ -1110,13 +1110,12 @@ void AnimationExporter::enable_fcurves(bAction *act, char *bone_name)
}
}
-/* TODO - only check NodeLink objects that are exported */
bool AnimationExporter::hasAnimations(Scene *sce)
{
- Base *base = (Base *) sce->base.first;
+ LinkNode *node;
- while (base) {
- Object *ob = base->object;
+ for(node=this->export_settings->export_set; node; node=node->next) {
+ Object *ob = (Object *)node->link;
FCurve *fcu = 0;
//Check for object transform animations
@@ -1140,7 +1139,6 @@ bool AnimationExporter::hasAnimations(Scene *sce)
if (fcu)
return true;
- base = base->next;
}
return false;
}
diff --git a/source/blender/collada/ImageExporter.cpp b/source/blender/collada/ImageExporter.cpp
index 105b895cf37..c777a7d1fab 100644
--- a/source/blender/collada/ImageExporter.cpp
+++ b/source/blender/collada/ImageExporter.cpp
@@ -45,13 +45,12 @@ ImagesExporter::ImagesExporter(COLLADASW::StreamWriter *sw, const ExportSettings
{
}
-/* TODO - shouldn't this use the objects LinkNode's ? */
bool ImagesExporter::hasImages(Scene *sce)
{
- Base *base = (Base *)sce->base.first;
+ LinkNode *node;
- while (base) {
- Object *ob = base->object;
+ for (node=this->export_settings->export_set; node; node=node->next) {
+ Object *ob = (Object *)node->link;
int a;
for (a = 0; a < ob->totcol; a++) {
Material *ma = give_current_material(ob, a + 1);
@@ -65,7 +64,6 @@ bool ImagesExporter::hasImages(Scene *sce)
}
}
- base = base->next;
}
return false;
}
diff --git a/source/blender/collada/MaterialExporter.cpp b/source/blender/collada/MaterialExporter.cpp
index 106861c1916..ef22a76d28e 100644
--- a/source/blender/collada/MaterialExporter.cpp
+++ b/source/blender/collada/MaterialExporter.cpp
@@ -46,13 +46,11 @@ void MaterialsExporter::exportMaterials(Scene *sce)
}
}
-/* TODO - shouldn't this use the scenes object LinkNode's ? */
bool MaterialsExporter::hasMaterials(Scene *sce)
{
- Base *base = (Base *)sce->base.first;
-
- while (base) {
- Object *ob = base->object;
+ LinkNode *node;
+ for(node=this->export_settings->export_set; node; node = node->next) {
+ Object *ob = (Object *)node->link;
int a;
for (a = 0; a < ob->totcol; a++) {
Material *ma = give_current_material(ob, a + 1);
@@ -62,7 +60,6 @@ bool MaterialsExporter::hasMaterials(Scene *sce)
return true;
}
- base = base->next;
}
return false;
}