void init(const std::string& name)
{
moof::script script;
- std::string path(name);
+ std::string path = moof::resource::find_file("animations/"+name, "lua");
- if (!Animation::find_path(path))
- {
- throw std::runtime_error("cannot find resource " + name);
- }
+ //if (!resource::find(path))
+ //{
+ //throw std::runtime_error("cannot find resource " + name);
+ //}
script.import_base_library();
moof::log::import(script);
std::map<std::string,Data::Sequence>::iterator it;
it = mData->mSequences.find(name);
-
if (it != mData->mSequences.end())
{
mCurrentSequence = &(*it).second;
return impl_->mFrameIndex;
}
-
-/**
- * Specialized search location for animation files. They can be found in
- * the "animations" subdirectory of any of the search directories.
- */
-
-bool Animation::find_path(std::string& name)
-{
- return moof::resource::find_path(name, "animations/", "lua");
-}
-