Changeset View
Changeset View
Standalone View
Standalone View
source/blender/io/collada/AnimationImporter.cpp
| Show First 20 Lines • Show All 58 Lines • ▼ Show 20 Lines | void AnimationImporter::add_bezt(FCurve *fcu, | ||||
| BezTriple bez; | BezTriple bez; | ||||
| memset(&bez, 0, sizeof(BezTriple)); | memset(&bez, 0, sizeof(BezTriple)); | ||||
| bez.vec[1][0] = frame; | bez.vec[1][0] = frame; | ||||
| bez.vec[1][1] = value; | bez.vec[1][1] = value; | ||||
| bez.ipo = ipo; /* use default interpolation mode here... */ | bez.ipo = ipo; /* use default interpolation mode here... */ | ||||
| bez.f1 = bez.f2 = bez.f3 = SELECT; | bez.f1 = bez.f2 = bez.f3 = SELECT; | ||||
| bez.h1 = bez.h2 = HD_AUTO; | bez.h1 = bez.h2 = HD_AUTO; | ||||
| insert_bezt_fcurve(fcu, &bez, INSERTKEY_NOFLAGS); | insert_bezt_fcurve(fcu, &bez, INSERTKEY_NOFLAGS); | ||||
| calchandles_fcurve(fcu); | BKE_fcurve_handles_recalc(fcu); | ||||
| } | } | ||||
| void AnimationImporter::animation_to_fcurves(COLLADAFW::AnimationCurve *curve) | void AnimationImporter::animation_to_fcurves(COLLADAFW::AnimationCurve *curve) | ||||
| { | { | ||||
| COLLADAFW::FloatOrDoubleArray &input = curve->getInputValues(); | COLLADAFW::FloatOrDoubleArray &input = curve->getInputValues(); | ||||
| COLLADAFW::FloatOrDoubleArray &output = curve->getOutputValues(); | COLLADAFW::FloatOrDoubleArray &output = curve->getOutputValues(); | ||||
| float fps = (float)FPS; | float fps = (float)FPS; | ||||
| ▲ Show 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | |||||
| #if 0 | #if 0 | ||||
| bez.ipo = U.ipo_new; /* use default interpolation mode here... */ | bez.ipo = U.ipo_new; /* use default interpolation mode here... */ | ||||
| #endif | #endif | ||||
| bez.f1 = bez.f2 = bez.f3 = SELECT; | bez.f1 = bez.f2 = bez.f3 = SELECT; | ||||
| insert_bezt_fcurve(fcu, &bez, INSERTKEY_NOFLAGS); | insert_bezt_fcurve(fcu, &bez, INSERTKEY_NOFLAGS); | ||||
| } | } | ||||
| calchandles_fcurve(fcu); | BKE_fcurve_handles_recalc(fcu); | ||||
| fcurves.push_back(fcu); | fcurves.push_back(fcu); | ||||
| unused_curves.push_back(fcu); | unused_curves.push_back(fcu); | ||||
| } | } | ||||
| } break; | } break; | ||||
| default: | default: | ||||
| fprintf(stderr, | fprintf(stderr, | ||||
| "Output dimension of %d is not yet supported (animation id = %s)\n", | "Output dimension of %d is not yet supported (animation id = %s)\n", | ||||
| ▲ Show 20 Lines • Show All 2,044 Lines • Show Last 20 Lines | |||||