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-08-20 20:48:53 +0400
committerSukhitha Prabhath Jayathilake <pr.jayathilake@gmail.com>2011-08-20 20:48:53 +0400
commitbcadb6b93986b230fb6e70489e7221b3f9972aec (patch)
treecc4febe2e531968c566738c60c4403d015c49b20 /source/blender/collada/AnimationImporter.cpp
parentac3d785caaf272304738ecc0799c1dc9c11c3c82 (diff)
small fixes and refactoring.
Diffstat (limited to 'source/blender/collada/AnimationImporter.cpp')
-rw-r--r--source/blender/collada/AnimationImporter.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/source/blender/collada/AnimationImporter.cpp b/source/blender/collada/AnimationImporter.cpp
index a0202fdcb1b..ee04c270843 100644
--- a/source/blender/collada/AnimationImporter.cpp
+++ b/source/blender/collada/AnimationImporter.cpp
@@ -454,14 +454,14 @@ void AnimationImporter::find_frames( std::vector<float>* frames , std::vector<FC
for (iter = curves->begin(); iter != curves->end(); iter++) {
FCurve *fcu = *iter;
- for (unsigned int k = 0; k < fcu->totvert; k++) {
- //get frame value from bezTriple
- float fra = fcu->bezt[k].vec[1][0];
- //if frame already not added add frame to frames
- if (std::find(frames->begin(), frames->end(), fra) == frames->end())
- frames->push_back(fra);
-
- }
+ for (unsigned int k = 0; k < fcu->totvert; k++) {
+ //get frame value from bezTriple
+ float fra = fcu->bezt[k].vec[1][0];
+ //if frame already not added add frame to frames
+ if (std::find(frames->begin(), frames->end(), fra) == frames->end())
+ frames->push_back(fra);
+
+ }
}
}
@@ -1568,10 +1568,13 @@ bool AnimationImporter::evaluate_animation(COLLADAFW::Transformation *tm, float
i++;
j = 0;
}
+ unused_curves.erase(std::remove(unused_curves.begin(), unused_curves.end(), *it), unused_curves.end());
}
COLLADAFW::Matrix tm(matrix);
dae_matrix_to_mat4(&tm, mat);
+
+ std::vector<FCurve*>::iterator it;
return true;
}