| 54 | } |
| 55 | |
| 56 | bool Animation3D::initWithFile(std::string_view filename, std::string_view animationName) |
| 57 | { |
| 58 | std::string fullPath = FileUtils::getInstance()->fullPathForFilename(filename); |
| 59 | |
| 60 | // load animation here |
| 61 | auto bundle = Bundle3D::createBundle(); |
| 62 | Animation3DData animationdata; |
| 63 | if (bundle->load(fullPath) && bundle->loadAnimationData(animationName, &animationdata) && init(animationdata)) |
| 64 | { |
| 65 | fullPath.append("#").append(animationName); |
| 66 | Animation3DCache::getInstance()->addAnimation(fullPath, this); |
| 67 | Bundle3D::destroyBundle(bundle); |
| 68 | return true; |
| 69 | } |
| 70 | |
| 71 | Bundle3D::destroyBundle(bundle); |
| 72 | |
| 73 | return false; |
| 74 | } |
| 75 | |
| 76 | Animation3D::Curve* Animation3D::getBoneCurveByName(std::string_view name) const |
| 77 | { |
no test coverage detected