This commit is contained in:
Sukhitha Prabhath Jayathilake 2011-08-14 16:13:35 +00:00
parent b8473d70e2
commit fc0a5ede01
2 changed files with 1 additions and 27 deletions

@ -1016,7 +1016,7 @@ void AnimationExporter::exportAnimations(Scene *sce)
tm_name = "fall_off_exponent";
break;
case 4:
tm_name = "blender_dist";
tm_name = "blender/blender_dist";
break;
default:
@ -1137,30 +1137,6 @@ void AnimationExporter::exportAnimations(Scene *sce)
return dot ? (dot + 1) : rna_path;
}
void AnimationExporter::find_all_frames(Object *ob, std::vector<float> &fra)
{
FCurve *fcu= (FCurve*)ob->adt->action->curves.first;
std::vector<float> keys;
for (unsigned int i = 0; i < fcu->totvert; i++) {
float f = fcu->bezt[i].vec[1][0]; //
if (std::find(keys.begin(), keys.end(), f) == keys.end())
keys.push_back(f);
}
std::sort(keys.begin(), keys.end());
float first, last;
std::vector<float>::reference ref = keys.front();
first = ref;
ref = keys.back();
last = ref;
for (float i = first ; i != last ; i+=1.0f )
{
fra.push_back(i);
}
return;
}
void AnimationExporter::find_frames(Object *ob, std::vector<float> &fra)
{
FCurve *fcu= (FCurve*)ob->adt->action->curves.first;

@ -147,8 +147,6 @@ protected:
void find_frames(Object *ob, std::vector<float> &fra, const char *prefix, const char *tm_name);
void find_frames(Object *ob, std::vector<float> &fra);
void find_all_frames(Object *ob, std::vector<float> &fra);
void find_rotation_frames(Object *ob, std::vector<float> &fra, const char *prefix, int rotmode);
// enable fcurves driving a specific bone, disable all the rest