Merge pull request #9656 from geron-cn/v3_actionline_animationlist

fix: auto add search path for armaturenodereader
This commit is contained in:
minggo 2014-12-29 09:17:01 +08:00
commit 2b0e287b5f
1 changed files with 6 additions and 3 deletions

View File

@ -115,11 +115,14 @@ void ArmatureNodeReader::setPropsWithFlatBuffers(cocos2d::Node *node,
const flatbuffers::Table *nodeOptions)
{
auto* custom = static_cast<CCArmature*>(node);
auto options = (flatbuffers::CSArmatureNodeOption*)nodeOptions;
auto reader = ArmatureNodeReader::getInstance();
auto* custom = static_cast<Armature*>(node);
auto options = (flatbuffers::CSArmatureNodeOption*)nodeOptions;
std::string filepath(options->fileData()->path()->c_str());
std::string dirpath = filepath.substr(0, filepath.find_last_of("/"));
FileUtils::getInstance()->addSearchPath(dirpath);
ArmatureDataManager::getInstance()->addArmatureFileInfo(FileUtils::getInstance()->fullPathForFilename(filepath));
custom->init(getArmatureName(filepath));
if (options->isAutoPlay())