46 std::string full_path(full_path_cstr);
48 size_t slash_pos = full_path.rfind(
'/');
49 if (slash_pos != std::string::npos)
51 filename = full_path.substr(slash_pos+1);
58 Ogre::DataStreamPtr ds;
61 ds = Ogre::ResourceGroupManager::getSingleton().openResource(filename, Ogre::ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME);
65 catch (Ogre::Exception& e)
73 LOG(
"[RoR|Scripting] Failed to load file '"+filename+
"', reason unknown.");
77 const std::string& code = ds->getAsString();
80 return ProcessScriptSection(code.c_str(),
static_cast<unsigned int>(code.length()), filename.c_str(), 0);